Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Paginated Report Visual: GenerateTokenRequestV2 slow to generate token (over 45 seconds)

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? 

Status: Needs Info

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

Comments
v-yetao1-msft
Community Support
Status changed to: Needs Info

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

Anonymous
Not applicable

Hi @v-yetao1-msft

In under 2 seconds, we tried several of our reports and this is a consistent time