Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Row Level Security DAX Expression not working with USERPRINCIPALNAME()

I'm trying to implement a row level security using the below code but it doesn't work as intended. However, when I replaced USERPRINCIPALNAME() with the actual email address, the RLS filter works. I...
  • aduguid's avatar
    2 years ago

    Try this DAX

    [dept] = MAXX(
        FILTER(
            email_mapping, 
            CONTAINSSTRINGEXACT(TRIM(email_mapping[Permissions]), TRIM(USERPRINCIPALNAME()))
        ),
        email_mapping[Dept]
    )