Hi,
I got the dashboard using REST API [https://api.powerbi.com/v1.0/myorg/groups/dc7cedf0-bc50-4e38-af1a-56f6704c0ffc/dashboards] and try to visualize dashboard data as a graph by embedUrl but not able to get graph using embedURl
so please can you help me out to get graph using embedURL.
I also try this below code
<script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/jquery/dist/jquery.js"></script>
<script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/powerbi-client/dist/powerbi.js"></script>
<script type="text/javascript">
// Read embed application token from Model
var accessToken = "replace with my accesstoken";
// Read embed URL from Model
var embedUrl = "https://app.powerbi.com/dashboardEmbed?dashboardId=a0092f2c-bb95-4565-b5f9-f8523a218b90&groupId=dc7cedf0-bc50-4e38-af1a-56f6704c0ffc";
// Read dashboard Id from Model
var embedDashboardId = "a0092f2c-bb95-4565-b5f9-f8523a218b90";
// Get models. models contains enums that can be used.
var models = window['powerbi-client'].models;
// Embed configuration used to describe the what and how to embed.
// This object is used when calling powerbi.embed.
// This also includes settings and options such as filters.
// You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details.
var config = {
type: 'dashboard',
tokenType: models.TokenType.Embed,
accessToken: accessToken,
embedUrl: embedUrl,
id: embedDashboardId
};
// Get a reference to the embedded dashboard HTML element
var dashboardContainer = $('#dashboardContainer');
// Embed the dashboard and display it within the div container.
var dashboard = powerbi.embed(dashboardContainer.get(0), config);
alert(dashboard);
</script>
<div id="dashboardContainer" powerbi-settings-nav-content-pane-enabled="true" powerbi-settings-filter-pane-enabled="true"></div>
I also try to get dashboard visualization on online https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html but
getting 403 forbidden https://wabi-india-west-redirect.analysis.windows.net/metadata/cluster