0

I created an endpoint for the MIcrosoft Graph Webhook API but for some reason, the validation token returned isn't correct. It shows

Validation: Testing client application reachability for subscription Request-Id:

Any help would be appreciated

{
  "resource": "/enpoing",
  "httpMethod": "POST",
  "queryStringParameters": {
    "validationToken": "Validation: Testing client application reachability for subscription Request-Id: 481f1e66-d235-4e98-9205-bfb917760877"
  },
  "multiValueQueryStringParameters": {
    "validationToken": [
      "Validation: Testing client application reachability for subscription Request-Id: 481f1e66-d235-4e98-9205-bfb917760877"
    ]
  }
}
Marc LaFleur
  • 31,987
  • 4
  • 37
  • 63
tawheed
  • 5,565
  • 9
  • 36
  • 63
  • Without seeing the code you're using to create the subscription and where in the process you're getting this validation token there isn't much to go on here. – Marc LaFleur Apr 14 '19 at 21:55
  • The point at which I get the token is when MSFT graph calls my API endpoint. It is safe to assume that the creation of the subscription is good because if there was an error, the MSFT graph will not call my endpoint – tawheed Apr 17 '19 at 11:52
  • There is nothing safe to assume. Regardless, there a lot enough in here to go on. – Marc LaFleur Apr 17 '19 at 13:54
  • Since you haven't posted the code you used to decode the response, I can't reproduce the issue. If I were to take a guess, then I'd say the most likely issue is that is the token response and you aren't processing it correctly. – PerfectlyPanda Apr 17 '19 at 15:08

1 Answers1

0

As outlined in the documentation your endpoint needs to handle the validation token properly in order to have the subscription created properly. You can assume your subscription is setup properly only when you get a 201 Created response from the POST request you initially sent.

baywet
  • 4,377
  • 4
  • 20
  • 49