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

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.

Reply
brittaf2002
Frequent Visitor

401 unauthorized response only for a single report when using report pages REST API

Cross posting in case I placed this in the wrong forum. 

 

We have a customer who is getting a 401 unauthorized only for the report pages API using a service principal. 

 

They are successfully able to run these APIs without any issue: 

https://learn.microsoft.com/en-us/rest/api/power-bi/groups/get-groups

https://learn.microsoft.com/en-us/rest/api/power-bi/reports/get-reports-in-group

and even https://learn.microsoft.com/en-us/rest/api/power-bi/reports/get-pages-in-group for one report, but this last API doesn't work for one of the other reports, and the error is the following:

 

 

HTTP error code 401 Unauthorized. 
 {
  "error" : {
    "code" : "PowerBINotAuthorizedException",
    "pbi.error" : {
      "code" : "PowerBINotAuthorizedException",
      "parameters" : { },
      "details" : [ ],
      "exceptionCulprit" : 1
    }
  }
}

 

 

I was not aware of any specific permissions which applies to report pages. Why would we get this error for one particular report? Are there circumstances where we can't query the pages for some reports due to authorization?

 

1 ACCEPTED SOLUTION
brittaf2002
Frequent Visitor

I'll update this in both places I've posted this question. I found the issue and I believe this is a bug in the REST APIs. The issue occurs when the report uses a dataset belonging to a workspace the service principal doesn't have access to. But why the pages api? The reports in group api works fine. Is there anywhere in the documentation that this is explained?

View solution in original post

1 REPLY 1
brittaf2002
Frequent Visitor

I'll update this in both places I've posted this question. I found the issue and I believe this is a bug in the REST APIs. The issue occurs when the report uses a dataset belonging to a workspace the service principal doesn't have access to. But why the pages api? The reports in group api works fine. Is there anywhere in the documentation that this is explained?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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