Forum Discussion
patmegahan
2 years agoNew 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...
Anonymous
2 years agoNot applicable
Hi patmagahan, did you find a solution for this? We are facing the same issue.
Thanks
patmegahan
2 years agoNew Member
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