Forum Discussion
RLS multiple usernames
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,
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:- AllisonKennedy3 years agoCommunity Champion
MIkkelHyldig I think if you update the power automate to use the 'key' column instead of the UPN value that should do the trick? I think... let me know if it works as I haven't used that action in Power Automate so will be interested to know if you can 'cheat' the UPN in that way.
- MIkkelHyldig3 years agoHelper II
Hi AllisonKennedy,
Key doesnt work unless my DAX handles the UserPrincipalName+StoreNo to equal UserPrincipalName. Im working on the issue later this week and will give a solution if found.
Thanks for the inputs so far!