Postman - Dynamics 365 connection

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


 


要查看或添加评论,请登录

Kiril Radoslavov的更多文章

  • Qualify Lead without creating an Account, Contact, or Opportunity

    Qualify Lead without creating an Account, Contact, or Opportunity

    Due to different business sales processes, sometimes new customers are not always created inside the Microsoft Dynamics…

  • Configure Graph custom connector (Part 2)

    Configure Graph custom connector (Part 2)

    This is part two, of how to connect power automate to Microsoft graph and use it in actions. In case you've missed it…

    2 条评论
  • Configure Graph custom connector (Part1)

    Configure Graph custom connector (Part1)

    Ever since the Microsoft graph has come alive, it's saved a lot of people's projects. Having now the possibility to…

  • Create Exchange workspace

    Create Exchange workspace

    The current global situation (COVID-19) has changed the way people work together, most of the time this is online, but…

  • How to auto assign records in Dynamics CRM?

    How to auto assign records in Dynamics CRM?

    The story behind In companies with different departments there always has a need records to be redirect (or to use the…

  • Open D365 Lookups in Modal Dialogs

    Open D365 Lookups in Modal Dialogs

    Ever had the situation where you are opening a CRM record, and you keep digging into this record's connected entities…

    1 条评论
  • Identify fake/abusive records in CRM

    Identify fake/abusive records in CRM

    If you have a business model where every new user for your organization must have a Contact/Account in your CRM system,…

    1 条评论
  • Custom Connectors in Power Automate

    Custom Connectors in Power Automate

    This is part one of a complete solution that I will post on how to use Power Automate custom connectors with CDS. Power…

    4 条评论
  • Multilanguage data import in Dynamics 365

    Multilanguage data import in Dynamics 365

    Why my freshly imported data into CRM look gibberish? I asked myself that question after the recent data import. You…

  • Auto archive CRM emails in Gmail

    Auto archive CRM emails in Gmail

    We all know that Dynamics CRM offers a POP3/SMTP connection with Gmail. Some of you might be using it and others…

社区洞察

其他会员也浏览了