Forum Discussion
Dynamic RLS using Userprinciplename()
- 4 years ago
prakash11440278
You need to first define the username names (Emai IDs) that the users will use to connect to the Power BI service.
"You can use username() within this expression. Be aware that username() has the format of DOMAIN\username within Power BI Desktop. Within the Power BI service and Power BI Report Server, it's in the format of the user's User Principal Name (UPN). Alternatively, you can use userprincipalname(), which always returns the user in the format of their user principal name, [email protected]."
Please refer help as well: https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls#:~:text=Within%20Power%20BI%20Desktop%2C%20username,User%20Principal%20Name%20(UPN).
prakash11440278
You need to first define the username names (Emai IDs) that the users will use to connect to the Power BI service.
"You can use username() within this expression. Be aware that username() has the format of DOMAIN\username within Power BI Desktop. Within the Power BI service and Power BI Report Server, it's in the format of the user's User Principal Name (UPN). Alternatively, you can use userprincipalname(), which always returns the user in the format of their user principal name, [email protected]."
Please refer help as well: https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls#:~:text=Within%20Power%20BI%20Desktop%2C%20username,User%20Principal%20Name%20(UPN).
- prakash114402784 years ago
Post Prodigy
Hi Fowmy ,
Thanks for your reply.
You mean to say i need to use the username() function instead of userprinciplename() function?
I have used email=userprinciplename() expression in my model and this one not working because of different mail id's what i showned in above. How to handle this situation?