Forum Discussion
Block access to power query
- 8 months ago
Hi RP,
This is a common requirement, but unfortunately it’s not possible to fully hide or block access to Power Query if you share a Power BI Desktop (.pbix) file.
Any user who opens a PBIX in Power BI Desktop will always be able to access Transform data and view the Power Query (M) code. Power BI Desktop is a development tool, and there is no supported setting to disable or secure the Power Query editor within a PBIX.
Recommended approaches:
Publish the report to Power BI Service and give users Viewer access or share it via a Power BI App. In this case, users can interact with the report but cannot see Power Query or the underlying transformations.
If users need to build visuals but not see queries, use a thin report connected to a published semantic model. This allows report creation without exposing Power Query logic.
In short, if protecting Power Query logic is required, the PBIX should not be distributed. The Power BI Service is the correct and supported way to achieve this.
Regards,
Mohit
HI New_User_777 ,
Thank you for reaching out to the Microsoft Community Forum.
Hi mohit_sakhare and cengizhanarslan , Thank you for your prompt responses.
Hi New_User_777 , Could you please try the proposed solutions shared by mohit_sakhare and cengizhanarslan ? Let us know if you’re still facing the same issue we’ll be happy to assist you further.
Regards,
Dinesh
HI New_User_777 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh