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!View all the Fabric Data Days sessions on demand. View schedule
I have a React Web App that embeds multiple Power BI reports using the "Embed for your customers" scenario (App owns data).
✅ Import Mode Reports (with RLS applied in Power BI workspace)
I use an Effective Identity object in the embed token request, specifying Username, Roles, and Dataset, and everything works as expected.
❌ DirectQuery Reports (data from an Azure SQL Database where RLS is applied)
BadRequest{"error":{"code":"InvalidRequest","message":"Identity blob value size exceeds size limit of 10240 bytes"}
Any guidance or best practices would be greatly appreciated. Thanks!
Solved! Go to Solution.
Hi @v-nmadadi-msft ,
I can't configure group claims or app roles in the token for Azure SQL. Only Microsoft can do that, since they own the resource "https://database.windows.net" and determine which claims are included when a token is requested.
The only way this currently works is if the user has fewer than 160 AD groups or more than 200 AD groups. In the latter case, Azure AD replaces the group IDs in the "groups" claim with a Graph API URL, significantly reducing the token size.
I’ve received confirmation from Microsoft that there’s no workaround for this. I’ve submitted a Design Change Request to increase the identityBlob size limit from 10,240 bytes to at least 12,500 bytes, ensuring that tokens for users with around 160-200 AD groups can be accepted by the Power BI API /GenerateToken endpoint. Now, we’ll just have to wait for Microsoft to implement this fix.
Hi @kristofferrye ,
Thanks for reaching out to the Microsoft fabric community forum.
Please make sure all the parameter values like workspace ID, Report ID etc are correct while passing the token.
Since you are encountering the issue while using DirectQuery Reports from Azure SQL Database where RLS is applied, if possible temporarily disable the RLS and check if embedding is working or not so as to pin point where exactly the problem is arising from.
-> You cannot exclude the "groups" claim when requesting an Azure SQL access token.
-> No, the identityBlob size limit (10,240 bytes) is a hard limit imposed by the Power BI API, and there is currently no way to increase it.
-> It is sufficient to specify identityblob and datasets when generating embed token for Power Bi report that uses DirectQuery with Azure SQL
-> Please check out this reference document: Embed Power BI report in a Power BI embedded analytics application for your customers - Power BI | M...
If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS.
Thanks and Regards
Thanks for your response @v-nmadadi-msft !
I checked out the link you sent (Embed Power BI report in a Power BI embedded analytics application for your customers - Power BI | M...) but it doesn't mention any best practice when it comes to DirectQuery reports with this identityBlob.
The issue is occurring with the Power BI API endpoint "GenerateToken" and can be replicated for example in Postman for example by making a POST request to:
https://api.powerbi.com/v1.0/myorg/groups/<WORKSPACE_ID>/reports/<REPORT_ID>/GenerateToken
(replace <WORKSPACE_ID>, <REPORT_ID>, and <DATASET_ID> with real values), and with this body:
{
"accessLevel": "View",
"identities": [
{
"datasets": [
"<DATASET_ID>"
],
"identityBlob": {
"value": "eyJ0eX....AAA="
}
}
]
}
(just with a real value for the identityBlob ). If the identityBlob value exceeds 10,240 bytes, the API returns the following error: "Identity blob value size exceeds size limit of 10240 bytes". This error occurs regardless of whether the report uses a DirectQuery dataset.
I tested this issue with a colleague who has fewer Azure AD group memberships than me. When using his access token in the identityBlob, the API successfully returned an embed token, since that token was smaller.
(In fact, any string under 10,240 bytes can be passed into identityBlob to get an embed token—but authentication inside the embedded report to the database would fail if it's just a ranom value). So it seems that this functionality only works for users with very few AD group memberships. Since my Azure SQL token contains a few extra AD groups in the "groups" claim, it becomes too large to use in the identityBlob.
Trying to solve this, I tested different OAuth authentication flows to obtain an Azure SQL access token using scope: "https://database.windows.net//.default" to see if that made any difference regarding the claims in the token.
When I hardcoded an Azure SQL token obtained via Implicit Flow into my app and used it as value in the identityBlo, I was finally able to access the Power BI report data using DirectQuery 😀
Hi @kristofferrye,
Thanks for reaching out to the Microsoft fabric community forum.
Glad that you were able to pin point where the issue specifically occurs.
To try to solve issue related to full groups claim please refer to this reference document:
Configure group claims and app roles in tokens | Microsoft Learn
Also as per this document
Microsoft identity platform and OAuth 2.0 implicit grant flow - Microsoft identity platform | Micros...
Implicit grant flow should be avoided.
I hope these documents help guide you in the right direction toward resolving the issue.
If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS.
Thanks and Regards
Hi @v-nmadadi-msft ,
I can't configure group claims or app roles in the token for Azure SQL. Only Microsoft can do that, since they own the resource "https://database.windows.net" and determine which claims are included when a token is requested.
The only way this currently works is if the user has fewer than 160 AD groups or more than 200 AD groups. In the latter case, Azure AD replaces the group IDs in the "groups" claim with a Graph API URL, significantly reducing the token size.
I’ve received confirmation from Microsoft that there’s no workaround for this. I’ve submitted a Design Change Request to increase the identityBlob size limit from 10,240 bytes to at least 12,500 bytes, ensuring that tokens for users with around 160-200 AD groups can be accepted by the Power BI API /GenerateToken endpoint. Now, we’ll just have to wait for Microsoft to implement this fix.
Hi @kristofferrye,
We really appreciate your efforts and for letting us know the update on the issue.
Happy to know that you got the confirmation on how to work around your error, Please consider accepting your reply as the solution so that it will be helpful to other community members who may face similar issue in the future and come across this Post.
Please continue using fabric community forum for your further assistance.
Thanks and Regards
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!