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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.