web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Posting to HTTP reques...
Power Automate
Unanswered

Posting to HTTP request trigger from Azure Function

(2) ShareShare
ReportReport
Posted on by 8
I am trying to post (HTTP Client POST) to our Power Automate environment from an Azure Function and can do so successfully when the option "Who can trigger a flow?" is set to "Anyone" on the Power Automate Flow. However, when I set the value to "Any user in my tenant" and try to follow the article here Add OAuth authentication for HTTP request triggers - Power Automate | Microsoft Learn I am unsuccessful. Steps I've taken are as follows:
  1. Azure App Registration with the appropriate Power Automate Permissions was created
  2. I am able to successfully get a bearer token for this Azure App Registration via Getting a Bearer Token in Power Automate Flow from Azure App Registration | Medium and set the scope to the recommended "aud" value from the article above (including the //.default)
When I send the bearer token along with a request in code (using HTTP client, with the appropriate headers), I am receiving a 403 - Forbidden HTTP status code with the response. When reviewing the claims associated with the token, I noticed that the "aud" value is not correct and I cannot find a way to have it set to what is required in the article posted above. I tried the steps found in this answer to no avail, https://stackoverflow.com/questions/77220479/add-oauth-authentication-for-http-request-triggers. It doesn't seem that custom values can be added to optional claims in Entra ID.
 
Any ideas of what I may be doing wrong?
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,325 Super User 2025 Season 2 on at
     
    Can you see if this helps you
     
     
    If not please come back for more help.
     
    If so can you please mark as such and maybe a like.
     
    Thanks!
  • Suggested answer
    joliverautomate Profile Picture
    8 on at
    @Michael E. Gernaey while this isn't the specific answer to my question it is a nice article that explains in detail how to use the HTTP Request endpoint in Power Automate or Logic Apps. My particular issue was when you select the option, on the trigger, to only allow the request to come from within your organization, not using the SAS token URL (see below).
     
    I was able to find the specific solution to my problem by replacing a value in the body of my request to secure a token from Entra ID. Following the two articles I posted; I needed to get a bearer token that had the correct value for audience, and it was not returning correctly using the screen shot below (from Getting a Bearer Token in Power Automate Flow from Azure App Registration | Medium):
    I replaced the form field "scope" with "resource" and that did the trick. I was able to successfully retrieve an authenticated token from Entra ID with the correct audience value that Power Automate was expecting.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard