Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello experts,
I have installed a custom connector on an on-premises gateway. Within the connector, I am using Value.NativeQuery (with query folding enabled).
However, when setting up the connection in the Power BI service, I get an error. The gateway log contains the following message: Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.MashupDataAccessPermissionException: The evaluation requires a permission that has not been provided. Data source kind: ‘...’. Data source path: ‘...’. Permission kind: ‘NativeQuery’.
Do you know what else I need to set up so that I can use the connector?
The custom connector works in Power BI Desktop, so native queries can be executed in principle.
Do you have any idea what I'm doing wrong?
Thank you very much.
Solved! Go to Solution.
Hi @Tanito1
1. Ensure the custom connector supports native query approval
In your connector’s pq or m code, the Value.NativeQuery call triggers a permission check. In Desktop, you click “Run” when it asks to approve a native query. In the service, you must define that the connector can handle it without UI approval. This is done by:
If your connector is not coded to explicitly declare native query capability, the service will block it.
2. Configure the gateway data source permissions
In the Power BI Service:
If the connector requires native query execution, you must reauthenticate it here. The service then stores the equivalent of the “approve native query” setting that Desktop uses locally.
3. Test the same source without native query
To confirm that the issue is indeed native query permission, try calling the same source using Table.SelectRows or other folding-friendly queries without Value.NativeQuery. If it works, then the only missing piece is the native query permission setting.
4. Deploy the connector to the gateway correctly
Custom connectors must be placed in the correct folder on the gateway server:
C:\Users\<GatewayServiceAccount>\Documents\Power BI Desktop\Custom Connectors
The gateway service account must have permission to read the .mez file.
After placing the file, restart the gateway service.
5. Sign-in match between Desktop and Service
Sometimes the native query permission in Desktop is tied to your local credentials. Make sure the credentials configured in the Service for the gateway match the exact authentication type and user account you tested with in Desktop.
Hi @Tanito1
1. Ensure the custom connector supports native query approval
In your connector’s pq or m code, the Value.NativeQuery call triggers a permission check. In Desktop, you click “Run” when it asks to approve a native query. In the service, you must define that the connector can handle it without UI approval. This is done by:
If your connector is not coded to explicitly declare native query capability, the service will block it.
2. Configure the gateway data source permissions
In the Power BI Service:
If the connector requires native query execution, you must reauthenticate it here. The service then stores the equivalent of the “approve native query” setting that Desktop uses locally.
3. Test the same source without native query
To confirm that the issue is indeed native query permission, try calling the same source using Table.SelectRows or other folding-friendly queries without Value.NativeQuery. If it works, then the only missing piece is the native query permission setting.
4. Deploy the connector to the gateway correctly
Custom connectors must be placed in the correct folder on the gateway server:
C:\Users\<GatewayServiceAccount>\Documents\Power BI Desktop\Custom Connectors
The gateway service account must have permission to read the .mez file.
After placing the file, restart the gateway service.
5. Sign-in match between Desktop and Service
Sometimes the native query permission in Desktop is tied to your local credentials. Make sure the credentials configured in the Service for the gateway match the exact authentication type and user account you tested with in Desktop.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 56 | |
| 55 | |
| 31 | |
| 17 | |
| 14 |