The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
We have a report that uses the paginated report visual, we have used GenerateTokenRequestV2 to generate the required token for embedding, which works but it is extremely slow, taking at least 45 seconds to return the token. Here is our implementation for the token, which also uses the GenerateTokenRequest if there is no paginated report:
private static async Task<EmbedToken> GenerateEmbedToken(IPowerBIClient client, Guid reportId, Guid groupId, string datasetId, EffectiveIdentity[] identities, Report paginatedReport)
{
EmbedToken token;
if (paginatedReport != null)
{
var datasetIds = new List<GenerateTokenRequestV2Dataset>
{
new GenerateTokenRequestV2Dataset(datasetId)
};
var reportIds = new List<GenerateTokenRequestV2Report>
{
new GenerateTokenRequestV2Report(reportId),
new GenerateTokenRequestV2Report(paginatedReport.Id)
};
var paginatedTokenRequestParams = new GenerateTokenRequestV2(datasetIds, reportIds, null, identities);
token = await client.EmbedToken.GenerateTokenAsync(paginatedTokenRequestParams); //takes > 45 seconds
}
else
{
var tokenRequestParams = new GenerateTokenRequest(accessLevel: "view", identities: identities);
token = await client.Reports.GenerateTokenInGroupAsync(groupId, reportId, tokenRequestParams);
}
return token;
}
The paginated report is on a different workspace to the report, we have tried putting them on the same workspace but it made no difference to load times.
Has anybody experienced similar issues? If so, what was your solution?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.