Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
bhartisharma_in
Frequent Visitor

Issue with Passing Azure B2C Authentication Token to Embedded Power Pages Site

Hi everyone,

We have a main site built with React and a Power Pages site. The Power Pages site is embedded in the main site via an iframe. The main site uses Azure B2C for authentication, and we want the Power Pages site to automatically log in using the same Azure B2C.

I've implemented passing the authentication token from the main website to the embedded Power Pages site using the postMessage API. Here’s a brief summary of the approach I’ve followed:

Main Website Code:

iframe.contentWindow.postMessage({ authToken: authToken }, 'https://powerpages.example.com');

 

 

 

Power Pages Custom Javascript:

window.addEventListener('message', function(event) {
    if (event.origin === 'https://mainwebsite.com') {
        var authToken = event.data.authToken;
        // Process token here
    }
});

 

 

Despite implementing this, the token is still not being passed correctly to the Power Pages iframe. Has anyone encountered a similar issue or have any suggestions on what might be going wrong?

Thanks in advance for your help!

1 ACCEPTED SOLUTION
v-echaithra
Community Support
Community Support

Hi  ,

This issue is more closely related to Azure B2C.To move forward and further assist you in resolving this issue, we need a Q&A thread.

 

Please create a new Q&A post at https://learn.microsoft.com/en-us/answers/questions/ask/ and Add Microsoft Entra ID tag.


Regards,
Chaithra.

 

@bhartisharma_in

View solution in original post

6 REPLIES 6
v-echaithra
Community Support
Community Support

HI @bhartisharma_in ,

We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Chaithra.

v-echaithra
Community Support
Community Support

Hi @bhartisharma_in ,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Chaithra.

v-echaithra
Community Support
Community Support

Hi @bhartisharma_in ,

As we haven’t heard back from you, we wanted to kindly follow up to check if the issue got resolved? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Chaithra.

Hi Chaithra,

Thank you for following up. Unfortunately, I am still facing the same issue and haven't found any helpful information on the Q&A post either.
Regards,
Bharti

v-echaithra
Community Support
Community Support

Hi  ,

This issue is more closely related to Azure B2C.To move forward and further assist you in resolving this issue, we need a Q&A thread.

 

Please create a new Q&A post at https://learn.microsoft.com/en-us/answers/questions/ask/ and Add Microsoft Entra ID tag.


Regards,
Chaithra.

 

@bhartisharma_in

Hi @v-echaithra,

Thank you for the suggestion. I have created the Q&A post and added the Microsoft Entra ID tag as requested.

Regards,
Bharti

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.