cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Requests for PowerBI token go like waterfall, how to fix that?

Hello!

 

Currently we use

var tokenResponse = await client.Reports.GenerateTokenInGroupAsync(WorkspaceId, report.Id, generateTokenRequestParameters);

to fetch every report's token as in Microsoft example. It takes about 800ms each. However, if many reports being used - it delays initiall application startup (reload time) time significantly. Is it possible to convert this so it will fire requests simulaneously? Currently it goes like waterfall. If so, is there any example available?

 

Any other suggestions how to improve performance are welcome.

 

Thank you in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Actually, solved the problem myself. Changed example code to utilize tasks.Add(Task.Run(async () => {}) expressions. For those who interesed, I can provide code snippet. It boosted performance significantly.

View solution in original post

2 REPLIES 2
Ailsa-msft
Community Support
Community Support

Hi @Anonymous 

Is the token you provided an embed token ? What rest API is used ?

Maybe you can refer to this introduction about Power BI REST APIs .

https://community.powerbi.com/t5/Service/Requests-for-PowerBI-token-go-like-waterfall-how-to-fix-that/td-p/1898899

 

Best Regards

Community Support Team _ Ailsa Tao

Anonymous
Not applicable

Actually, solved the problem myself. Changed example code to utilize tasks.Add(Task.Run(async () => {}) expressions. For those who interesed, I can provide code snippet. It boosted performance significantly.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors