Use Postman To Call D365 Data Entities

Share this:

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/dynamics365/fin-ops-core/dev-itpro/data-entities/third-party-service-test

https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app

https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/services-home-page#register-your-external-application

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:

  1. Register an Azure Portal App
  2. 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’.

Azure Active Directory

Write down the ‘Tenant ID’. We will need it later. We will refer to this as the Directory ID.

Directory ID

Next, select ‘App registrations’ then click the ‘+ New registration’ button.

Azure portal App registration

Enter in a name.

Select the radio button for ‘Accounts in this organization directory only’.

Then click the Register button.

Register an application

Write down the Application (client) ID. We will need it later. Going forward, we will call this the ‘Client ID‘.

Get Application client ID

Create The Client Secret ID

Select ‘Certificates & secrets’. Then click the ‘+ New client secret’ button.

Create new Client Secret ID

Enter in a Description for the client secret.

Set the Expires value.

Then click the ‘Add’ button.

Add a client secret

Write down the value shown. We will need it later. Going forward we will call this the ‘client secret ID‘.

Write down 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.

Peter Ramer
Peter Ramer is a part of the Managed Application Services team at RSM working on Microsoft Dynamics 365. He focuses on the Retail and Commerce industries. When he is not solving problems and finding ways to accelerate his clients' business, he enjoys time with his three kids and amazing wife.

Share this:

6 thoughts on “Use Postman To Call D365 Data Entities

Add yours

  1. 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.

  2. 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!

  3. 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.

  4. 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!

    1. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑