Hi @Saul Droutman ,
Thanks for reaching out to Microsoft!
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.
Microsoft Graph can deliver change notifications to clients via Webhook, Azure Event hubs and Azure Event Grid
Using Webhook to receive change notifications, as per the documentation, when a subscription is requested, Microsoft Graph encodes a validation token and includes it in a POST request to the notification URL.
POST
https://{notificationUrl}?validationToken={opaqueTokenCreatedByMicrosoftGraph}
Using Azure Event Hubs to receive change notifications differs from webhooks. Azure Event hubs is a popular real-time events ingestion and distribution service built for scale.
Your application receives validation notifications whenever it creates a new subscription. You should ignore these notifications. The following example represents the body of a validation message.
{
"value":[
{
"subscriptionId":"NA",
"subscriptionExpirationDateTime":"NA",
"clientState":"NA",
"changeType":"Validation: Testing client application reachability for subscription Request-Id: 522a8e7e-096a-494c-aaf1-ac0dcfca45b7",
"resource":"NA",
"resourceData":{
"@odata.type":"NA",
"@odata.id":"NA",
"id":"NA"
}
}
]
}
Handling validation notifications.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.