Deepak Shaw
Deepak Shaw

Reputation: 667

How logic app connects with D365 using HTTP connector with Tenant ID, client ID and secret

I'm trying to connect Microsoft Dynamics with Web API using the Logic app HTTP(s) connector. I have the following details to connect:

Can someone please advise on the steps involved? Thanks.

Upvotes: 0

Views: 405

Answers (1)

Sridevi
Sridevi

Reputation: 22607

Create one logic app workflow and add one HTTP action in it with below parameters:

URL: https://orgxxxxxxx.crm.dynamics.com/api/data/v9.2/WhoAmI
Method: GET

enter image description here

Now, select Active Directory OAuth as Authentication type and Save it by entering required details:

Tenant: Tenant ID
Audience: https://orgxxxxxxx.crm.dynamics.com (Your Microsoft Dynamics 365 Organization URL)
ClientID:  App ID
CredentialType: Secret
Secret: Client secret

enter image description here

When I run the logic app workflow, it executed successfully like this:

INPUTS:

enter image description here

OUTPUTS:

enter image description here

In the Body section, I got API response of the URL successfully like below:

enter image description here

Make sure to create one Application user by adding Application ID of your Azure AD app registration before connecting D365. You can refer this SO thread by me for that.

Reference: Calling Dynamics 365 Web API from Logic App using OAuth with a Single Action by Syed Sajid Hussain

Upvotes: 0

Related Questions