cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
luissardon
New Member

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

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.

5 REPLIES 5
OliverRodrigues
Super User
Super User

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? 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

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?

OliverRodrigues
Super User
Super User

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




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

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?

OliverRodrigues
Super User
Super User

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? 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,142)