Skip to main content

Authorization

Follow this guide to create a new Microsoft Dynamics 365 credential that will allow Nexla to authenticate to and exchange data with your Dynamics 365 organization.
ms_dyn_api_auth.png

Microsoft Dynamics 365

Prerequisites

Before creating a Microsoft Dynamics 365 credential, you need to identify your Dynamics 365 organization URL and authorize Nexla's OAuth application to access your organization. Microsoft Dynamics 365 uses OAuth2 3-legged authentication, which allows Nexla to access your Dynamics 365 organization on your behalf.

To prepare for OAuth2 authentication, ensure you have the following:

  1. Dynamics 365 Organization URL: You need to know your Dynamics 365 organization URL, which is typically in the format https://<company>.crm.dynamics.com where <company> is your organization's unique identifier. You can find this URL in your Dynamics 365 web application or by checking your organization settings.

  2. Dynamics 365 Account: You must have an active Dynamics 365 account with appropriate permissions to access the API.

  3. Account Access: You must have administrative access or appropriate permissions to authorize applications to access your Dynamics 365 organization.

  4. OAuth Authorization: During the credential creation process, you will be redirected to Microsoft's authorization page to grant Nexla permission to access your Dynamics 365 organization. You will need to sign in with your Microsoft account and approve the authorization request.

The OAuth2 flow uses Nexla's public OAuth application to authenticate with Microsoft Dynamics 365. When you authorize Nexla, you grant permission for Nexla to access your Dynamics 365 organization data based on the requested scopes, including offline access, user profile access, and Dynamics 365 impersonation. The authorization includes access to read and manage data in your Dynamics 365 organization. For detailed information about OAuth2 authentication, available scopes, and API access, refer to the Microsoft Dynamics 365 Web API documentation.

Create a Microsoft Dynamics 365 Credential

  • To create a new Microsoft Dynamics 365 credential, after selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

New Credential Overlay – Microsoft Dynamics 365

MicrosoftDynamicsCred.png

Credential Name & Description

  1. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

    Resource descriptions are recommended but are not required. They should be used provide information about the resource purpose, data freshness, etc. that can help the owner and other users efficiently understand and utilize the resource.

Dynamics 365 Organization URL

Enter your Dynamics 365 organization URL in the Dynamics 365 URL field. This should be the complete URL to your Dynamics 365 organization, typically in the format https://<company>.crm.dynamics.com where <company> is your organization's unique identifier. For example, if your organization identifier is "contoso", your URL would be https://contoso.crm.dynamics.com. Ensure the URL includes the protocol (https://) and does not include a trailing slash.

You can find your Dynamics 365 organization URL in your Dynamics 365 web application by checking the URL in your browser's address bar, or by navigating to your organization settings. The organization URL is used to construct API endpoint URLs for all Dynamics 365 API requests.

OAuth2 Authentication

Microsoft Dynamics 365 uses OAuth2 3-legged authentication to securely access your Dynamics 365 organization. Nexla uses a public OAuth application to handle the authentication flow.

  1. Click the Authorize button to begin the OAuth2 authorization process. You will be redirected to Microsoft's authorization page.

  2. Sign in to your Microsoft account using your Dynamics 365 account credentials.

  3. Review the permissions that Nexla is requesting. These permissions allow Nexla to access your Dynamics 365 organization data and manage records on your behalf.

  4. Click Accept or Authorize to grant Nexla permission to access your Dynamics 365 organization.

  5. After authorization, you will be redirected back to Nexla, and the credential will be automatically configured with the OAuth2 tokens.

    OAuth2 authentication uses Nexla's public OAuth application to securely access your Dynamics 365 organization. When you authorize Nexla, you grant permission for Nexla to access your Dynamics 365 organization data based on the requested scopes, including offline access, user profile access, and Dynamics 365 impersonation. The authorization includes access to read and manage data in your Dynamics 365 organization.

    The OAuth2 tokens (access token and refresh token) are automatically managed by Nexla. The access token is used to authenticate API requests, and the refresh token is used to obtain new access tokens when they expire. Tokens are automatically refreshed as needed to maintain access to your Dynamics 365 organization.

    If you need to revoke access, you can do so in your Microsoft account settings under App permissions or Connected apps. For detailed information about OAuth2 authentication, available scopes, and API access, see the Microsoft Dynamics 365 Web API documentation.

Save the Credential

  1. Once all of the relevant steps in the above sections have been completed, click the Save button at the bottom of the overlay to save the configured credential.

  2. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation and can be selected for use with a new data source or destination.