Forum Discussion
UserName() DAX function returns a GUID on PowerBI
Yes, I have the same problem!
UserName() works fine in PBI Desktop but shows something like "10037FFEBDC1B 3fe697b9-2e85-33…. " in PBI online.
I'm trying to filter rows using the actual user. Is it possible using Power BI??
Thanks!
- greggyb10 years agoResident Rockstar
USERNAME() in the PBI Service returns the user name of the Microsoft service account for that instance of the server. (This is an educated guess, haven't had a concern to actually verify).
If the goal is to apply row-level security in Power BI, the only actually secure method is to use DirectQuery against a SSAS cube or a SQL data source that has row-level security. The Power BI Power Pivot model **CANNOT** support row-level security.
When performing a direct query, the Power BI Service will pass along the currently logged in user's credentials for authentication against the data source, returning only data that that user's role is allowed to see based on the security criteria.