subscription validation inner error

Clyde 0 Reputation points
2024-05-02T02:19:14.5133333+00:00

I follow these instructions ...

POST https://graph.microsoft.com/v1.0/subscriptions

Content-Type: application/json

{

"changeType": "created,updated",

"notificationUrl": "https://webhook.azurewebsites.net/notificationClient",

"lifecycleNotificationUrl": "https://webhook.azurewebsites.net/api/lifecycleNotifications",

"resource": "/me/mailfolders('inbox')/messages",

"expirationDateTime": "2016-03-20T11:00:00.0000000Z",

"clientState": "SecretClientState"

}

The response is the POST ...

my_notification_endpoint?validationToken=Validation%3a+Testing+client+application+reachability+for+subscription+Request-Id%3a+0811cb33-9edb-42f7-882c-21c187abae72

It reaches my endpoint. I return the id, per instructions ...

  • A status code of HTTP 200 OK.
  • A content type of text/plain.
  • A body that includes the URL decoded plain text validation token

I return the entire request ...

Validation:Testing client application reachability for subscription Request-Id:0811cb33-9edb-42f7-882c-21c187abae72

Or, I can return only the Id ...

0811cb33-9edb-42f7-882c-21c187abae72

But it does not matter. Every time I receive the error message ...

{"error":{"code":"ValidationError","message":"0811cb33-9edb-42f7-882c-21c187abae72","innerError":{"date":"2024-05-01T23:16:44","request-id":"0811cb33-9edb-42f7-882c-21c187abae72","client-request-id":"0811cb33-9edb-42f7-882c-21c187abae72"}}}

(Other code examples do NOT decrypt anything. They simply return the id that was sent.)

Why then, when my reply is certainly understood, do I receive an error?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,523 questions
Microsoft Entra
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.