How to Register for Azure AD App for oAuth

Register app in Azure AD:

  • Login with dynamics 365 and in the new tab browse the below URL:

https://portal.azure.com/

  • The Azure portal home page will open, now from search input, search for Azure Active.

  • Directory. Open Azure Active Directory by clicking on it.
  • To create an App, click on App Register -> New registration from the left menu.

  • The new app registration form will open. In the form enter the app name and click on Register.

  • After creating an app, a new app detail page will open. You need to copy the Application (client) ID from the detail for oAuth.

  • To provide Dynamics 365 API permission, navigate to the API permission section on the left side menu then click on Add a Permission.

  • The side panel will open from where you can see Dynamics CRM permission by clicking on “Dynamics CRM”.

  • In the second screen, check the user_impersonation checkbox and then click on Add permission.
  • The permission for CRM common data service added to the App.
  • To add Sharepoint permission click on the Add New Permission and select Sharepoint.

  • After that, click on Delegated Permission.

The Permission section will be visible, expand the “AllSites” section and select “AllSites.FullControl” checkbox, and then click on Add permission button to add SharePoint permission.

  • To grant user, click on Grant admin consent for [user].

  • Click on Authentication from the left menu and enable Allow Public Client Flows by clicking on “Yes” under the Advanced Settings.

  • After that to create a client secret for the app, click on Certificates & Secrets from the left menu and then click on New Client Secret.

  • Add a description and select client secret expiry time, click on Add to create client secret.
  • Once the client secret is added successfully, it will display in the client secret list, from where you need to copy the client secret value(It is 1 time copyable) for oAuth.

Create Application User and assign role:

  • Now click on the Users.

  • The user list will be open, from the user list first change the view to Application Users then click on New.
  • Create User form will open, (Note: make sure the form is Application user form if it isn’t then change form view to Application user form).

  • In Create user form add the Application ID, and save the record.

  • After record is saved successfully, the app detail automatically fills up in the application user.
  • Now you need to provide System Administrator and System Customizer roles to create application users.

  • After assigning roles to Application users, now you can use your App Id & Client Secret to Authenticate CRM in PortalXpand.
Related Articles