
Answer-first summary for fast verification
Answer: Yes
The solution meets the goal because the USERPRINCIPALNAME() function in Microsoft Fabric/Power BI returns the user principal name (UPN) of the authenticated user, which is exactly what is needed. The USERNAME() function returns the domain username in the format 'DOMAIN\username', which may result in a blank if the user context is not properly resolved in the on-premises AD DS to Microsoft Entra sync scenario. The community discussion shows 100% consensus with upvoted comments confirming that USERPRINCIPALNAME() is the correct function to return the UPN.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You have a Fabric semantic model with dynamic row-level security (RLS) enabled. When you query a measure that uses the USERNAME() function, it returns a blank result. You need the measure to return the user principal name (UPN) of the user.
Solution: You update the measure to use the USERPRINCIPALNAME() function.
Does this solution meet the goal?
A
Yes
B
No