How to – use HTTP Action to call DataVerse / Dynamics 365 Web API in Power Automate

Sending
User Review
0 (0 votes)

Let us take a simple example, to see the steps involved.

Here we will be manually triggering a flow, getting the token, and calling the WhoAmI request in Microsoft Dataverse / Dynamics 365.

This is how our final Flow looks like.

Inside the first HTTP action, we are calling OAuth 2.0 token endpoint v1. We have MyCrmApp registered in Azure AD and have generated the client secret for it.

Also we have created an Application User using the above application details and have given the appropriate security role.

Below is how our HTTP request looks like.

Next, we have added the Compose action to get the token from the output of the HTTP request.

Inputs (Expression) = outputs(‘HTTP’).body.access_token

Next, we have added the HTTP action again to calls the WhoAmI request using the above token.

On triggering our Flow succeeds as shown below.

The output of the first HTTP request.

Compose step has the access token

And the final step has the result of the HTTP Get request to WhoAmI

The helpful post –

https://carinaclaesson.com/2019/11/24/using-power-automate-to-trigger-on-create-or-update-in-the-cds-and-make-http-requests-with-oauth-2-0-authentication/

https://sharepointmadeeasy.blogspot.com/2018/02/microsoft-flow-http-rest-api-invalid.html

Hope it helps..

Check other posts on Power Automate

Advertisements