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.
Sophie__ Check out my blog article here: Column Level Security - Microsoft Fabric Community