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

Lock project to specific users - Power Query

Hello,

 

Random question.  I have a non-hosted Power Bi desktop file (I know I know) which I would like to lock down to a specific handful of users.

 

I've used USERPRINCIPALNAME in DAX to break some measures if you're name doesn't match.  There's a lot of data manipulation in my Power Query section on the load into Power Bi.  I was wondering if there's some similar simple code I can add to the script that will check the username and only do the rest of the data manipulation if you're on the list?

 

Many Thanks

1 ACCEPTED SOLUTION

Hey @Anonymous ,

 

if you have a PBIX file and want to limit what the users see, you only have 2 options:

1. Live connection to a SSAS cube or Power BI dataset.

2. Direct Query to a relational database.

 

In both cases the security would be implemented in the datasource. If you or anyone with full access opens the file the correct data will be returned, otherwise only the data that the user are allowed to see will be returned.

But if you import the data into a Power BI Desktop file anyone can remove a role or see the whole data.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

3 REPLIES 3
selimovd
Super User
Super User

Hey @Anonymous ,

 

when it's a not hosted PBIX file and you use import mode, then everyone will see all the data.

If you host it you can use roles to match the current user and his access:

Row-level security (RLS) with Power BI - Power BI | Microsoft Docs

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 
Anonymous
Not applicable

Yeah that's very useful for when I eventually host it thanks.  I'm looking for a way to keep it under control while it's not hosted.  It's very all or nothing, either they're a member of a small handful so should see everything, or I want to break as much of it as I can. 

Hey @Anonymous ,

 

if you have a PBIX file and want to limit what the users see, you only have 2 options:

1. Live connection to a SSAS cube or Power BI dataset.

2. Direct Query to a relational database.

 

In both cases the security would be implemented in the datasource. If you or anyone with full access opens the file the correct data will be returned, otherwise only the data that the user are allowed to see will be returned.

But if you import the data into a Power BI Desktop file anyone can remove a role or see the whole data.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

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.