Forum Discussion
seeking help to retrieve Power BI Dataset data by Power API
i have created a workspace and granted admin right to the Azure app account.
and i have send API : https://api.powerbi.com/v1.0/myorg/groups/89f9ce17-e8e3-433c-b419-6b2b6d87273c/datasets/8360b63e-a13f-49a7-8cc2-b03f7062e773/executeQueries
which reqest header: data = {
"queries": [
{
"query": "EVALUATE VALUES(TestRedshiftRefresh)"
}
]
}
where TestRedshiftRefresh is the dataset name, but i received error:
{'error': {'code': 'PowerBINotAuthorizedException', 'pbi.error': {'code': 'PowerBINotAuthorizedException', 'parameters': {}, 'details': [], 'exceptionCulprit': 1}}}
Can any people help me? Thanks
6 Replies
- lbendlinSuper User
Careful using VALUES with tables!!!
EVALUATE TestRedshiftRefresh
is probably more appropriate.
Admin rights don't matter. the scope needs to include Read Dataset permissions.
- pennyhoho117Helper IV
i use "query": "EVALUATE (TestRedshiftRefresh)"
also return with same error, and i included Read Dataset permissions already, any other suggestions?
- lbendlinSuper User
Have you checked at jwt.io that the token has the required scope?
- pennyhoho117Helper IV
the https://api.powerbi.com/v1.0/myorg/groups/{group_id}/datasets/{dataset_id}/executeQueries API keeps returning error 401: {'error': {'code': 'PowerBINotAuthorizedException', 'pbi.error': {'code': 'PowerBINotAuthorizedException', 'parameters': {}, 'details': [], 'exceptionCulprit': 1}}}
but i already checked included tenor setting for API calling and Allow service principals to use Power BI APIs
Could you give me suggestions?