integration-service
latest
false
UiPath logo, featuring letters U and I in white

Integration Service user guide

Last updated Feb 19, 2026

Microsoft Dynamics 365 CRM authentication

UiPath Integration Service enables secure connectivity to your Microsoft Dynamics 365 CRM instance using OAuth 2.0-based authentication. Once authenticated, you can create a connection that allows API-level access to Dynamics 365 CRM data for automation workflows.

Adding a connection to Microsoft Dynamics 365 CRM lets UiPath products interact with your CRM data — including reading, writing, modifying, and deleting records, depending on the authenticated user’s permissions in Dynamics 365 CRM.

Supported Authentication Types

When creating a Dynamics 365 CRM connection, you can choose between two authentication types:

  • OAuth 2.0 Authorization code (default and recommended)
  • Bring your own OAuth 2.0 app (custom app registration)

OAuth 2.0 Authorization Code

This is the simplest authentication method. This option uses UiPath’s managed Azure AD application to handle user sign-in and token acquisition.

  1. On the connection creation screen, select OAuth 2.0 Authorization code.

  2. Enter the Tenant URL (https://<yourorg>.crm.dynamics.com)

    Note:

    The Tenant URL value must be exactly your Dynamics 365 CRM base domain.

  3. Click Connect.

  4. You are redirected to Microsoft’s sign-in and consent screens to authenticate.

    This method requires no extra setup in Azure AD and is suitable for most users.

Bring Your Own OAuth 2.0 App

Use this option if your organization requires centralized control over Azure AD app registrations, scopes, or compliance policies.

When you select Bring your own OAuth 2.0 app in the connection screen, you must provide the following details:

  • Client ID
  • Client secret
  • Tenant URL
Important:

The callback/redirect URI https://{baseURL}/provisioning_/callback (for example https://cloud.uipath.com/provisioning_/callback) must be added exactly as displayed on the connection screen to your Azure AD app registration settings under Redirect URIs with the Web type.

This callback URL is pre-configured by UiPath and cannot be modified in the Integration Service UI.

When to use a custom app

Use this option if:

  • Your organization requires admin-managed Azure AD app registrations.
  • You want fine-grained control over app permissions and scopes.
  • You must follow internal security policies for OAuth applications.
Note:
  • Admin consent may be required in your tenant for the app permissions you request.
  • The custom app must be configured with Delegated Permissions for Dynamics CRM.

Required fields explained

FieldDescription
Client IDThe Azure AD application ID (required only if using your own app).
Client secretThe secret you generated for your Azure AD app (required for custom app).
Tenant URLYour Dynamics 365 CRM instance URL (for both options).
Callback URLPre-populated value shown when using a custom app; you must register this URL in Azure AD.

Retrieve your credentials

To find your Tenant URL, contact your Microsoft Dynamics administrator.

In case you have access and use single global tenant, follow these steps:

  1. Select Azure Active Directory.

  2. Go to Properties under the Manage section.

  3. Your tenant is the Tenant ID, for example: sample083151e4.api.crm10.dynamics.com.

    Note:

    Any mistake in the Tenant URL prevents you from authenticating and creating a connection.

If you want to create your own private OAuth 2.0 application, follow the steps described in the Microsoft Dynamics 365 documentation:

To function correctly, the Dynamics 365 CRM connection requires the following OAuth scopes:

  • user_impersonation
  • offline_access
  • User.Read

You can use the connection to enable the Microsoft Dynamics 365 CRM activities in UiPath Studio to build automations for managing accounts, leads, opportunities, incidents, and other CRM capabilities. The various permission-based use cases that can be achieved are as follows:

Scope/PermissionUse caseActivity/Event
user_impersonation (Required)The user_impersonation scope is needed to request in your authentication flow to work with the Azure Management API. Impersonation is used to execute business logic (code) on behalf of another Microsoft Dataverse user to provide a desired feature or service using the appropriate role and object-based security of that impersonated user. This is necessary because the Dataverse Web services can be called by various clients and services on behalf of a Dataverse user, for example, in a workflow or custom ISV solution.N/A
offline_access (Required)The offline_access is required to receive the refresh token in the authentication request endpoint. When you redeem an authorization code in the OAuth 2.0 authorization code flow withoutoffline_accessscope, you will not receive refresh token from the /token endpoint.N/A
User.Read (Required)Allows users to sign-in to the app, and allows the app to read the profile of signed-in users. It also allows the app to read basic company information of signed-in users.N/A

Admin consent may be required depending on your corporate Azure AD policies.

Refresh tokens for OAuth applications

Refresh tokens for OAuth applications can be invalidated or revoked at any time by Microsoft. This can happen for different reasons, such as timeouts and revocations. For details, see Microsoft's official documentation.

Note:

Token invalidation results in failed connections and automations are unable to run without fixing connections.

This issue affects all Microsoft Graph-based connectors.

Make sure to follow best practices from Microsoft when creating your OAuth applications. For full details on how to create a Microsoft OAuth app, check the Microsoft documentation.

Add the Microsoft Dynamics 365 connection

  1. Select Integration Service from the left rail.
  2. From the Connectors list, select Microsoft Dynamics 365 CRM. You can also use the search bar to narrow down the connector.
  3. Select Connect to Microsoft Dynamics 365 CRM.
  4. You are now redirected to the connection page. You can choose between two authentication types: OAuth 2.0 Authorization code or Bring your own OAuth 2.0 app.
  5. Enter the required credentials.
  6. Select Connect.

For more information on Microsoft Dynamics 365, refer to the Microsoft Dynamics 365 documentation.

Troubleshooting common setup issues

  • Invalid redirect URI – Ensure your Azure AD app has exactly the callback URL https://{baseURL}/provisioning_/callback (for example https://cloud.uipath.com/provisioning_/callback) registered in the Redirect URIs.
  • Permissions not granted – Admin consent may be required for Dynamics CRM scopes.
  • Wrong Tenant URL – Verify you are using your organization’s exact CRM base URL.
  • Refresh token / consent issues – These can lead to failed connections if the Azure AD configuration changes after initial consent.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo
Trust and Security
© 2005-2026 UiPath. All rights reserved.