UiPath Documentation
integration-service
latest
false
Integration Service user guide

Microsoft 365 authentication

Connect UiPath to Microsoft 365 with your own Azure App Registration, using Delegated Permissions or OAuth 2.0 Authorization Code with PKCE (no client secret).

Prerequisites​

To create a connection, you need the following:

  • Client ID
  • Client Secret - Only for the Delegated Permissions authentication type.
  • Tenant ID
  • Scopes

App registration​

This connector always requires your own Microsoft Azure App Registration. UiPath does not provide a shared application for this connector.

The connector supports the following authentication types. Both use delegated permissions:

  • Delegated Permissions – connects using the Client ID and Client Secret of your application.
  • OAuth 2.0 Authorization Code with PKCE – connects using the Client ID of your application, without a client secret.

Delegated Permissions​

To create and configure an app registration:

  1. In the Microsoft Entra admin center, register a new application. For full instructions, check Register an application with the Microsoft identity platform.
  2. Set the application as a Web application.
  3. Add a Web Redirect URI. Set it to: https://{baseURL}/provisioning_/callback (for example, https://cloud.uipath.com/provisioning_/callback for Automation Cloud).
  4. Add Delegated permissions. For the full list of required scopes, see the Scopes section.
  5. Generate a client secret under Certificates & secrets.

After setting up the app registration, use the Client ID, Client Secret, and Tenant ID from the app to create a connection.

OAuth 2.0 Authorization Code with PKCE​

With PKCE (Proof Key for Code Exchange), your application doesn't need a client secret, so there is no secret to rotate or maintain.

To create and configure an app registration:

  1. In the Microsoft Entra admin center, register a new application. For full instructions, check Register an application with the Microsoft identity platform.
  2. Configure the application as a public client, on the Mobile and desktop applications platform.
  3. Add a Redirect URI to the Mobile and desktop applications platform. Set it to: https://{baseURL}/provisioning_/callback (for example, https://cloud.uipath.com/provisioning_/callback for Automation Cloud).
  4. Add Delegated permissions. For the full list of required scopes, see the Scopes section.

You don't need to generate a client secret. After setting up the app registration, use the Client ID and Tenant ID from the app to create a connection.

Scopes​

Default scopes configured: Mail.Read, Mail.Read.Shared, Mail.ReadWrite, Mail.ReadWrite.Shared, Mail.Send, Mail.Send.Shared, MailboxSettings.ReadWrite, Calendars.Read, Calendars.Read.Shared, Calendars.ReadWrite, Calendars.ReadWrite.Shared, profile, openid, email, offline_access, and User.Read.

Mandatory scopes: openid, offline_access, and email. You can't remove these scopes from the connection.

The permissions profile, openid, email, offline_access, and User.Read are described as follows:

  • profile - Includes basic profile information in tokens.
  • openid - Allows you to enable Single Sign-On capabilities for the connection.
  • email - Includes the primary email address of the user as a claim in the ID token.
  • offline_access - Responsible for creating and granting refresh tokens.
  • User.Read - Allows you to read user information, such as the user email, basic profile details, which will be used as the connection identity.

For more details on authentication, check Microsoft 365 HTTP Request.

Note:

All listed Microsoft Graph permissions are delegated permissions. This means the connection operates on behalf of the signed-in user, and the access granted is limited to what that user is allowed to do in Microsoft 365.

Adding the Microsoft 365 authentication​

  1. Select Orchestrator from the product launcher.

  2. Select a folder, and then navigate to the Connections tab.

  3. Select Add connection.

  4. To open the connection creation page, select the connector from the list. You can use the search bar to find the connector.

  5. Select the authentication type: Delegated Permissions or OAuth 2.0 Authorization Code with PKCE.

  6. Configure the following fields:

    • Client ID - You can find the ID in the Overview section of your Microsoft Azure application registration.
    • Client secret - Only for Delegated Permissions. The client secret from the Certificates & secrets section of your Microsoft Azure application.
    • Tenant ID - The Microsoft Azure tenant ID for an app from the Overview section.
      Note:

      If you use a multi-tenant application, keep the default value common. If you use a single-tenant application, retrieve the tenant ID from Azure. For more details, check How to find your Microsoft Entra tenant ID.

    • Scopes - The scopes the connection requests. The default scopes are preselected. Add or remove scopes as your automations need, except the mandatory ones. For the list, see Scopes.
    • Environment - Optionally, select an environment from the dropdown list:
      • Office 365 (default)
      • US Government L4 - Public Sector domain
      • US Government L5 - Public Sector domain
      • China Select Office 365 (default) for all regions, and only switch to Government or China for cloud deployments.
      Note:

      For more details on environments, check Microsoft Graph and Graph Explorer service root endpoints.

  7. Select Connect.

    Where available, select the menu next to a field and choose Use credential asset or Use Orchestrator asset to reference an Orchestrator asset instead of entering the value directly. For more information, see Use credential assets for connections.

  8. Authenticate with your Microsoft email address and password.

  • Prerequisites​
  • App registration​
  • Delegated Permissions​
  • OAuth 2.0 Authorization Code with PKCE​
  • Scopes​
  • Adding the Microsoft 365 authentication​

Was this page helpful?

Connect

Need help? Support(opens in new window)

Want to learn? UiPath Academy(opens in new window)

Have questions? UiPath Forum(opens in new window)

Stay updated