Forum Discussion
Anonymize a column user name by RLS
- 1 year ago
Sophie__ Check out my blog article here: Column Level Security - Microsoft Fabric Community
- 1 year ago
Hi Sophie__ ,
Here is a workaround you can try to mask user-specific column data, you need to use a DAX measure.
Create a security table that maps usernames to their allowed visibility.
Link SecurityTable[Username] to your Users table on username.
Apply a standard RLS filter on SecurityTable, such as:
[Username] = USERPRINCIPALNAME()Create this measure Masked User Display:
Masked User Display =
VAR CanSee =
LOOKUPVALUE(
SecurityTable[CanSeeNames],
SecurityTable[Username],
USERPRINCIPALNAME()
)
RETURN
IF(CanSee = TRUE(), SELECTEDVALUE(Users[UserName]), "***")
Use this measure in your visuals, not the original UserName column.
Hope this helps to resolve your issue.
Best Regards,
Chaithra E.
Hi Sophie__ ,
Thank you Greg_Deckler , burakkaragoz for your inputs.
We would like to confirm if you've successfully resolved this issue or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.
Best Regards,
Chaithra E.