Forum Discussion
RLS multiple usernames
MIkkelHyldig If you're using the UserPrincipalName function, you can just use the UPN column and filtering on that column will propagate to the rest of your data. Not sure what Power Automate functionality you're trying to unlock that's making that not work - can you elaborate?
- MIkkelHyldig3 years agoHelper II
Hi AllisonKennedy ,
Thanks for your answer.
In Power automate I need to provide a Identity Username in RLS Role Item in action "export to file for PBI reports" and it only seems to work when one Username has one Store. However when a user has multiple stores and needs an exported report for each store I need unique users hence using a new Key-column for RLS. Now, the user [email protected] gets a report for store 7068 three times instead of 7068, then 1001 and then 1002 in three different exported reports.
Thats why I wanted to create, in this example, three unique rows for each store by using three different users: M[email protected], [email protected] and [email protected]. But I dont know how to handle multiple users in UserPrincipal logic for RLS.
Does it makes sense?
Thanks,- AllisonKennedy3 years agoCommunity Champion
I haven't used that action in Power Automate but am looking at it now:
Assuming you can provide the 'identities username' value into PowerAutomate that matches the key, the RLS DAX should be simple
Table[Key] = UserPrincipalName()If I'm undestanding correctly??
- MIkkelHyldig3 years agoHelper II
Hi AllisonKennedy,
Exacatly but UserPrincipalName is [email protected] and not [email protected] so I need the RLS code to UserPrincipalName ([email protected]) = Key [email protected] (but remove 1001 in RLS logic) so it matches. Again, with UserPrincipalName equal to one store, its no problem.
Here is my Power Automate flow: