Enabling OAuth 2 authentication for Microsoft Dynamics 365

       

    Enable OAuth 2 authentication for Microsoft Dynamics 365

    Please follow the steps below in order to enable OAuth 2 on your Microsoft Dynamics environment and connect the portal to the Dynamics instance:

    Go to: https://admin.microsoft.com

    1. Login with your Dynamics 365 credentials

    2. On the left pane click on Show All

    3. Under Admin Centers click in “Azure Active Directory”

    4. In Azure portal click on the “Azure Active Directory” in the left pane

    5. Under Manage click on App Registrations

    6. Click on New registration on the toolbar

    7.  Enter “Magentrix D365 OAuth 2” for the application name

    8.  Select the second option:
      Accounts in any organizational directory (Any Azure AD directory - Multitenant)

    9. Under Redirect URI select “Web” and enter “http://localhost”

    10. Click on the “Register” button  

     

     

    After saving your app, follow the steps below:

    1) Set API Permissions

    1. Under Manage click on “API permissions”

    2. Click on “Add a permission” on the toolbar

    3. Select “Dynamics CRM” on “Request API permissions” dialogue

    4. Select the “Delegated permissions” box, (It gets highlighted in gray when selected).

    5. Enable the user_impersonation checkbox

    6. Click on the Add permissions button

     

     

    2) Grant Admin Consent

    Click on “Grant admin consent for <company name>” on the toolbar and click “Yes” on the confirmation dialogue box.


    3) Update the Manifest

    1. Under Manage click on Manifest

    2. Set the allowPublicClient to true

    3. Set the oauth2AllowIdTokenImplicitFlow to true

    4. Set the oauth2AllowImplicitFlow to true

    5. Click on Save button in the toolbar

     

    4) Retrieve the Application ID:

    • Click on Overview in the menu

    • Copy the Application (client) ID by clicking on the copy button

    5) Retrieve the API Endpoint:

    • The API Endpoint URL is the web address you use to access your Dynamics instance. Usually, it is similar to the example below:
      https://*****.crm4.dynamics.com/

    6) Enter the details in the Magentrix Authorization screen.

    • The Authorization link will be provided to you by the Magentrix support team. Once you have completed the steps above, navigate to the link, select Dynamics CRM, select OAUTH, then enter the details in the form and click submit.

     

     

    Enable Client Secret authentication + MFA for Microsoft Dynamics 365
     

    1) Creating the secret key:

     

    1. Go to Azure and select Azure Active Directory from the left pane

    2. Under Manage click on App registrations

    3. Select the Magentrix D365 OAuth 2 application you created before

    4. Under Manage click on Certificates & secrets

    5. Click on New client secret on the toolbar

    6. Enter Magentrix D365 Secret in the Description

    7. From Expires dropdown select 24 Months

    8. Click the Add button

    9. Your secret is added now. Copy the code under the Value column and keep it

    10. Login to https://admin.microsoft.com/

    11. Click on Show all

    12. Click on All admin centers

    13. Click on Dynamics 365 Apps

    14. Click on Environments on the left pane if it is not already selected

    15. Click on the environment that is being used in Magentrix (Hover over the link to see the URL)

    16. Click on Settings on the toolbar

    17. Expand Users + permissions

    18. Click on Application users

    19. Click on New app user on the toolbar

    20. Click on Add an app

    21. Select the Magentrix D365 OAuth 2 application

    22. Select the correct Business unit from the dropdown

    23. On the right side of security roles click on the pencil icon

    24. Scroll down and select System Administrator and click on Save button

    25. Click on Create button

     

    2) Enter the details in the Magentrix Authorization screen:​​​​​

    •  The Authorization link will be provided to you by the Magentrix support team. Once you have completed the steps above, navigate to the link, select Dynamics CRM, select Multi-factor Authentication, then enter the details in the form and click submit.

    • See step 4 (Retrieve the Application ID) and step 5 (Retrieve the API Endpoint) in this article on how to retrieve the necessary information for the Client ID and API Endpoint fields.

         

    « Previous ArticleNext Article »


    3.2 (11)


    Comments

    No records to display

    Subscription
    Follow Knowledge posts
    Please enter your email address to subscribe:

    Email:
    Subscribe
    Follow us on Twitter