I am using this
url:
https://login.microsoftonline.com/{my client id}/oauth2/v2.0/token
body:
{
"grant_type": "client_credentials",
"client_id" : "e87u998-8878-jju89-****",
"scope" : "https://graph.microsoft.com/.default",
"client_secret" : "***********"
}
and I fetched the access token successfully
After that I tried to read messages using
Url:
https://graph.microsoft.com/v1.0/users/Fnuaha@\*\*\*\*\*.com/messages
Authorization: Bearer 69909acesstoken-897899
and I and got this error message
{
"error": {
"code": "NoPermissionsInAccessToken",
"message": "The token contains no permissions, or permissions can not be understood.",
"innerError": {
"requestId": "ee4bb405-*-4b18-abcf-********",
"date": "2020-06-16T18:15:57",
"request-id": "ee4bb405-*-4b18-abcf-****0b22c8**e"
}
}
}
My app has delegated access for User.Read and Mail.Read
Please suggest