How to Register an Entra ID App for Dynamics 365 OAuth
The portal connects to Dynamics 365 Online with OAuth. For that, you register an app in Microsoft Entra ID (formerly Azure Active Directory), then enter the app’s ID and client secret in the portal admin. OAuth lets the portal access CRM data without storing a CRM user’s sign-in credentials.
Before you start
- You need admin access to the Azure portal for your tenant, with rights to register apps and grant admin consent.
- You need admin access to the Power Platform admin center for your Dynamics 365 environment.
- Sign in to Dynamics 365 with the same Microsoft account before you start.
- This applies to Dynamics 365 Online. For on-premises (IFD) instances, see How to Connect Dynamics 365 to CRMJetty Portal.
Register the app
- In a new browser tab, go to
https://portal.azure.com/. - In the search box, search for Microsoft Entra ID and open it.
- Select App registrations in the left menu.
- Select New registration.
- Enter a name for the app.
- Select Register.
- On the app details page, copy the Application (client) ID. You enter it as the App ID in the portal.
Add Dynamics 365 permissions
- In the left menu, select API permissions.
- Select Add a permission.
- In the side panel, select Dynamics CRM.
- Select the user_impersonation checkbox.
- Select Add permissions.
Add SharePoint permissions
Add these if you use SharePoint for portal documents.
- On API permissions, select Add a permission again.
- Select SharePoint.
- Select Delegated permissions.
- Expand AllSites and select AllSites.FullControl.
- Select Add permissions.
Grant admin consent
- On API permissions, select Grant admin consent for your organization.
- Confirm when prompted.
Allow public client flows
- In the left menu, select Authentication.
- Under Advanced settings, set Allow public client flows to Yes.
- Select Save.
Note: Public client flows let the app use sign-in flows that do not need a client secret. If your security policy does not allow this, ask CRMJetty support whether your portal version needs it, and leave it off if it does not.
Create a client secret
- In the left menu, select Certificates & secrets.
- Select New client secret.
- Enter a description.
- Select when the secret expires.
- Select Add.
- Copy the secret’s Value right away. You enter it as the Client Secret in the portal.
Important: The secret value is shown only once. If you leave the page without copying it, create a new secret.
Important: When the client secret expires, the portal can no longer connect to Dynamics 365. Create a new secret before the expiry date and update it in the portal.
Add the app as an application user
- Sign in to the Power Platform admin center.
- Select your Dynamics 365 environment, then select Settings.
- Under Users + permissions, select Application users.
- Select New app user.
- In Create a new app user, select Add an app and choose the app you registered.
- Select the Business unit for the app user.
- Assign the Security roles the portal needs.
- Select Create.
Tip: Give the application user only the security roles the portal needs to read and write the entities you enable.
Enter the app details in the portal
In the portal admin, go to Settings → Portal Settings → CRM Authentication and enter:
| Portal field | Value from Entra ID |
|---|---|
| App ID | Application (client) ID |
| Client Secret | The client secret Value |
For the full connection steps, see How to Connect Dynamics 365 to CRMJetty Portal.
Troubleshooting
The connection fails after it worked before: the client secret may have expired. Create a new secret in Certificates & secrets, then update Client Secret in the portal.
You can’t find the secret value: the value is shown only when you create it. Create a new client secret and copy the value.
Related articles
- How to Integrate SharePoint with Dynamics 365 Portal
- How to Fix CRM Connection Errors in CRMJetty Portal