Cannot Retrieve Mail Using O365 Get Mail Activity With ApplicationIDandSecret

Resolution for Cannot retrieve mail using O365 Get Mail activity with ApplicationIDandSecret .

Issue Description: Cannot retrieve mail using O365 Get Mail activity using ApplicationIDandSecret

Possible Error Messages:

  • Get Mail - O365 - Microsoft.Graph.ServiceException: Code: timeout
  • Microsoft.Graph.ServiceException: Code: NoPermissionsInAccessToken

Resolution:

  1. Ensure the application is configured as a Mobile and Desktop platform application in Azure
  2. Add the Redirect URI urn:ietf:wg:oauth:2.0:oob to the Mobile and Desktop platform
  3. The Azure API permission granted needs to be configured as Application Permissions instead of delegated permissions due to the user needing to use ApplicationID and ApplicationSecret

In the Configured Application in Azure, complete the following steps:

  1. Under Authentication Settings, Click Add Platform

![](upload://drBVeRgNQf08Q5DD3EyLW6JmMwI.html)

  1. Click Mobile and desktop applications under the Configure Platforms screen.

![](upload://v75uUm0lJXzezcirICS34AtPnc9.html)

  1. Add the following Custom Redirect URI : urn:ietf:wg:oauth:2.0:oob
  2. Navigate to the Azure API permissions settings
  3. Click Add a permission

image.png

  1. Click Microsoft Graph

image.png

  1. Add the required permissions available as Application permissions. See Microsoft Office 365 Setup - Offline for reference. (Note this link is referring to Delegated permissions. Some permissions may not be available as application permission. Add all that apply)