Postman – Dynamics 365 connection

If you’ve seen my last couple of posts, you will see that I’ve been playing around with Power Automate a lot. If you’ve read them you will know that in some steps I have to execute specific JSON commands. And as most of you know, JSON is in the heart of APIs.

I’ve been testing some of my APIs using Postman app, a well-known application for testing APIs. Even since I’ve passed a Postman course in LinkedIn Learning, I’m playing around with APIs to Dynamics CRM which then I’m using in Power Automate.

There are a lot of articles on the internet showing how to integrate Dynamics 365 with Postman, even there is a Microsoft documentation but in my case, that didn’t work. So after sever hours i finally manage to connect Postman with my Dynamics 365 organization.

This how I did it.

Apart from the obvious step to download Postman desktop app, I’ve registered an Azure App. For instructions follow this Microsoft guide.

Once the app is ready, make sure you’ve enabled Implicit Authentication for the app. By default, this should be on line 22 of the app manifest.

No alt text provided for this image
No alt text provided for this image

If you’ve followed the Microsoft instructions on how to Register an app, you should have already added API permission, and what’s left to do in Azure is to select Redirect URL and create an App Secret.

For redirection URL you can open your app and go to Authentication, and check the box for native client URL option.

No alt text provided for this image

For app secret, select Certificates & secrets option from the left side menu, and create a new client secret.

No alt text provided for this image

That’s pretty much all you have to do in Azure.

Now in Postman

First, you need to download and import the Dynamics 365 Web API collection using the Run in Postman button from its GitHub repository:

No alt text provided for this image

This will start the Postman app.

No alt text provided for this image

You will notice that a new collection will be created as well as a new environment, which you can see at the top right corner in postman.

No alt text provided for this image
No alt text provided for this image

Select the environment and click on the eye icon, and then select Edit to edit the environment details.

No alt text provided for this image

Add the following details as per your Azure app and Dynamics 365.

ApplicationId – Azure application id

No alt text provided for this image

RedirectUrl – the URL from the Authentication step in your azure app.

Resource – this is your dynamics CRM instance URL

WebAPIUrl can remain as it is.

The end result should look like this. Click Update to update the environment details.

No alt text provided for this image

The only thing left is to generate an access token with your Dynamics 365 instance.

  1. Click on the ellipses (…) next to the collection and select “Edit”:
No alt text provided for this image

2. Select the Authorization tab

3. Complete authentication settings and click the Request Token button.

4. Click the Get New Access Token button.

No alt text provided for this image

You will be redirected to Azure AD to authenticate, use your username and pass for Dynamics 365.

No alt text provided for this image

The access token and the expiration time (in minutes) will be displayed. Scroll down and click the Use Token button:

No alt text provided for this image

And then click the Update button in the Authentication tab.

No alt text provided for this image

To test if the connection is successful type WhoAmI. I’ve tested it by getting some account details.

No alt text provided for this image

More About This Author

Kiril Radoslavov
Hi all, I'm from Sofia, Bulgaria. I've been working with Office 365 and Dynamics 365 for more than 5 years. Started as a Technical Support Engineer and slowly but surely found my way as a Dynamics CRM Consultant. Recently I've started my own company in Bulgaria called Simetrix Consult, for providing training for Office 365 and Dynamics CRM. Always willing to learn new tips and tricks about Office 365 and Dynamics CRM.

Author: Kiril Radoslavov

Hi all, I'm from Sofia, Bulgaria. I've been working with Office 365 and Dynamics 365 for more than 5 years. Started as a Technical Support Engineer and slowly but surely found my way as a Dynamics CRM Consultant. Recently I've started my own company in Bulgaria called Simetrix Consult, for providing training for Office 365 and Dynamics CRM. Always willing to learn new tips and tricks about Office 365 and Dynamics CRM.

Share This Post On
Share via
Copy link
Powered by Social Snap