If you are writing an integration into D365 you may want to use Postman to call D365 data entities. This will allow you test the data entities and see what data your receiving application will retrieve without waiting to ask the receiving application to make the call.
Other Resources
The steps in this article can be found by looking in several Microsoft documents. However, I found that the various steps specifically for D365 were spread across several documents. And those articles also contained additional information that did apply to this scenario. So I condensed down that information into the core steps. But if you are in need of further details please check out these articles:
https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app
Setup Steps
First, download Postman from the following link: https://www.postman.com/downloads/
Next, before we setup Postman to call D365 Data Entities we need to do two things first:
- Register an Azure Portal App
- Register the external application in D365
These steps only need to be done once. I will go over these steps in this article. And then cover the actual postman setup steps in the next article.
Register an Azure Portal App
Go to portal.azure.com and login.
Register the Azure Application
Click on the hamburger in the top right corner, and then select ‘Azure Active Directory’.
Write down the ‘Tenant ID’. We will need it later. We will refer to this as the Directory ID.
Next, select ‘App registrations’ then click the ‘+ New registration’ button.
Enter in a name.
Select the radio button for ‘Accounts in this organization directory only’.
Then click the Register button.
Write down the Application (client) ID. We will need it later. Going forward, we will call this the ‘Client ID‘.
Create The Client Secret ID
Select ‘Certificates & secrets’. Then click the ‘+ New client secret’ button.
Enter in a Description for the client secret.
Set the Expires value.
Then click the ‘Add’ button.
Write down the value shown. We will need it later. Going forward we will call this the ‘client secret ID‘.
Register the external application in D365
Use a browser, and login to your D365 instance.
Then go to System administration > Setup > Azure Active Directory applications.
Select New.
Fill in the field ‘Client ID’ with the client that you wrote down after registering the app earlier in this article.
Enter in a name.
Enter in a user ID that has appropriate permissions to allow for the data entities to be called. Initially for testing, you can set this to a user ID with system administrator privileges. The click Save.
Conclusion
The two prerequisites for using Postman are complete See the second article for the steps for setting up Postman.
Hi Peter, I was able to follow your article until the “Register the external application in D365”. It would be helpful if there were more details and some screenshots like in the sections above.
Wow, marvelous blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your web site is magnificent, let alone the content!
Wow cuz this is great work! Congrats and keep it up!
I have founhd very intresting your article.It’s pretty worth enough for me.
In my view, if alll website owners and bloggers made good content ass
you did, the web will be a lot more usefful than ever before.
Hi Peter Ramer,
I have go through the links which you advised :
the first link
https://dynamics365musings.com/setup-postman-to-call-d365-services/
I have found that:
here we first successfully setup the postman to call D365 services.
and second, here it is called existing custom service and method.
the second link
https://dynamics365musings.com/use-postman-to-call-d365-data-entities/
I have found that:
here in Azure > App registration – we generate
Client id (application id)
and secret key.
Once we got Client id and Secret Id form Azure then we need to Register the external application in D365FO.
So , In System administration > Setup > Microsoft Entra Id > here we need to fill the
“Client Id”.
“Name”,
“User Id” – It should be admin privileges. then save it.
So, finally it makes the connection between Azure & D365FO.
Is my assumption being correct?
As you said “So any third party would make two calls. One, using the client Id and secret to get an auth token that expires in a few hours. Then, a second call to run the custom service you wrote.”
My question is
1. The Client id and secret key which I shared with the 3rd party, where they will use those to get the auth token?
Is it in postman tool ? Is they need to install postman in their end also ?
2. Once they got the auth token, the next step is to call the custom service.
for example – this is my csutom service API
https://URL/api/services/service_group_name/service_name/operation_name
https://DEV.axcloud.dynamics.com/api/services/TestServiceGroup/TestService/create
Is the above API will use 3rd party directly in postman tool to get the data from D365FO.
is my assumption being correct?
Kindly elaborate please.
Thanks!
Hi Arpan. You need to look at this link: https://dynamics365musings.com/setup-postman-to-call-d365-data-entities/
In it, it shows you need to make an http web request to this url, passing it the clientid, secret, and environment to get the auth token.
https://login.microsoftonline.com//oauth2/v2.0/token
Postman is just a tool to test out making http web requests. Your third party can use whatever method they want to make an http web request. This be done by writing c# code. Or with another integration tool.
Hopefully that helps.