Hi @Harshal Sakare,
Thanks for reaching out!
The subscription notification endpoint (specified in the notificationUrl
property) must be capable of responding to a validation request as described in Set up notifications for changes in user data. If validation fails, the request to create the subscription returns a 400 Bad Request error.
The process to set up a valid subscription involves both the client app and Microsoft Graph as follows:
- The client app sends a subscription request to subscribe to changes on a specific resource.
- Microsoft Graph verifies the request.
- If the request is valid, Microsoft Graph sends a validation token to the notification URL for the client app to validate the notification URL.
- If the request is invalid, Microsoft Graph sends an error response with an error code and details.
- When the client receives the notification URL validation request, the client responds with the validation token in plain text.
- Microsoft Graph validates the client's validation token response and if the validation token is valid, responds with a subscription ID.
Reference document: https://learn.microsoft.com/en-us/graph/change-notifications-delivery-webhooks?tabs=http
Hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".