Not able to create calendar events webhook

Hi

I am trying to create a subscription for calendar events. But I am getting 400 error with message containing:

        "code": "InvalidRequest",
        "message": "Subscription validation request failed. Must respond with 200 OK to this request."

As per webhook validation doc my server should have received call on notificationUrl passed in subscription post body, which is not happening for some reason. I can confirm this same POST notificationUrl could be accessed by me and it accepts validationToken  as query param.

Can someone please help here.

Thanks

Kushal


Managed to resolve after checking access logs. Validationtoken request was getting blocked with 415 error because my api was only accepting json. Ensured that it can also accept "text/plain" and it is now working.

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Kushal,

 

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.

 

Here is an article for your reference: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/subscription_post_subscriptions

 

If the above article doesn’t help you, since this problem is a code related issue, we recommend you to contact the dedicated MSDN forum to get targeted assistance:

https://social.msdn.microsoft.com/Forums/en-US/home

 

Best Regards,

Huni

 

-------------------------------------------------
If you feel a reply works for you, please kindly vote or mark it as it will be beneficial to other community members reading this thread.

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated February 9, 2023 Views 818 Applies to: