Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have developed a website (based on the Embed for Customers example) that based on the user that is logged in it shows them all of their power bi reports selectable by a dropdown list. I'm using a service principal which has access to the Premium Workspaces. We are using a Premium Capacity. If a user has less than 50 reports, the website works fine. When a user has more than 50 reports I'm getting the following error:
Status: BadRequest (400)
Response: {"error":{"code":"InvalidRequest","message":"Request exceeds the maximum number of datasets - 50"}}
RequestId: dfd60c00-f508-44e1-a55d-04561c8ae450
This error occurs when the last line of code executes and it tries to generate the token. Any ideas of what I may be doing incorrect? My understanding is there is no limitations on generating tokens in a premium capacity.
// Create a request for getting Embed token
// This method works only with new Power BI V2 workspace experience
var tokenRequest = new GenerateTokenRequestV2(
datasets: datasets,
reports: reports,
targetWorkspaces: targetWorkspaceIds != null ? targetWorkspaces : null
);
// Generate Embed token
var embedToken = pbiClient.EmbedToken.GenerateToken(tokenRequest);
Solved! Go to Solution.
Hi,
Embed token is indeed limited for the number of artifacts (reports/datasets/etc.) that it can allow access to, and it seems that you've hit one of the limitations.
For showing the list of reports you don't actually need the embed token. I guess you only need it when you actually want to render the selected report. Maybe generating a token after the user chooses the report from the list (only for the specific report) can be a solution?
Hello AmosHersch,
That's an interesting thought, however different than the Embed For Customers project template does it and thus the reason I hit this error. I'm not sure how much work it would take to recode it to get the token AFTER the report is selected in the dropdown but I may look at that! Thank you.
Hi,
Embed token is indeed limited for the number of artifacts (reports/datasets/etc.) that it can allow access to, and it seems that you've hit one of the limitations.
For showing the list of reports you don't actually need the embed token. I guess you only need it when you actually want to render the selected report. Maybe generating a token after the user chooses the report from the list (only for the specific report) can be a solution?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 10 | |
| 10 | |
| 4 | |
| 4 | |
| 3 |