I set up a new Application in microsoft azure and got the admin to consent application permissions for this app ( files.ReadWriteAll
). I am able to get the access_token
through POSTMAN. I am trying to get drive information using this endpoint
https://graph.microsoft.com/v1.0/drives/{drive-id}
But I get an error response :-
{ "error": { "code": "AccessDenied", "message": "Either scp or roles claim need to be present in the token.", "innerError": { "request-id": "905c7701-8b89-4711-9204-b00c4a09a921", "date": "2019-03-28T15:56:29" } } }
I used this link to get info on my access token. http://jwt.calebb.net/
Files.Readwrite
permissions don't seem to be listed anywhere in the info ( not sure why) . The azure site shows that consent was granted.
Check the steps as below.
Register your app following this document, and Grant permissions.
get access token like this.