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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
patmegahan
New Member

Power BI Token Request 256 character limit

I am dealing with an issue where I need to exceed the 256 character limit for the username() field in Power BI while generating an embed token. We have a list of accounts we need to pass in to filter the Data Set. Some Users have around 400 accounts which could total near 2000 characters. We do have Account Groups Ids that would work for most customers by passing in the single Account Group Id. However, some customers need a longer account string that exceeds the 256 char limit. Does anyone have any work-arounds or fixes for exceeding the 256 char limit on the username() field?

2 REPLIES 2
Anonymous
Not applicable

Hi patmagahan, did you find a solution for this? We are facing the same issue.

 

Thanks

Hello,

Yes we found a workaround. The 256 character limit cannot be exceeded, so we added AccountGroups to our Power BI Datamodel. We were then able to assign the Accounts to the AccountGroup and RLS filter the rows by the AccountGroupId instead of the AccountId for each individual account. So instead of passing in 300 accounts, we pass in one AccountGroupId. We then filter "username() = AccountGroupId". This gives us the 300 accounts where AccountGroupId matches. For Accounts without an AccountGroupId we handled this in the UI. If they wanted to select multiple Accounts we provided a list and limited the user to 25 so we would not exceed the limit

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors