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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Marcin_Bugala
New Member

Rest API - 401 PowerBINotAuthorizedException - some datasets

Hello 🙂 

I am strugling with Rest API 401 response when trying:

 

 

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

 

 

I have an app, app have acces to all write/read options, config for it is 100% good. 

 

I wrote script in python to read data about all datasets in given workspace.

Then I use that, to query all of the datasets. On one workspace I query 16 datasets, an recive error on 6 datasets. Other 10 queries results are perefctly good result. 


App is admin on workspace, DAX queries are simple and different, examples below.  I cannot find anything in common for this datasets which blocks me from geting expected results. 

 

 

 

dax query = EVALUATE ROW("******* Report", ROUND( 'MEASURES_TABLE'[Current Measure), 0))

Dataset info: {'@odata.context': 'http://wabi-north-europe-g-primary-redirect.analysis.windows.net/v1.0/myorg/groups/*******/$metadata#datasets/$entity',
 'id': '*******',
 'name': '******* Report',
 'expressions': [],
 'roles': [],
 'webUrl': 'https://app.powerbi.com/groups/*******/datasets/*******',
 'addRowsAPIEnabled': False,
 'configuredBy': '*******',
 'isRefreshable': True,
 'isEffectiveIdentityRequired': False,
 'isEffectiveIdentityRolesRequired': False,
 'isOnPremGatewayRequired': False,
 'targetStorageMode': 'Abf',
 'createdDate': '2023-01-12T13:36:13.71Z',
 'createReportEmbedURL': 'https://app.powerbi.com/r*******',
 'qnaEmbedURL': 'https://app.powerbi.com/qnaEmbed*******,
 'upstreamDatasets': [],
 'users': []}

 

 

 

 

 

dax query = EVALUATE ROW("***** CY", ROUND(COUNTROWS(\'DATA_DWH\'), 0))

Dataset info: {'@odata.context': 'http://wabi-north-europe-g-primary-redirect.analysis.windows.net/v1.0/myorg/groups/*********/$metadata#datasets/$entity',
 'id': '*********',
 'name': '(********* CY',
 'expressions': [],
 'roles': [],
 'webUrl': 'https://app.powerbi.com/groups/8*********/datasets/*********',
 'addRowsAPIEnabled': False,
 'configuredBy': '*********',
 'isRefreshable': True,
 'isEffectiveIdentityRequired': True,
 'isEffectiveIdentityRolesRequired': True,
 'isOnPremGatewayRequired': True,
 'targetStorageMode': 'Abf',
 'createdDate': '2022-11-30T11:23:11.617Z',
 'createReportEmbedURL': 'https://app.powerbi.com/reportEmbed?config=*********',
 'qnaEmbedURL': 'https://app.powerbi.com/qnaEmbed?config=*********',
 'upstreamDatasets': [],
 'users': []}

 

 

 

Below dataset which is working fine: 

 

 

{'@odata.context': 'http://wabi-north-europe-g-primary-redirect.analysis.windows.net/v1.0/myorg/groups/********/$metadata#datasets/$entity',
 'id': '********',
 'name': '******** Check',
 'expressions': [],
 'roles': [],
 'webUrl': 'https://app.powerbi.com/groups/********/datasets/********',
 'addRowsAPIEnabled': False,
 'configuredBy': '********',
 'isRefreshable': True,
 'isEffectiveIdentityRequired': False,
 'isEffectiveIdentityRolesRequired': False,
 'isOnPremGatewayRequired': False,
 'targetStorageMode': 'Abf',
 'createdDate': '2022-11-30T09:05:26.407Z',
 'createReportEmbedURL': 'https://app.powerbi.com/reportEmbed?config=********',
 'qnaEmbedURL': 'https://app.powerbi.com/qnaEmbed?config=********',
 'upstreamDatasets': [],
 'users': []}

 

 

1 REPLY 1
mattiasdesmet
Resolver II
Resolver II

Does the dataset where it fails have RLS enabled? 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors