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 Pages / Embed Power Apps Porta...
Power Pages
Unanswered

Embed Power Apps Portal to my React App and Azure B2C AD

(0) ShareShare
ReportReport
Posted on by 6

Hi all,

 

I'm facing a problem trying to embed Power Apps Portal into a React application, the portal keeps taking to the login page within the iframe.

 

Thanks in advance for your help.

Categories:
I have the same question (0)
  • oliver.rodrigues Profile Picture
    9,465 Most Valuable Professional on at

    Hi, have you enabled X-Frame options: https://docs.microsoft.com/en-us/powerapps/maker/portals/embed-portal-website

    are you trying to embed by using an iframe? 

  • luissardon Profile Picture
    6 on at

    Hi @OliverRodrigues , thanks for your response, that is a good point, I am testing this locally, so, they are not in the same origin, do you think a reverse proxy could do the job?

  • oliver.rodrigues Profile Picture
    9,465 Most Valuable Professional on at

    haven't tried doing that locally.. reverse proxy would possibly work

    or would there be any app in the same origin that you can do a quick test? then you would know if they would work

  • luissardon Profile Picture
    6 on at

    Hi @OliverRodrigues , so it was an x-frame options issue, I got the wrong value so I fix it and it works good... as long as I already have an active portal session.... now I'm facing a different problem, maybe you can help me understand why...

    I'm embedding the portal in an iframe within my spa, and my portal has Azure B2C AD set up as mentioned before, the problem is that when the portal renders for the first time in the iframe (not authenticated) it tries to redirect to *.b2clogin.com for authentication, but it refuse to connect because x-frame options is set to DENY in *.b2clogin.com.

    Any idea how can I solve for this?

  • oliver.rodrigues Profile Picture
    9,465 Most Valuable Professional on at

    that's a tricky one now

    the issue here is probably because the x-frame options aren't setup between your main website and Azure AD B2C itself.. and I am not sure if there is anything you can do about this

     

    I don't find very common to host a Portals and require authentication, normally the requirements I see would be to host a page without header/footer even.. can you give more details of your scenario? 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 61

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 40 Most Valuable Professional

#3
DP_Prabh Profile Picture

DP_Prabh 26

Last 30 days Overall leaderboard