Skip to content

[Bug] Display issue when embedding a Code App in an iframe within a Model-Driven App #199

@agregoirehsdyn

Description

@agregoirehsdyn

Bug Description

Hello, I want to display a Code App within a Model-Driven app. I have created a webRessource to display the Code App link as an iframe. And I have set the webRessource as a sitemap entry.

It worked well for two days. But since last week, I get an error message XXXXXXX.environment.api.powerplatformusercontent.com has refused to connect:
Image

When I look in the Edge console, this error is displayed:

Framing 'https://XXXXXXXX.environment.api.powerplatformusercontent.com/' violates the following Content Security Policy directive: "frame-ancestors 'self' https://.powerapps.com https://.powerapps.com". The request has been blocked.

I know it isn't mentioned in the documentation, but being able to have Code App embeded in moden-driven app would be really useful.

Steps to Reproduce

  • Create a webRessource with an iframe targeting your CodeApp
  • Set it in a model-driven app sitemap
  • Open the sitemap entry

Environment information

Here is the webRessource code:

<htmldata>
  <html>
    <head>
      <title>Power App Iframe</title>
      <style>
        body, html {
          margin: 0;
          padding: 0;
          height: 100%;
          overflow: hidden;
        }
        iframe {
          width: 100%;
          height: 100%;
          border: none;
        }
      </style>
    </head>
    <body>
      <iframe
        src="https://apps.powerapps.com/play/e/XXXXXXXXX"
        allow="autoplay; fullscreen"
      ></iframe>
    </body>
  </html>
</htmldata>

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions