cancel
Showing results for 
Search instead for 
Did you mean: 

Issues Implementing Microsoft Graph API for Outlook - Token Errors

kpb26
Level 3
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
------------------------------
3 REPLIES 3

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.

7206.png
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
------------------------------

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).

7207.jpg


------------------------------
Kevin Babb
------------------------------

We ended up resolving the issue by using Application Permissions rather than Delegated Permissions for anyone who is having the same problems

------------------------------
Kevin Babb
------------------------------