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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
jay-sr
Regular Visitor

401 Error on executeQueries API Call – Suspected Configuration Change

Hello Power BI Community,

I'm experiencing an issue with the executeQueries endpoint in the Power BI REST API. My application successfully retrieves an auth token, which appears to be valid, but when I call executeQueries, I receive a 401 Unauthorized error. This functionality was working fine previously, and I haven't made any code changes.

Here are the details I've verified so far:

  • Auth Token: Obtained successfully with the correct audience (https://login.microsoftonline.com/${tenantId}/oauth2/v2.0/token) and expected scopes.

  • Authorization Header: I'm including the header as Authorization: Bearer my_token.

  • App Registration & Permissions: The app registration in Azure AD has the necessary API permissions (such as "roles": ["Tenant.Read.All"],), and I've ensured that admin consent is in place.

  • Recent Changes: There haven't been any changes on the code side; I'm wondering if a recent configuration update or policy change on the Power BI service or within my tenant might be affecting this API call.

Has anyone else encountered this issue recently, or does anyone have insights into possible configuration changes that could cause a 401 error on executeQueries? Any troubleshooting tips or guidance would be greatly appreciated.

Thank you in advance for your help!

4 REPLIES 4
v-pagayam-msft
Community Support
Community Support

Hi @jay-sr ,
I wanted to check in on your situation regarding the issue. Have you resolved it? If you have, please consider marking the reply that helped you or sharing your solution. It would be greatly appreciated by others in the community who may have the same question

Thank you.

v-pagayam-msft
Community Support
Community Support

Hi @jay-sr ,
we haven't heard back from you regarding our last response and wanted to check if your issue has been resolved.
If our response addressed your query, please mark it as Accept Answer and click Yes if you found it helpful.
If you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!

v-pagayam-msft
Community Support
Community Support

Hi @jay-sr ,
Thank you @Deku for the prompt response!

May I ask if you have gotten this issue resolved?
If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.
Thank you.


Deku
Community Champion
Community Champion

Has the SPN permissions on the workspace or dataset changed? 

Try calling get datasets in group or something to test if it is just API.

Are you calling DMV or info functions?


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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