We are creating a Webhook/Subscription using Microsoft Graph. However, the following JSON is returned and we can see no corresponding HTTP request to our validation public web server:
"error": {
"code": "InvalidRequest",
"message": "Subscription validation request failed. Must respond with 200 OK to this request.",
"innerError": {
"request-id": "d2c4eeca-1bf9-4657-a904-ba6925428bbd",
"date": "2018-02-24T17:19:56"
}
}
Our HTTP POST request to https://graph.microsoft.com/v1.0/subscriptions
contains this JSON:
{
"changeType": "created,updated",
"clientState": "subscription-identifier",
"expirationDateTime": "2018-02-27T15:46:18.835Z",
"notificationUrl": "https://[public_web_server]/api/watl/o365",
"resource": "Users/[email address]/mailfolders('inbox')/messages"
}
When testing the request via Hurl.it
and other online HTTP requests we can see the request hit our web server. However, we can not see anything coming from Microsoft Graph.
Our web server is responding with a 200 OK
and including the ValidationToken
as the body.
Any suggestions?
content-type
in your validation response? Also, have you confirmed that theUser
in question has a valid mailbox (i.e. calling/users/{id}/mailfolders('inbox')/messages
returns results)? – Marc LaFleur