An API that connects multiple Microsoft services, enabling data access and automation across platforms
MS Graph returns AuthenticationError for messages endpoint
Hello,
We are working on an app that interacts with users emails. We have an application with Mail.ReadWrite and User.Read.All permissions. We obtained the JWT token through https://login.microsoftonline.com/TENANT_ID/oauth2/v2.0/token. After that, we call /users and get the response. When we start iterating the users and calling https://graph.microsoft.com/v1.0/users/USER_ID/messages?&count=true.Here we get the following error:
"code": "AuthenticationError",
"message": "Error authenticating with resource",
We double-checked permissions and everything is the same as on the other tenants where it works. Any tips on where and what to look for?