Dynamic RLS USERNAME() Blank Result Fix
Note: This section contains one or more sets of questions with the same scenario and problem. Each question presents a unique solution to the problem. You must determine whether the solution meets the stated goals. More than one solution in the set might solve the problem. It is also possible that none of the solutions in the set solve the problem. After you answer a question in this section, you will NOT be able to return. As a result, these questions do not appear on the Review Screen. Your network contains an on-premises Active Directory Domain Services (AD DS) domain named contoso.com that syncs with a Microsoft Entra tenant by using Microsoft Entra Connect. You have a Fabric tenant that contains a semantic model. You enable dynamic row-level security (RLS) for the model and deploy the model to the Fabric service. You query a measure that includes the USERNAME() function, and the query returns a blank result. You need to ensure that the measure returns the user principal name (UPN) of a user. Solution: You add user objects to the list of synced objects in Microsoft Entra Connect. Does this meet the goal?
Community Votes
60% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
Tests knowledge of identity synchronization prerequisites for dynamic row-level security; the trap is confusing sync scope with DAX functions.
Resolving blank results from the USERNAME() function in Power BI semantic models by ensuring user UPNs are synchronized to Microsoft Entra ID via Entra Connect.
Selecting No and suggesting USERPRINCIPALNAME(); while USERPRINCIPALNAME() is often preferred, the root cause of a blank result is missing identity data in the cloud directory, not just the DAX function choice.
Community Discussion (5 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
The USERNAME function relies on the authenticated user's identity being present and valid within the target service (Microsoft Entra ID). If the query returns a blank result, it indicates that the user object does not exist or lacks the necessary attributes in the cloud tenant. By adding user objects to the list of synced objects in Microsoft Entra Connect, you ensure that the user account exists in Entra ID with its attributes (including UPN) populated. This allows the authentication flow to succeed and the USERNAME function to return the correct value.Why the Other Options Are Wrong
Choosing "No" implies that syncing users is incorrect or insufficient. While some experts argue that USERPRINCIPALNAME is more explicit than USERNAME, the fundamental issue causing a blank result is the absence of the user in the identity store. Without the user object in Entra ID, no DAX function will return a valid UPN. Therefore, fixing the sync configuration is the primary and correct step to resolve the connectivity/identity gap.Community Comment Notes
Community feedback is split, with many voting for 'Yes' based on the logic that identity must be present first. One commenter noted that USERPRINCIPALNAME should be used to ensure UPN retrieval, but this overlooks the prerequisite of having the user object synced. Another comment affirmed the 'Yes' answer, highlighting that default sync settings might exclude certain users or attributes, requiring explicit inclusion.Official Reference
Exam Strategy
When troubleshooting blank values in RLS functions, always check the identity layer first. Ensure the user is synced and has the required claims before optimizing the DAX measure.
Frequently Asked Questions
Why does USERNAME() return blank if the user is in AD?
Because the user object must be synced to Microsoft Entra ID. If it's not in the sync list, it doesn't exist in the cloud identity store.
Is USERPRINCIPALNAME() better than USERNAME()?
USERPRINCIPALNAME() is often safer for clarity, but both require the user to be successfully authenticated and present in the directory.
Related Analysis
Practice All DP-600 Questions
Access 115 questions with complete answers and detailed explanations.
View Full DP-600 Practice Test →