How to troubleshoot O365 activities?
Issue Description: How to debug the Office 365 activities? It covers the logs that are typically needed to resolve an issue.
BackgroundOffice 365 Scope uses OAuth 2.0 tokens for authentication and leverages Microsoft's graph API. Most issues related to the Office 365 activities revolve around authentication issues, utilizing an invalid configuration, or misunderstanding the Azure configuration. ( For more information on OAuth 2.0, refer to the following documentation: OAuth 2.0 — OAuth)
In order to use the integration, one must first make an application registration on Azure and assign Microsoft Graph API permissions which make use of OAuth 2.0 tokens. This allows the Robot access to resources that can be traditionally accessed. The Set Up page explains how to do the setup.
The activities will use by default a registration created by UiPath. However, not all organizations will give admin consent to that registration (meaning that your organization will provide the registration).
- Check which OAuth Application is being used. This is a property on the studio activity called "OAuthApplication". Make a note of if it said UiPath or Custom (UiPath cannot be used with Unattended automations).
- If "Custom" was used, make sure to review: Setup (uipath.com). This is the first step to successfully setting up the automation.
- If Custom was used and the Setup has been completed, then confirm the application registration in studio.
- Both the Tenant ID and Application ID should be specified. Here is a screenshot
- This should correspond to the fields in the application registration in Azure. Your Azure admin should help confirm that the correct values have been provided.
- This can be found here when you register the application on AAD in the "Overview" sub-section:
- If the values, match up, include this information in the ticket.
- If the above verification did not help resolve the issue, the next steps would be to:
- Generate a Fiddler trace while the issue is occurring. See How To Use Fiddler As A Proxy For The Robot Service To Collect Information?
- Note: Steps 1-3 can be skipped
- Once Fiddler is capturing traffic, reproduce the issue.
- Also collect the Robot Execution logs and attach those in the support case. See more information on Robot Execution Logs .
- Finally, if possible, share the automation or a sample automation (make sure not to include any sensitive information).
- If a sample automation cannot be provided, please specify the dependency package version and how the specific activity was configured.
- When opening a ticket with UiPath, attach the logs mentioned above.