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
Anonymous
Not applicable

Service principal raising 401 error - access PBI dataset- DAX query

Hi,

I am trying to use "REST api support for DAX" feature relased by MSFT in aug for public preview.

https://powerbi.microsoft.com/en-us/blog/announcing-the-public-preview-of-power-bi-rest-api-support-...

 

I have been able to query dataset and retreive the result using my creds but the issue is i am not able to succeed with SPN.I have set up SPN the way it has been described in the MSFT document below to allow rest api calls with DAX but i am unable to understand what is blocking the SPN.

https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-porta...

 

I receive "401 unauthorized error " with SPN.

 

My steps:

-created AAD app and SPN

-created AAD security group and added the SPN as member into it

-provided SPN and security group 'admin' access on the PBI workspace

-provided 'dataset.readwrite.all' permission for the app

-added the SPN to allow REST api calls on tenant settings

-Workspace upgraded to v2

 

Am i mising something ? Also,is it required for me the provide the app with tenant.read.all permission? I dont see this as requirement in msft docs but i did see this in some other online discussions.

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous,

As the blog said, this feature is just public preview and it is not released to the stable version. So I think some of the processes may not be up to date. In addition, the blogger also mentions they are working on the document update.

Maybe you can try to contact the power bi team to confirm if any additional settings are required for this new feature.

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Thanks .I will contact MSFT with a ticket and see what is wrong.

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.