I'm trying to set up a webhook for the Teams Presence API. My webhook URL is publicly accessible and responds with a 200 status code and the validation token, but I'm still receiving a ValidationError: Subscription validation request failed.
I'm using this url - https://graph.microsoft.com/v1.0/subscriptions
This is the payload i'm using to subscribe presense webhook.
{
"changeType": "created,updated",
"notificationUrl": "https://xyz.com/teams-presence-webhook",
"lifecycleNotificationUrl": "https://xyz.com/teams-presence-webhook",
"resource": "communications/presences/id",
"expirationDateTime": "2025-03-26T14:40:00.0000000",
"clientState": "mySecureRandomString12345"
}
This is the response i'm getting.
{
"error": {
"code": "ValidationError",
"message": "\nValidation: Testing client application reachability for subscription Request-Id: *****",
"innerError": {
"date": "2025-03-17T13:40:28",
"request-id": "****",
"client-request-id": "****"
}
}
}
Here is the Laravel code handling the response:
if ($request->has('validationToken')) {
return response($request->query('validationToken'), 200)
->header('Content-Type', 'text/plain');
}
My webhook endpoint is responding within 10 seconds.
I tested it using Postman and cURL, and the webhook endpoint is responding correctly.
Please see postman request screenshots.


I've confirmed this steps as well. But didn't help me.
- Ensure that your webhook endpoint responds with the validation token in plain text format (text/plain) within 10 seconds of receiving the validation request. This is crucial for the subscription validation process.
- Verify that the
content-Type
header in your response is set to text/plain
. If its something else, the validation will fail.
- Use tools like postman or curl to simulate the validation request and ensure your endpoint responds correctly.
- Confirm that there are no firewall or network restrictions blocking the validation request from Microsoft Graph.
The problem is still there. It would be grateful if someone can help.