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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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-a13...
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
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?
Careful using VALUES with tables!!!
EVALUATE TestRedshiftRefresh
is probably more appropriate.
Admin rights don't matter. the scope needs to include Read Dataset permissions.
i use "query": "EVALUATE (TestRedshiftRefresh)"
also return with same error, and i included Read Dataset permissions already, any other suggestions?
Have you checked at jwt.io that the token has the required scope?
How to check if the return token by API : https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token has required scope?
Go to jwt.io and check if scp (scope) is set correctly.