CORS Access Control Allow Origin Error to while calling the registered app from different web browser

Prashant Meshram 41 Reputation points

Hi Team,

I am trying to re-run a pipeline using rest API for this I have registered an APP in azure and got the client ID and secret. I was successfully able to call the API through POSTMAN and also powershell script.

But when I am trying to call it from the localhost server or another production environment (different web browser) then it is giving me CORS error. To overcome this I created an API Management service and enabled the CORS policies in the all API inbound / outbound section.

<cors allow-credentials="true">
<allowed-methods preflight-result-max-age="300">
<forward-request />
<set-header name="Access-Control-Allow-Origin" exists-action="override">
<set-header name="Access-Control-Allow-Credentials" exists-action="override">
<on-error />

But still getting the same CORS error.

Could you guys please help me out with this.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,240 questions
{count} votes