Issues Implementing Microsoft Graph API for Outlook - Token Errors
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-03-21 08:39 PM
We are attempting to implement the Microsoft Graph API for accessing an outlook mailbox. I am very new to Azure, so I don't know much about configuration in that tool, so I believe I need help configuring my setup in Azure to support calls to the API. Currently I am attempting to just use the List Messages action, and am getting the following error message:
Internal : Unexpected error Error during Web API HTTP Request
HTTP Status Code: 401
HTTP Response Content: {"error":{"code":"NoPermissionsInAccessToken","message":"The token contains no permissions, or permissions can not be understood.",
Thanks for any help
------------------------------
Kevin Babb
------------------------------
Internal : Unexpected error Error during Web API HTTP Request
HTTP Status Code: 401
HTTP Response Content: {"error":{"code":"NoPermissionsInAccessToken","message":"The token contains no permissions, or permissions can not be understood.",
Thanks for any help
------------------------------
Kevin Babb
------------------------------
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
17-03-21 03:35 AM
Hi Kevin,
From the error message it looks like the the Azure app has no permission to access the mailbox. Under the azure app that you would have created, there is a section for API permissions where you can Add permissions.

Look for application permissions and select the relevant permissions required based on the method that you are going to use. Example - For List messages , refer https://docs.microsoft.com/en-us/graph/api/user-list-messages?view=graph-rest-1.0&tabs=http for the permissions required and add it for your app accordingly.
------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------
From the error message it looks like the the Azure app has no permission to access the mailbox. Under the azure app that you would have created, there is a section for API permissions where you can Add permissions.
Look for application permissions and select the relevant permissions required based on the method that you are going to use. Example - For List messages , refer https://docs.microsoft.com/en-us/graph/api/user-list-messages?view=graph-rest-1.0&tabs=http for the permissions required and add it for your app accordingly.
------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
17-03-21 01:09 PM
Thank you for that feedback. Attached is a screenshot of my API permissions (there may be some I don't need, I'm mostly just throwing things at the wall to see what works).
------------------------------
Kevin Babb
------------------------------
------------------------------
Kevin Babb
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
26-05-21 03:50 PM
We ended up resolving the issue by using Application Permissions rather than Delegated Permissions for anyone who is having the same problems
------------------------------
Kevin Babb
------------------------------
------------------------------
Kevin Babb
------------------------------
