Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 17890

GenerateToken for dashboard with links to reports in the same workspace

$
0
0

Hello -

I am able to generate token for dashboards that do not have any links embedded just fine, but with anything that has links I get the "InternalServer" error.

var token = new TokenCredentials(accessToken, "Bearer");
using (var client = new PowerBIClient(new Uri("https://api.powerbi.com"), token))
{
ODataResponseListDashboard dashboards = client.Dashboards.GetDashboardsInGroup(groupId);
GenerateTokenRequest request = new GenerateTokenRequest("view");
Dashboard dashboard = dashboards.Value.FirstOrDefault(a => a.DisplayName.Contains("Test"));
try
{
EmbedToken embedToken = client.Dashboards.GenerateTokenInGroup(groupId, dashboard.Id, request);
}
catch (Exception ex1)
{
}
}

Any help would be appreciated.

Thanks, Shilpi


Viewing all articles
Browse latest Browse all 17890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>