all Technical posts

Connect your integration services with Dynamics using oAuth

This article will guide you on how to connect a third party application or an integration service with D365O using oAuth.

How to connect Logic App with Dynamics 365 for Finance and Operations

In the integration world, integration with CRM or ERP is a very common scenario. In order for an application to communicate with Microsoft CRM or ERP i.e. Dynamics 365 (or D365 for operations and finance), oAuth is the recommended method by Microsoft. There are some basic steps which we need to follow in order to connect any application with Dynamics using oAuth. In this article we will see how to perform those steps.

Logically there will be the following tasks:

  1. Register app in Azure Active Directory (The app must be registered on the same tenant where you have Dynamics license)
  2. Grant this app permission on AAD and Microsoft Dyamics ERP
  3. Map this app with an user in Dynamics
  4. Use this app’s ObjectID, ApplicationID and Key in third party application to authenticate with Dynamics

Now let’s see how to perform above tasks in step by step manner :

  1. Log in to Azure portal
  2. Go to Azure Active Directory
  3. Go to App registrations
  4. Select option New application registration
  5. Give a name to app in Name and add URL of Dynamics environment in Sign-On URL https://xxxxx-dev.sandbox.operations.dynamics.com/
  6. Click on Create option
  7. Note down the Application ID and Object ID. You will need these IDs in your application which will communicate with Dynamics.
  8. Go to Settings option
  9. Go to Required permissions and then to Grant permissions
  10. Click on Windows Azure Active Directory
  11. Provide Application Permissions and Delegated Permissions (as per the following snapshot) and click on Save
  12. Click on Add option under required permission
  13. Go to Select an API and from available API select Microsoft Dynamics ERP –
  14. Provide all rights (as per the following snapshot)
  15. Go to option Keys
  16. On right side enter Key description and and in Expires insert duration to Never expires. (This will depend upon your scenario as well. If you want to expire the key after certain time, then choose option accordingly)
  17. Copy value of the Key as it generates once. Remember that after saving the key, you wont be able to see it again. So you must be careful and copy the key before clicking on the Save button
  18. Save changes. That’s all from Azure Active Directory side.
  19. Now Go to Dynamic Ax 365 for Finance and Operation on following page

    • System administrator > Setup > Azure directory
    • Create new record and add the app’s Client ID and Dynamics user. Provide a name for your record.

Now you are ready to connect from your application to Dynamics using the AAD registered app’s details.

Thanks for reading the article, happy connecting.

If you need further clarification regarding this topic, feel free to contact us via the form below!

Subscribe to our RSS feed

Hi there,
how can we help?

Got a project in mind?

Connect with us

Let's talk

Let's talk

Thanks, we'll be in touch soon!

Call us

Thanks, we've sent the link to your inbox

Invalid email address

Submit

Your download should start shortly!

Stay in Touch - Subscribe to Our Newsletter

Keep up to date with industry trends, events and the latest customer stories

Invalid email address

Submit

Great you’re on the list!