Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Subscription validation request failed. Must respond with 200 OK to this request. #364

Closed
gantonioid opened this issue Sep 30, 2019 · 6 comments

Comments

@gantonioid
Copy link

I'm trying to create a Graph Outlook webhook calling an azure function whenever a new email arrives to my inbox.

Expected behavior

So I would expect a "Subscribed successfully" message or similar. So the new emails trigger my Azure Function

Actual behavior

Subscription validation request failed. Must respond with 200 OK to this request.

Steps to reproduce the behavior

With my Microsoft Account, uing the graph-explorer.
[POST] to https://graph.microsoft.com/v1.0/subscriptions
{
"changeType": "created,updated",
"notificationUrl": "https://fridahook.azurewebsites.net/api/Subscriber",
"resource": "me/mailFolders('Inbox')/messages",
"expirationDateTime":"2019-10-01T18:23:45.9356913Z",
"clientState": "secretClientValue"
}

HTTP traffic capture

Here's the error
image

@gantonioid
Copy link
Author

gantonioid commented Sep 30, 2019

My request-id "40aeebdb-99cc-4fbc-9f55-187ad9266427" (so anyone can copy+paste it)

@MIchaelMainer
Copy link
Contributor

This question is not about Graph Explorer.

Azure Functions are not the best option for this scenario. Please consider another option for your listener.

@gantonioid
Copy link
Author

My case is based on this article Microsoft Graph bindings for Azure Functions that claims such scenario is valid.

Anyhow, the response you're referencing is for a timeout error, this is different. Could someone look into it?

@MIchaelMainer MIchaelMainer reopened this Sep 30, 2019
@MIchaelMainer
Copy link
Contributor

Is your Azure Function at https://fridahook.azurewebsites.net/api/Subscriber responding with a 200?

@MIchaelMainer
Copy link
Contributor

Would you mind posting your question on StackOverflow so that the community can see it? Then post the URL in this issue.

@gantonioid
Copy link
Author

Is your Azure Function at https://fridahook.azurewebsites.net/api/Subscriber responding with a 200?

The response of my function is the same Subscription validation request failed. Must respond with 200 OK to this request. Therefore I assume it has something to do with Graph, rather than the azure function.

Here's the link to my question on StackOverflow

@Shjokie Shjokie closed this as completed Jan 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants