Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mangopop
Frequent Visitor

power bi embed 'this content is not available'

I've tried to work through this example and many others but I'm getting no content availabe in the iframe.

 

https://azure.microsoft.com/en-gb/documentation/articles/power-bi-embedded-iframe/

 

I'm also using the angular example from git hub and swapped out the api for my own details. No luck.

 

I can view my reports via the power bi web app without issue.

 

Here's the code I'm using.

 

I've created the JWT and signed it using the JWT website without expiry date (that should work, should it not?)

 

<!DOCTYPE html>
    <html>
    <head>
      <meta charset="utf-8" />
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <title>Test page</title>
      <meta name="viewport" content="width=device-width, initial-scale=1">
    </head>
    <body>
      <button id="btnView">View Report !</button>
      <div id="divView">
        <iframe id="ifrTile" width="100%" height="400"></iframe>
      </div>
      <script>
        (function () {
          document.getElementById('btnView').onclick = function() {
            var iframe = document.getElementById('ifrTile');
            iframe.src='https://embedded.powerbi.com/appTokenReportEmbed?reportId=d3d8c45f-17bf-4f4c-bb4f-0affe770daba';
            iframe.onload = function() {
              var msgJson = {
                action: "loadReport",
                accessToken: "eyJhbGciOiJIUzI1NiIsInR5c...blah,blah,blah...TAaQrly9mNc0-PJZMpKQk",
                height: 500,
                width: 722
              };
              var msgTxt = JSON.stringify(msgJson);
              iframe.contentWindow.postMessage(msgTxt, "*");
            };
          };
        }());
      </script>
    </body>
</body>
</html>

Any help would be greatly appreciated.

1 ACCEPTED SOLUTION

(My posts keep getting auto-deleted, maybe I'm not allowed to link to stackoverflow? :/)

 

Ayway, here are the required claims:

 

Required Claims

    ver: 0.2.0
    wcn: {WorkspaceCollectionName}
    wid: {WorkspaceId}
    rid: {ReportId}
    aud: https://analysis.windows.net/powerbi/api
    nbp: Token valid not before in Unix EPOCH time
    exp: Token expiration in Unix EPOCH time

View solution in original post

10 REPLIES 10

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.