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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Ogueddaa
New Member

Revoke Approvals for native database queries in power bi dataflows

I am working on automation scripts for deploying Power BI components, but I am encountering an issue during the deployment of dataflows. This process requires manual approval to execute native SQL queries, which prevents full automation.

I am looking for a way to disable this native query approval directly in the dataflow, but I can't find an option similar to the one in Power BI Desktop, where you can allow the execution of native queries without manual validation.

3 REPLIES 3
rohit1991
Resolver IV
Resolver IV

Currently, Power BI Dataflows does not offer a direct option to disable or bypass the manual approval required for native SQL queries, as it does in Power BI Desktop. This behavior is by design to ensure security and prevent the execution of potentially harmful queries.

Workarounds

  1. Set Up Gateway Credentials in Advance:

    • Ensure that the On-premises Data Gateway is configured with the required data source and credentials before deploying the dataflow.
    • When the gateway credentials are pre-approved, the manual approval prompt for native queries is typically bypassed.
  2. Use Parameters:

    • Avoid using hardcoded SQL queries directly in the dataflow. Instead, use parameters for query parts (e.g., table names or filters).
    • Define these parameters in the dataflow and pass values dynamically through automation.
  3. Power BI REST API:

    • Automate the deployment of dataflows using the Power BI REST API.
    • While the approval prompt cannot be bypassed directly, predefining and deploying queries through the API may help mitigate interruptions.
  4. Set Data Source Privacy Levels:

    • If possible, configure data source privacy levels in the Power BI Service to ensure compatibility and eliminate unnecessary manual checks.
  5. Use a Controlled Deployment Workflow:

    • Create the dataflow in Power BI Desktop or a template with approved queries, then deploy it programmatically to avoid needing approval during runtime.

Hi Hope this helps.

 

v-tangjie-msft
Community Support
Community Support

Hi @Ogueddaa ,

 

Whether the advice given by Poojara_D12 has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.

 

Best Regards,

Neeko Tang

Poojara_D12
Memorable Member
Memorable Member

Hi @Ogueddaa 

 

To bypass native query approval during dataflow deployment:

  1. Use Power BI REST APIs: Deploy dataflows programmatically and ensure data sources are pre-approved in the Power BI Service.
  2. Trusted Connections: Configure a gateway with credentials to avoid manual approval.
  3. Pre-approve Data Sources: Approve native queries in the Power BI Admin portal.
  4. Use JSON Templates: Deploy dataflows with metadata that avoids manual steps.

These methods streamline automation by pre-validating queries and configurations.

 

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.