Forum Discussion
user principal name (UPN) question
- 1 year ago
New_worker I think it will not fully meet the goal. Syncing user objects via Microsoft Entra Connect is necessary but insufficient on its own. You also need to configure RLS roles properly and consider using USERPRINCIPALNAME() instead of USERNAME() to ensure the UPN is returned correctly.
New_worker Yes, USERPRINCIPALNAME() should be used to get the UPN in Power BI. The issue with USERNAME() returning a blank result likely arises due to missing user objects in Entra Connect. Adding user objects to the sync list should resolve this. For more info, refer to the Power BI RLS documentation.
If this post helped please do give a kudos and accept this as solution
Thanks In Advance
Hi Akash_Varuna
Thanks for your reply. As my understanding, syncing user objects via Microsoft Entra Connect is a necessary precondition. But we still need other actions to make username() return the correct value in the model, right..So, I am not sure the answer should be Yes or No for this question....
- Akash_Varuna1 year ago
Super User
New_worker I think it will not fully meet the goal. Syncing user objects via Microsoft Entra Connect is necessary but insufficient on its own. You also need to configure RLS roles properly and consider using USERPRINCIPALNAME() instead of USERNAME() to ensure the UPN is returned correctly.