Forum Discussion
PowerBI embedded dashboard with php & html faulty embed link
Yes, I believe that is why you specify report id in the powerBI.js config?
var models = window['powerbi-client'].models;
var embedConfiguration= {
type: 'report',
tokenType: models.TokenType.Aad,
id: '', // the report ID
embedUrl: '<?php echo $embedUrl ?>',
accessToken: '<?php echo $access_token; ?>'
};
var $reportContainer = $('#reportContainer');
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);
I also tried with
https://embedded.powerbi.com/appTokenReportEmbed?reportId=xxxx
As embed url
Hi mad_penguin
403 error should be forbidden error. Please check whether your Access token is correct.
From your code I know you get access token by Service Principle(grant_type = client_credentials / others authenication methods' grant_type are Password).
'grant_type' => 'client_credentials'
Please check whether your App for Service Principle is configured correctly.
For reference: Register an Azure AD application to use with Power BI
And check whether your app has access to your report or your Power BI has give security group the API permission.
Embed Power BI content with service principal and an application secret
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- mad_penguin5 years agoNew Member
Sorry, I dont know why this is accepted as a solution. I tried forewarding your idea to the people managing the powerBI application but they said everything is okay and their powerBI config is correct.