user6012518
user6012518

Reputation: 53

Office365 - Push subscription with error The parameter 'Resource' is invalid

I am using following code to perform push subscription, but with this code I am always getting error as invalid resource. Could you please help me on this. Even i tried resource as "https://outlook.office.com/api/v2.0/me/events" "https://outlook.office.com/api/v2.0/Users('[email protected]')/events" but still error pursist. I am doing this rest call from DHC chrome Add in

{
  "@odata.type": "#Microsoft.OutlookServices.PushSubscription",
  "Resource": "https://outlook.office.com/api/v2.0/me/messages",
  "NotificationURL": "https://mywebhook.azurewebsites.net/api/send/sample",  
  "ChangeType": "Created, Updated, Deleted",
  "SubscriptionExpirationDateTime": "2016-03-25T08:05:01.9420124Z",
  "ClientState": "samplestate"
}

Error:

{
"error":{
"code": "ErrorInvalidParameter",
"message": "The parameter 'Resource' is invalid."
}
}

Upvotes: 0

Views: 495

Answers (1)

Abdel Bahgat
Abdel Bahgat

Reputation: 36

Thank you for reporting this issue. Microsoft engineering team is investigating it right now. Meanwhile, a workaround that worked for multiple subscription cases is to use relative URL for the resource property e.g. "Resource": "me/messages",

Thanks.

Upvotes: 0

Related Questions