Setup postman to call D365 data entities

In this article, we will see how to setup Postman to call D365 data entities

Data entity overview:

Data entity in Microsoft Dynamics 365 Finance and Operations is used to integrate data between Microsoft Dynamics 365 Finance and Operations and external systems.

How to create a data entity: Data entity creation

Please Note: To make the data entity available for integration, we need to make the below settings enabled

Data entity public collection name
Data entity public collection name

Postman overview:

Postman is an API (application programming interface) development platform that helps developers to test APIs.

We can do the following things in Postman:

  1. Create and share API requests and collections
  2. Test your API
  3. Monitor the performance of our API

To download the Postman, you can go to the below link Postman

Once it is downloaded and installed in your Laptop.

Now we will setup postman to call d365 data entities:

Before opening postman, we need to do app registration and take Application (client) ID, Client secrets, and Tenant ID.

Register App in Azure portal:

Open the Azure portal Link, click on Microsoft Entra ID as shown below

Microsoft Entra ID
Microsoft Entra ID

Now open App registration, as shown below

App registration
App registration

Now create a new App and note down the client ID, Tenant ID, and Client Secret

Now make sure to add this client ID reference in the D365 as shown below

Microsoft Entra ID applications
Microsoft Entra ID applications

Once you have all the required data, now open Postman, you will see a screen like the one below

Postman Homescreen
Postman Homescreen

Click on New to create a new request, select HTTP as shown below

Postman New HTTP request
Postman New HTTP request

A new request will open in the URL

Postman New request
Postman New request

Now fill in the data as shown in the below screenshot to setup postman to call D365 Data entities

setup postman to call d365 data entities
Setup postman to call d365 data entities

In the above screenshot

1. Is the URL to hit to get the access token –

https://login.microsoftonline.com/PUT YOUR TENANT ID HERE/oauth2/token

2. Is the client id we created earlier –

BBBBBBB-2KKKKH-DDDDDD-SSSS-FFFFFFFF

3. Is the Client secret we created earlier –

HJKGJH–MNBHVGCMBN<_KHJGCVHBJNygvbh12

4. Is the Resource or you can say your DEV environment/T2 Environment URL –

https://dev00000000devaos.axcloud.dynamics.com

Once all the details are filled click on send as shown below

Send postman request to setup postman to call d365 data entities
Send postman request to setup postman to call d365 data entities

5. Is the access_token generated after you click on the send button

Now that we have access token, now we need to create a new request to get data after doing setup postman to call d365 data entities

Now create a new HTTP request and enter the data as shown below

Call the data entity
Call the data entity

In the auth type select Bearer Token and in the Token, put paste the token we got from previous step.

In the URL, I have used the below

https://lsdevYOURDEVURLdevaos.axcloud.dynamics.com/data/PurchaseOrderHeadersV2(dataAreaId=’au10′,PurchaseOrderNumber=’PO10-000001′)?cross-company=True

Here if you notice I have used PurchaseOrderHeadersV2 Entity and filtered DataAreaId as AU10 and PurchaseOrderNumber as PO10-000001.

Below is the data/payload I got in postman

Payload after calling the data entity of D365 using postman
Payload after calling the data entity of D365 using postman

Need help? Connect Atul

Atul Yadav
Latest posts by Atul Yadav (see all)

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

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