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:
- Ensure the application is configured as a Mobile and Desktop platform application in Azure
- Add the Redirect URI urn:ietf:wg:oauth:2.0:oob to the Mobile and Desktop platform
- 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:
- Under Authentication Settings, Click Add Platform
- Click Mobile and desktop applications under the Configure Platforms screen.
- Add the following Custom Redirect URI : urn:ietf:wg:oauth:2.0:oob
- Navigate to the Azure API permissions settings
- Click Add a permission
- Click Microsoft Graph
- 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)