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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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