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
Drizzle
New Member

Request a power bi rest API got "operation returned an invalid status code 'Unauthorized'"

We have an application allows user to login then load own power bi data via reset API such as "https://api.powerbi.com/v1.0/myorg/dashboards",  some users can request the data successed but some always got "operation returned an invalid status code 'Unauthorized'". Decode the jwt token found that the "scp" field in payload only listed "Capacity.Read.All" if user request failed.  on the contrary, there are lot of permissions listed in "scp" if the jwt token can request the data.

Why are these differences in the same clientid? How can we fix it? 

Thanks.

1 ACCEPTED SOLUTION
Drizzle
New Member

We found out why some users request the power bi data failed via same clientid.

It seems the root cause is the app not granted the power bi services API permissions when the user first consent. it always apply the old consent event though we've updated the API permissions.

 

The Azure portal prompt that "You are editing permission(s) to your application, users will have to consent even if they’ve already done so previously." when update the API permissions. but there is another hints "Starting November 9th, 2020 end users will no longer be able to grant consent to newly registered multitenant apps without verified publishers."

 

Not sure if it has anything to do with it.

View solution in original post

1 REPLY 1
Drizzle
New Member

We found out why some users request the power bi data failed via same clientid.

It seems the root cause is the app not granted the power bi services API permissions when the user first consent. it always apply the old consent event though we've updated the API permissions.

 

The Azure portal prompt that "You are editing permission(s) to your application, users will have to consent even if they’ve already done so previously." when update the API permissions. but there is another hints "Starting November 9th, 2020 end users will no longer be able to grant consent to newly registered multitenant apps without verified publishers."

 

Not sure if it has anything to do with it.

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors