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

[PowerBI] GetReportInGroupWithHttpMessagesAsync return Unauthorized

Hello everyone,

I have followed this MS tutorial on embed PowerBI reports: https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-sample-for-customers?tabs=net-co... and got the infamous "Operation returned an invalid status code 'Unauthorized'" error.

Jaji_Tooling_0-1681375143513.png

I am willing to use a technical account to display internal reports to my company (using the "embed for your customers" method). This technical account have every possible rights on AzureAD, and is also admin on the PowerBI workspaces. While using it directly, I can see the reports in PowerBI without any trouble.

I have a "Premium Per User" licence type :

Jaji_Tooling_2-1681375814619.png

 

I am trying to use the "MasterUser" authentication method :

Jaji_Tooling_1-1681375784191.png

(When using the direct link using the WorkspaceId/ReportId in Chrome or Edge, I have no trouble seeing the report with this account)


NuGet is up to date asof April 2023 with version 4.13.0 :

Jaji_Tooling_3-1681375992179.png


Code is now async but the call is unchanged, and the authentifation method is using the code given in exemple here : https://github.com/microsoft/PowerBI-Developer-Samples/tree/master/.NET%20Core/Embed%20for%20your%20...

Jaji_Tooling_4-1681376076433.png


The AzureAd right for this account (aka the complete list of rights):

Jaji_Tooling_5-1681377359447.png


On PowerBI > Admin Portal > Tenant Settings, I have allowed access to the PowerBI API without restriction (Entire organization). I also have admin access to the workspaces, datasets, reports, apps...

 

I must have read dozens of forms post... I am getting crazy over this, and I just can't seem to understand what is wrong with my method to see reports. I tried using iFrame and the reports can be shown that way, but I need to authenticate myself and I can't do this for a corporate visual management tool.

Can you provide any help please ?

0 REPLIES 0

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.

Top Solution Authors
Top Kudoed Authors