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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Calling a Power Automa...
Power Automate
Unanswered

Calling a Power Automate Flow from Azure Function results in CORS error

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

When I call a Power Automate Flow with a HTTP trigger from Postman, it works successfully. However, when I call the flow from Azure Functions using a POST API call, it results in the following error:

 

Access to XMLHttpRequest at 'https://prod-XXX.westeurope.logic.azure.com/workflows/XXX/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%252Ftriggers%252Fmanual%252Frun&sv=1.0&sig=XXX' from origin 'http://localhost:7071' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

 

How do I resolve this issue? Do I have to set the 'Access-Control-Allow-Origin' header to localhost:7071? If so, how do I do it in Power Automate?

Categories:
  • Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at

    Hi @Anonymous,

     

    Just to double check. You are using the When a request is received trigger action, correct?

     

    If so, I would use the following PowerShell cmdlet in an Azure Function:

    Invoke-WebRequest -Uri "https://prod-03.uksouth.logic.azure.com:443/workflows/randomguid/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=randomsig" -Method 'POST'

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 349 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard