This page will guide you step by step to create Client Id and Client Secret to connect Dynamics 365.
First we need to create an Azure AD app and set some parameters.
Below are the steps to perform the same.
1. Go to https://portal.azure.com/#home
2. Log in using an account with administrator permission.
3. In the Azure portal, Expand the Portal Menu and select Azure Active Directory → App Registrations → New Registration
4. In the Register an application page, enter your application's registration information,
a) Enter a suitable App Name
b) Select Accounts in any organizational directory (Any Azure AD directory - Multitenant) option from the Supported account types
c) Set the Redirect URI → Public Client/native(mobile/desktop), Providing this now is optional it can be changed later.
d) Click on Register to create an application.
5. Acquiring Redirect URI:
• Save the Application (client) ID for later use
• Click on Add a Redirect URI
6. You will be redirected to the below screen, Click on Add a platform
7. On Configure platform select Mobile and Desktop applications,
8. Select https://login.microsoftonline.com/common/oauth2/nativeclient and click on Configure.
9. After configuration user will be redirected to below screen.
10. Click Save
11. On the app Overview page, hover over Application (client) ID value, and select the Copy to clipboard icon to copy the value and save as you'll need this later.
12. Now, Set API Permissions:
a) Select API permissions tab from Portal Menu.
b) Click on Add a permission.
c) Select Dynamics CRM from Microsoft APIs tab.
d) Click on Delegated Permissions and check the user_impersonation permission
e) Click on Add Permissions at the bottom.
f) Again, select API permissions tab from Portal Menu.
g) This time click on Grant admin Consent button as shown below
13. Now, Set Manifest:
a) Click on Manifest from Portal Menu.
b) Set allowPublicClient:true,
c) Click on Save.
Those are the steps to complete the registration of your application in Azure Active Directory.
14. Creation of Application user and assigning role:
a) Configure Application user in Dynamics 365 Admin Centre
b) Sign in to the Power Platform admin center (https://admin.powerplatform.microsoft.com/environments) as a System Administrator.
c) Select Environments, and then select an environment from the list.
d) Select Settings.
e) Select Users + permissions, and then select Users.
f) Find the appropriate user and select menu (3 dots) > Select Manage Security Roles.
g) Select DQGAdmin Role from the Role List and select Save.
Note: You will need to install DQForDynamics Solution for DQGAdmin Role.
h) Ensure User has sufficient permissions to impersonate other users and has access to all entities you wish to master.
Please share Client ID (Application ID) from Step 11 and redirect URL, Username and Password from Step15 with DQ Global.