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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
AshtonDeLano
Frequent Visitor

Can refresh dataset in app.powerbi.com but cannot execute queries against it

 

I am trying to execute a query to get a table out of a dataset using Azure Data Factory web activity. I am using the following documentation:

 

https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/execute-queries-in-group

 

The following API call:

 

 

POST https://api.powerbi.com/v1.0/myorg/groups/{groupID}/datasets/{datasetID}/executeQueries/


Body: {
"queries": [
{
"query": "EVALUATE VALUES('{table name}')"
}
],
"serializerSettings": {
"includeNulls": true
},
"impersonatedUserName": {myAdmin@Email.com}
}


Authentication: System Assigned Managed Identity

Resource: https://analysis.windows.net/powerbi/api

 

 

 

Returns the following error: {"error":{"code":"PowerBINotAuthorizedException","pbi.error":{"code":"PowerBINotAuthorizedException","parameters":{},"details":[],"exceptionCulprit":1}}}

 

However, the API call below does execute successfully:

 

 

 

POST https://api.powerbi.com/v1.0/myorg/groups/{groupID}/datasets/{datasetID}/refreshes/

body: {
"retryCount": 0
}

Authentication: System Assigned Managed Identity

Resource: https://analysis.windows.net/powerbi/api

 

 

 

As far as I am aware, I have enabled all necessary permissions in the admin portal of app.powerbi.com. If the POST call to refresh a dataset is working, I do not know why the executeQueries API call is not working.

 

Is there something I am missing about permissions in the workspace in app.powerbi.com?

 

 

 

2 REPLIES 2
lbendlin
Super User
Super User

Do you have "Build"  permissions against the semantic model?

Yes. Both the Data Factory and the impersonatedUserName have Workspace Admin and All Permissions Granted.

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors