Microsoft Graph API Webhook Subscription Request gives Invalid Token Error for a Valid Token

Jamaluddin Khan 0 Reputation points
2023-03-22T06:36:14.8+00:00

Hi,

When I generate the access token and request change notification subscription for /teams/getAllMessages without resource data, I am getting the following error:

User's image

However, the access token being used here was generated just 2 mins before the above call. The lifespan of the access token is 60 minutes here so this should not be the case.
Also, the required permission to receive notification would be ChannelMessage.Read.All which has been already granted to the application.

PFB the granted consents to the application:

User's image

It is a humble request if anyone has any idea why this unexpected response to the token is being received, please let me know. Your help will mean a lot!

Thank you

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,830 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.