Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

RLS When Using Power BI Service Data Connector

We are connecting our PBI file to an existing dataset on a Premium workspace using the Power BI Service data connector (Open up Power BI Desktop>Get Data>Power BI Service). The existing dataset on the service is using Row-Level Security which uses the UserName() function in Dax. When I connect my new PBI file pointed to the service's dataset the UserName() is returning NT Authority\System. Has anyone run into this, how would I return the username of whomever is running the report? I assume since I am not logging into app.powerbi.com directly to access this dataset, it has no idea of who I am, so it's returning the System account. Anyone using this method with RLS and have a working solution?

3 REPLIES 3
v-yuezhe-msft
Employee
Employee

@Anonymous,

I can reproduce your issue, I will consult this issue internally, and post back.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Any update to this? We have the same issue. Our Users work with Power BI Desktop using direct Connection to datasets in the service.

slomkak
Regular Visitor

It has been a long time, but this issue still occurs. 

 

It can be solved by adding a role to a dataset. It is very similiar to below case:

Using Username() in DAX with Row-Level Security | Microsoft Power BI Blog | Microsoft Power BI

It seems that with workspaces in shared capacities USERNAME() returns a guid value, while in Premium capacitites it returns "NT AUTHORITY\SYSTEM". 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.