The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Power BI Experts,
I observed a strange issue in dynamic RLS where i added employee mail id in desktop level using userprinciplename() dax function. It is working fine for few mail id for example "xyz@company.com" but in our client organization we have different mail id's are there for example "xyz@company.onmicrosoft.com" & "xyz@company1.company.com". Here what is happening is i am able to see the proper data for xyz@company.com but i am not able to see other mail id's data for different employees("xyz@company.onmicrosoft.com" & "xyz@company1.company.com"). What function i need to use for this mail id employees i have used userprinciplename() function for my development. Please suggest. Thanks.
Solved! Go to Solution.
@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, username@contoso.com."
Please refer help as well: https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls#:~:text=Within%20Power%20BI%20Desk...).
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@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, username@contoso.com."
Please refer help as well: https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls#:~:text=Within%20Power%20BI%20Desk...).
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
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?