Forum Discussion
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.
(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
10 Replies
- ekeijl
Helper I
Does the data source of your report use DirectQuery? In that case your might have forgotten this step:
You need to tell PowerBI Embedded how to connect to your data source (i.e. credentials), this is not stored in the PBIX file.
- mangopopFrequent Visitor
Thanks for the reply. This was created with the import option, so I didn't add the connection details. I would be helpful if there were some more informative error messages, as it is I'm a bit stuck.
- mangopopFrequent Visitor
I am getting this error message GET https://wabi-west-europe-redirect.analysis.windows.net/metadata/cluster 403 (Forbidden) Perhaps it's the created of the JWT that is causing me trouble.