Dynamics 365 Integrations
So you have Microsoft Dynamics 365 for Finance and Operations and you want to be able to make HTTP requests to the environment for some integration. But before you can do that you need to set up dual authentication which requires some set up in both Azure and D365.
Azure
First, navigate to portal.azure.come. Sign in, and in the top right hand corner make sure you are in the correct directory — you can switch if you are not. Next, search for ‘App registrations’. From this page, click ‘+ new Registration’. You can name the app whatever you would like, then click ‘Register’. After that, we need to save off some information and configure the app:
- Click on ‘Redirect URIs’. Click ‘Add a platform’. Select ‘Web’. Enter any redirect URL in the format “https://something.com”.
- Save the Application Client Id — this will be needed later to access your D365 environment.
- Click Endpoints
Here you can see the authentication host and authentication tenant needed to acquire a token for O2Auth calls. In this example the authentication host is https://login.microsoftonline.com and the tenant is the information blacked out after the base URL. You will need this information later to get a token to authenticate HTTP requests, save this information off for now.
On the left hand side of the screen, click: ‘Certificates & secrets’. Click to add a new client secret. Make sure you save the secret off when it is visible, after it is created it will not be able to be seen again.
D365
Now that we set up the information in Azure, lefts configure our D365 environment.
In D365, navigate to System administration > Set up > Azure Active Directory. Here you can enter the client Id for our Azure Active Directory application, and select a user to associate with the Id. Note: the default company of the user selected will be the company where the transactions occur.
Review
Now you are able to connect to Microsoft Dynamics 365 for Finance and Operations with HTTP requests! To review you need:
- The Authorization URL — EX: https://login.microsoftonline.com
- The Authorization tenant — found after the base URL.
- The D365 environment you wish to access, the URL is commonly referenced and the resource in the request.
- The client Id for the Azure app.
- The secret for the Azure app.
A good way to test that things are up and running would be to make a POST request to our authentication URL to get a token and using that token to make a GET request to our D365 environment. A great tool to test these integrations is Postman. You can download Postman at https://www.postman.com.
Now that you are set up with Dynamics 365 Integrations, start making requests with OData! Read more to find out how!
For more tech blogs, subscribe to the code_marks news letter: http://eepurl.com/gZCMQz
2 Comments
Pingback: Filter Dynamics 365 OData Entities | Marked Code
You are a very intelligent person!