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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Security Concern: PowerQuery w/Credentials in M Code

Hi all,

 

We are connecting to our data by way of a Rest API and Power Query (thank you @artemus!)..  One area of minor concern is that our company users can download Power BI Projects (PBIX files) from PowerBI.com once they are published. After downloaded the employee can open the Power Query, select Advance Editor, and have a clear view of the connection details.  It is only a low level concern due to the number of users with access, but I don't see anyway of adding even basic password protecting akin to Excel or VBA.  Correct?

 

In an effort to resolve, it looks like I may be able to shield it using a Data Flow  My thought is build a Power Query (with API details) within the Data Flow, not the project.  The Power BI project (which they can still download) would connect directly to the Data Flow, but would not be able to view the API query code.

 

Is that the correct understanding?  As long as they aren't admin, they couldn't download or access the API details behind the data flow?  I understand the trade-off that the Data Flow needs to be schedule refreshes (its cached data), but we don't need real-time data and that may actually be faster.  My larger concern is whether they can see the query code written in the data flow..

1 REPLY 1
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

the below post has a solution, please refer.

https://community.powerbi.com/t5/Report-Server/Disabling-download-of-pbix-files/m-p/312217/highlight/true#M2570

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors