Forum Discussion
RLS multiple usernames
MIkkelHyldig You may need to use USERNAME() instead of USERPRINCIPALNAME
For reference for others, I'm using this article to find details of the Power BI action (had to look up what info it wanted for the dataset): Export and email a report with Power Automate - Power BI | Microsoft Learn
It worked in my test scenario:
Note that the Identities Username -1 value for dynamic content is using the "Key" column from the database, not the UserPrincipalName. You can use two columns here if you don't have that concatenated in SQL already (I don't have a SQL database in my test tenant so just used manual input to demo).
Run the flow using inputs of 11001 and 11002 as the UPN-Key values and here's the outputs:
HI AllisonKennedy
Are you running the flow Export to File for PBI in a Apply to each flow or simply getting two seperate emails for 11001 and 11002? And second, how can the RLS rule customerkey be equal to username? My username is NAME\Mikkel.Hyldig and the Key column im using is [email protected]?
I have no issues getting the flow to run at its own with the userprincipalname for one store no at a time but when I wrap a Apply to each action around it keeps looping the userprincipalname for the same Store no 7068.