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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
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?
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
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.