Forum Discussion
getting 403 forbidden for https://wabi-india-west-redirect.analysis.windows.net/metadata/cluster
Hi dharamgoyal,
Usually, you get a 403 when the application does not have appropriate permissions. Remember that if you added permissions (scopes) to the application AFTER the user trusted the application, the user’s token won’t get the new scopes until they remove trust from the application and trust it again. Easiest workaround is to create a new application and use that instead. Alternative is to manually remove the application using Office 365’s “my apps” feature and then try to use the application again.
Here is an article shows the code used in the integrate-dashboard-web-app on GitHub. Could you try downloading the sample and follow steps there from beginning to see if the code works for you? :smileyhappy:
You might also draw inspiration from several other similar threads from other services:
http://stackoverflow.com/questions/31735264/403-forbidden-from-azure-graph-api
https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-developers-guide
Regards
Hi v-ljerr-msft
Thanks for your response, i have added the permission
"scope": "Content.Create Dashboard.Read.All Dashboard.ReadWrite.All Data.Alter_Any Dataset.Read.All Dataset.ReadWrite.All Group.Read Group.Read.All Metadata.View_Any Report.Read.All Report.ReadWrite.All Tenant.Read.All Workspace.Read.All Workspace.ReadWrite.All",
still getting same error and i am not aware with c# or .Net, i am a PHP developer.
So there is any example in PHP?
this is embed url https://app.powerbi.com/embed?dashboardId=a0092f2c-bb95-4565-b5f9-f8523a218b90&tileId=24985201-f2b8-48fa-bc8c-37664173ed66&groupId=dc7cedf0-bc50-4e38-af1a-56f6704c0ffc id did get using api so how can display graph by this embed url
- v-ljerr-msft8 years agoMicrosoft Employee
Hi dharamgoyal,
Following are two articles/samples about how to integrate a Power BI report into your own PHP web app. Could you go to check if it helps in your scenario? :smileyhappy:
https://github.com/retk/powerbi-php-sample
Regards
- dharamgoyal8 years agoFrequent Visitor
Hi v-ljerr-msft,
I tried first one but getting 403 forbidden error below is my code.
$key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // Fill in the Azure Power BI Workspace Collection Access Key
$payload = array(
"ver" => "0.2.0",
"type" => "embed",
"wcn" => "LsquaredHubWorkspace", // Fill in the Azure Power BI Workspace Collection Name
"wid" => "lsquaredhubworkspace", // Fill in the Workspace ID
"rid" => "xxxxxxxxxxxxxxxxxxxxxxxxxxx", // Fill in the Report IDxx
"iss" => "PowerBISDK",
"aud" => "https://analysis.windows.net/powerbi/api",
"scp" => "Report.Read",
"exp" => time()+60*60, // The expiration time of the token, in this case 1 hour
"nbf" => time()
);
require("JWT.php");
$jwtObj = new JWT;
$token = $jwtObj->encode($payload,$key); // the actual token
?><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script> <!-- JQuery is used to link to report to the div element-->
<script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/powerbi-client/dist/powerbi.js"></script> <!-- JavaScript library for embedding Power BI -->
<div id="reportContainer" powerbi-settings-nav-content-pane-enabled="true" powerbi-settings-filter-pane-enabled="true"></div>
<script>
var setAccessToken = '<?php echo $token;?>';
var setEmbedUrl = "https://embedded.powerbi.com/appTokenReportEmbed?reportId=6a5564f2-bab1-4593-ae74-bebe9618b1ec";
var setEmbedReportId = "6a5564f2-bab1-4593-ae74-bebe9618b1ec";
var embedConfiguration= {
type: 'report',
accessToken: setAccessToken,
embedUrl: setEmbedUrl,
id: setEmbedReportId,
/*settings: {
filterPaneEnabled: false,
navContentPaneEnabled: false
}*/
};
var jQueryreportContainer = jQuery('#reportContainer');
var report = powerbi.embed(jQueryreportContainer.get(0), embedConfiguration);
</script>I debug my code everything is fine in that but rather than getting error.
Error:
This content isn't available.
https://wabi-india-west-redirect.analysis.windows.net/metadata/cluster 403 (Forbidden)I think currently i am using trial/Pay-As-You-Go plan, please let me know what i am missing or doing wrong.