Dynamics 365 configuration

S4D connects to Dynamics 365 via the OData REST API, using an Application User.

Sign in to your Azure portal, and select Azure Active Directory.

Tenant ID

Select Properties and locate the Tenant ID, and copy it to the tenantid value in the S4D connection string. This is required for the OAuth2 authentication endpoint.

Create App registration

Select App registrations, then New registration. The name you assign here will be the name of the user shown in Dynamics 365. Generally, the account type will remain as Single tenant.

Once created, copy the Application (client) ID from the Overview page. This is the applicationid for the S4D connection string.

Client secret

Navigate to Certificates & Secrets, and create a New client secret. Copy the value into the clientSecret portion of the S4D connection string.

API permissions

Navigate to API permissions and Add a permission. Select Dynamics CRM under Microsoft APIs, and select user_impersonation under Delegated permissions.

Add user to Dynamics 365

Open the Power Platform Admin Center as a System Administrator, select your Dynamics 365 Environment, then Settings.

Navigate to Application users, under Users + permissions, and click New app user. Select the app created above and apply the access permissions desired.

The first time there will be nothing in the list. Click Setup App User.

Pick the App and Security role.