Hi All, I have created a Power Pages Website https://myorg-cars.powerappsportals.com
and I want to embed it's homepage as an iframe into a separate External Website https://www.externalwebsite.com.au (both ficticious names for this post)
How can I do this ? I have found this documentation but cannot get it to work.
Embed a portal in another website by using an iframe - Power Apps | Microsoft Docs
I receive a 'You are not authorized to access this page' message on the external website where the iframe is.
I'm using a new Power Pages site so I believe I dont have to worry about SameSite mode changes
Any help would be appreciated
Hi @prao14 ,
as @PurdyeS pointed out, you can use that sitesetting for the csp settings. If it doesn't exist, just create it. The name is the name, select the right website and enter as value whatever suits your needs.
The site settings are not always completely present as some of the have meaningful defaults 🙂
The X-Frame options are a little bit outdated and not used anymore by the major browsers as far as i know.
Hope it helps,
Christian
Thanks @PurdyeS
I could only see X-Frames options- is this something that needs an upgrading or is there a way to go ahead with X-Frame? - Image below.
Thanks again !
Hi @prao14
To allow your powerpage to be embedded in another website you need to have the "HTTP/Content-Security-Policy" Site Setting as shown above in your PowerApps Portal Management. Also the website you want to embed your powerpage in needs to allow an Iframe, so you might need to talk to that site's website administrator
The mozilla documentation explains about the default-src attribute Content Security Policy (CSP) - HTTP | MDN (mozilla.org)
Hi @PurdyeS , @chleverenz ,
I am new to Power Pages, I am trying to acheive the same - Can you please help me with a step wise process to get this ?
Thanks in advance ! 🙂
Thank you very much I think you are right. As a test I ended up embedding one powerpages site in another powerpages site in a different environment and got it working using settings as above. However if I switch to the other site it doesnt work, so I think the issue is on the external website side.
Hi @PurdyeS ,
usually, you also have to configure the embedding site for allowing an iframe to be filled from another site.
So, its not only the embedded site allowing itself to be embedded, its also the embedding site allowing to embed. Usually, this is set via the default-src attribute as far as i remember. The mozilla documentation usally explains it very well: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
Hope this points in the right direction,
Christian
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional