Friday, September 17, 2021

Create and Connect - Multi-factor enabled D365 Dataverse Programmatically

 

Introduction:

In this Blog, we will see how to create Application User in Azure to Access Dynamics CRM/ Model-Driven Apps


Azure Steps to Follow for Application User Registration

1. Login to https://portal.azure.com

2. Search for App Registrations at the top


3. Click New App Registration
4. Enter the Name and Click on Register


5. Once Registration Done 

6. Copy Application ID and Store it in Notepad

7. Search for Certificates and Secrets



8. Select New Client Secret

9. Enter the Description and Click Save

10. You will be getting Client Secret once you save it.

11. Copy that in your Notepad where Application ID Copied



Create Application User in Model-Driven Apps / CRM

1. Login to D365 CDS environment

2. Go to Settings –> Security –>Users

3. Change the view to ‘Application Users’ and click New. Make sure the form is ‘Application User’ form

4. Click New and Change Form to Application User and Input Application ID in the Text Box and Save

5. Then Assign appropriate Security role to this Application User as per your organization’s security set up.

C# Connection String:

String connectionString = “AuthType=ClientSecret; url=<your organization URL>; ClientId=<your application id>; ClientSecret=<client secret key>”;

                CrmServiceClient crmServiceClient = new CrmServiceClient(connectionString ); //Connecting to the D-365 CDS instance

 

                if (crmServiceClient != null && crmServiceClient.IsReady)

                { //Do your operation}









No comments:

Post a Comment

Day 11 - Customizing Option Sets Dropdown Fields with JavaScript

  In this Blog, we will see how to Customizing Option Sets Dropdown Fields with JavaScript label1 = formContext.getAttribute( "bosch_op...