Unable to authenticate and do fetch to azure function endpoint from Microsoft SSO authenticated Frontend webcomponent

Saketh Nalla 26 Reputation points
2025-07-04T19:59:49.5666667+00:00

Hello,

I've a simple JavaScript web component which is embedded inside a parent page (WxCC desktop) which I login using Microsoft SSO. In the web component, I'm doing a fetch to an azure function endpoint which returns a JSON. Everything works fine end-to-end when authentication is disabled. But when Authentication is enabled (as shown in below screenshot in my azure function), the web component is unable to successfully complete the fetch.

User's image

The error I get in console on the front-end is attached below. I've already configured my parent page under CORS in my azure function.User's image

At this point when I open the GET login.windows.net/...... url in the same browser in another tab, without any prompt to login to Microsoft, the azure function return the JSON. And the frontend starts working normally again.

What do I've to do overcome this issue? I don't want the user interaction to either click the URL or having the user to enter credentials in Microsoft login page.

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
274 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.