Closed Surbhidhingra closed 7 years ago
The issue was due to the BaseSubscription model in Microsoft graph SDK where it is setting "@odata.type":"microsoft.graph.subscription"
by default and subscription api is not supporting this in request body and throwing the error: 400
So I resolved it by explicitly making "@odata.type"
to null
in the subscription model and pass it to post request which worked successfully for me.
Thanks!
This issue was resolved by e63e212f8103315f776892331e3702a61c9226e9 in versions 1.1.0
+
Hi,
I am implementing events subscription using MS graph android SDK. Below is the code.
IGraphServiceClient mGraphServiceClient = GraphServiceClientManager.getInstance(context).getGraphServiceClient(); mGraphServiceClient.getSubscriptions().buildRequest().post(getSubscription(email, expirationDate), subscriptionICallback);
The request body generated through this always throws the error:
but the same request body is working fine in graph explorer, I have tried many things now but unable to resolve it. Please help me how to work for subscription in android as I can't find any resources for this online.
It's urgent, appreciate your help. Thanks!