-
Make sure to use the correct embedURL, you're using /reportEmbed when you should be using /dashboardEmbed.
eventually, your code should look something like this:
$(document).ready(function () {
// Get models. models contains enums that can be used.
var models = powerbi.models; // or window.powerbi.models
var embedConfiguration = {
type: 'dashboard',
id: 'dashboardID',
embedUrl: 'https://app.powerbi.com/dashboardEmbed',
tokenType: models.TokenType.Aad,
accessToken: 'TokenString'
};
var $dashboardContainer = $('#embedContainer');
var dashboard = powerbi.embed($dashboardContainer.get(0), embedConfiguration);
});
If you are interested in learning more about Power BI, then check out the affordable Power BI certification cost now!