A cloud-based identity and access management service for securing user authentication and resource access
Hello Erik Andersson,
Thanks for the update.
From what you’ve tested, the API is returning the correct CORS headers and the preflight request is working. The issue comes from the GET request returning a 302 to login.microsoftonline.com.
That response doesn’t include CORS headers, so the browser blocks it. The request is being intercepted for authentication and never reaches your API.
Your wildcard + segments setup is correct. It handles routing, not authentication, so nothing is misconfigured there.
Since it works after disabling pre-auth, that confirms the cause.
You can either keep pre-auth off for the API and handle authentication in the app, or keep pre-auth enabled and send the request with a valid token so no redirect happens.
So this is expected behavior for this setup, not a configuration issue.
Reference: https://learn.microsoft.com/entra/identity/app-proxy/application-proxy-understand-cors-issues