cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PurdyeS
Helper I
Helper I

Embed Power Page as an Iframe on an external website - Site Settings and HTTP/Content-Security-Policy

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.

 

PurdyeS_0-1661311972462.png

 

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
chleverenz
Super User
Super User

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

View solution in original post

2 REPLIES 2
chleverenz
Super User
Super User

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

PurdyeS
Helper I
Helper I

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.  

Helpful resources

Announcements
Carousel Community Blog

Check out the Community Blog

Read all about the most recent blogs in the community!

Carousel News & Announcements

What's New in the Community?

Check out the latest News & Events in the community!

Users online (3,736)