Pages

February 25, 2023

Best way to do Postman setup with D365FO

Hi Folks, 

There are very simple steps to do initial setup between Postman and D365FO environment. Please follow below steps.

(Make sure you have added a record in 'Azure Active Directory applications' in D365FO under Sys admin > setup > Azure Active Directory applications )

1. Download postman from here and install on you machine.

2. Do app registration on Azure portal, and make sure you copy all details from app registration to a safe place as not all information will available for later use.

3. Go to environment in left pane and create a new environment, you can name it as same as your D365FO environment like DEV01, UAT, Test etc. This also help when you are working with multiple environment and you keep using same get/post script to access different environments. 

4. Add all the variables here as below

Client_ID: You will get it from Azure app registration. 
grant_Type: client_credentials
resource: D365FO environment URL i<https://D365FOUrl/>
client_secret: You will get it from Azure app registration. 
tenant_id: You will get it from Azure app registration. 
access_token: To generate access token follow step 9.


5. Now create new collection and name it with your environment name eg. Dev01



6. Next, click on 3 dots next to collection name and select 'add request'


7. Name this request as 'Authorization', you can name it as per your use like getting public entities details or get a specific entity data or metadata. In the post request paste below as is.

https://login.microsoftonline.com/{{tenant_id}}/oauth2/token


8. Select 'From-data' in body and set below details.



Now you see we parameterize most of things and you don't need to create multiple request for different environments, you can simple change the environment from right top corner. 

9. Now,  Click on send button and you should get a status 200 message with access token. 
You can add the access token to your environment variable. 

Here we have completed the Postman setup. Now you can try few things to explore this further

10. Add one more request in your collection, and add details as below to get list of public entities. 



-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

1 comment:

  1. Thank you for this helpful article, If you are looking for Dynamics 365 & finance product in uae you can check here for more details

    ReplyDelete

Thanks