Share via


ErrorInvalidParameter when subscribing to Outlook notifications

We are aware of an issue impacting apps that use the Outlook Notification API to subscribe for notifications on users' mailboxes.

It has come to our attention that some developers are getting an error while trying to subscribe to Outlook notifications.

Details

Posting a new Subscription to https://outlook.office.com/api/v2.0/me/subscriptions may return the following error:

HTTP/1.1 400 Bad Request {   "error":   {     "code": "ErrorInvalidParameter",     "message": "The parameter 'Resource' is invalid."   } }

Engineers are currently working on a fix that would be shortly deployed in the Outlook service. We will update this blog post as soon as the fix is deployed in the service.

In the meantime, developers can workaround this error by using a relative URL in the Resource parameter in the JSON payload. For example, if the following JSON payload results in the error:

{   @odata.type:"#Microsoft.OutlookServices.PushSubscription",   Resource: "https://outlook.office.com/api/v2.0/me/events",   NotificationURL: "https://mywebhook.azurewebsites.net/api/send/myNotifyClient",   ChangeType: "Created",   ClientState: "c75831bd-fad3-4191-9a66-280a48528679" }

Post the following instead:

{   @odata.type:"#Microsoft.OutlookServices.PushSubscription",   Resource: "me/events",   NotificationURL: "https://mywebhook.azurewebsites.net/api/send/myNotifyClient",   ChangeType: "Created",   ClientState: "c75831bd-fad3-4191-9a66-280a48528679" }