Calling an APIM App Service from Power Automate

Leave a comment

In this post, we will look at how to call an Azure App Service through an API Management endpoint from Power Automate. The service will require a subscription and also require the Bearer token to be passed through.

First, we will create a new Power Automate flow, and add a new HTTP operation:

Next, let’s configure it to get the bearer token:

Now, run this and grab the resulting JSON from the Body:

We will now add a Parse JSON step, click on Generate from Sample, then paste in the above and the schema will be generated:

Doing this allows us to do the following. A access_token variable will be available from the Parse JSON, and we can send it to our APIM endpoint in the Authorization header like below. We will also pass the subscription in the header through Ocp-Apim-Subscription-Key:

Now when we run this, we see our endpoint is returning data:

 

 

THANKS FOR READING. BEFORE YOU LEAVE, I NEED YOUR HELP.
 

I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.

IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.

THANK YOU, AND LET'S KEEP LEARNING TOGETHER.

CARL

https://www.youtube.com/carldesouza

 

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube

 

Leave a Reply

Your email address will not be published. Required fields are marked *