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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dottorp
Frequent Visitor

Token acquisition ends with "Unauthorized"

I'm trying to embed a PBI report in a Web app.

I configured the App as "native app", and then granted authorizations you can see in these screenshots:

AAD.PNGpbi.PNG

I'm using this sample: https://github.com/Microsoft/PowerBI-Developer-Samples/
(App Owns data). Now I'm receiving the "Unauthorized" (401) error. What am I missing?

 

1 ACCEPTED SOLUTION

Solved by myself. I was trying to get a report from "Personal workspace" (I don't know if this is his name in english, I use it in italian), and this was the error. By creating a new workspace area it went all fine.

View solution in original post

4 REPLIES 4
Eric_Zhang
Employee
Employee

@dottorp

Which line in the code throws the exception? Can you debug and send the access token in your case in private message? Also ensure the groupid is correct and the account used is the admin of the workspace group.

The line is this:

var reports = await client.Reports.GetReportsInGroupAsync(GroupId);

I took the value for GroupId here:image.png

 

 

 

Solved by myself. I was trying to get a report from "Personal workspace" (I don't know if this is his name in english, I use it in italian), and this was the error. By creating a new workspace area it went all fine.

Hey,

 

I have try the some and I have the some problem. 

powerb-tenant.jpgpowerb-tenant.jpg

 

Did you finde solution?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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