Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Hi @Anonymous
If you use GenerateTokenRequestV2 to generate the required token for embedding without the paginated report visual , how long will it take ?
Best Regards,
Community Support Team _ Ailsa Tao