Hi
I have been working with power bi embedded to embed reports and dashboards in an app owns data application and this has overall been working well. However we have recently started building dashboards made up of tiles as opposed to pinning an entire report to the dashboard and now when trying to display this kind of dashboard we are running into issues. The images below depict exactly what is happening and the error that seems to be being thrown:
Any help with this would be greatly appreciated.
5 Comments
- daveParsoFrequent Visitor
Hi
I have been working with power bi embedded to embed reports and dashboards in an app owns data and this has overall been working well. However we have recently started building dashboards made up of tiles as opposed to pinning an entire report to the dashboard and now when trying to display this kind of dashboard we are running into issues. The images below depict exactly what is happening and the error that seems to be being thrown:
Any help with this would be greatly appreciated.
- daveParsoFrequent Visitor
Also figured it would be worthwhile submitting my embedDashboard function
public async Task<ActionResult> EmbedDashboard() { EmbedConfig[] errorArr = new EmbedConfig[1]; //loop that finds the groupID assigned to the currently logged in user foreach (Claim claim in ClaimsPrincipal.Current.Claims) { if (claim.Type == "extension_GroupID") { GroupId = claim.Value; } } var error = GetWebConfigErrors(); if (error != null) { errorArr[0] = new EmbedConfig() { ErrorMessage = error }; return View(errorArr); } // Create a user password cradentials. var credential = new UserPasswordCredential(Username, Password); // Authenticate using created credentials var authenticationContext = new AuthenticationContext(AuthorityUrl); var authenticationResult = await authenticationContext.AcquireTokenAsync(ResourceUrl, ClientId, credential); if (authenticationResult == null) { errorArr[0] = new EmbedConfig() { ErrorMessage = "Authentication failed." }; return View(errorArr); } var tokenCredentials = new TokenCredentials(authenticationResult.AccessToken, "Bearer"); // Create a Power BI Client object. It will be used to call Power BI APIs. using (var client = new PowerBIClient(new Uri(ApiUrl), tokenCredentials)) { // Get a list of dashboards. var dashboards = await client.Dashboards.GetDashboardsInGroupAsync(GroupId); if (dashboards.Value.Count == 0) { errorArr[0] = new EmbedConfig() { ErrorMessage = "Group has no dashboards." }; return View(errorArr); } EmbedConfig[] configArr = new EmbedConfig[dashboards.Value.Count]; for (int i = 0; i < dashboards.Value.Count; i++) { // Get the i'th element in the group var dashboard = dashboards.Value.ElementAtOrDefault(i); // Generate Embed Token. var generateTokenRequestParameters = new GenerateTokenRequest(accessLevel: "view"); var tokenResponse = await client.Dashboards.GenerateTokenInGroupAsync(GroupId, dashboard.Id, generateTokenRequestParameters); if (tokenResponse == null) { errorArr[i] = new EmbedConfig() { ErrorMessage = "Failed to generate embed token." }; return View(errorArr); } //populate an array with information about every dashboard in the workspace configArr[i] = new EmbedConfig() { EmbedToken = tokenResponse, EmbedUrl = dashboard.EmbedUrl, Id = dashboard.Id, Dashboards = dashboards }; } return View(configArr); } }
- daveParsoFrequent Visitor
In doing more research embedded dashboards seem to have issue with displaying more than 2 tiles. Some resolution on why this is would be amazing hopefully with this extra information this can be reproduced.
- v-haibl-msft
Microsoft Employee
I cannot repro the same issue on my side. The embedded dashboard works well when it has more than 2 tiles. I suggest you to collect the fiddler traces and then create a support ticket at http://support.powerbi.com (see bottom of page).
Best Regards,
Herbert - daveParsoFrequent Visitor
v-haibl-msft I have found what i believe to be the cause of this issue. When pinning visuals to the dashboards it seems you can pin however many you want with no issue. HOWEVER if pinning LIVE pages once more than 2 live pages are pinned to the dashboard the issue i was encountering is reproduced. Let me know if this information allows you to reproduce it on your end and hopefully can move forward in fixing the issue.