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

The Fabric community is now in read-only for platform upgrade. Learn more

Reply
MurugeshPeurmal
New Member

Error while retrieving Embed URL: Unauthorized: 401

For powerbi embedded, we created service principal in Microsoft Entra (Azure portal):

 

For which we need to provided it required PowerBi services - Report.ReadAll, Tenant.ReadAll

 

In our Fabric workspace we added this service principal as admin via manage access so that it can access workspace.

 

Till here its done and is active.

 

Now from our code we did following below steps:

 

1. Get access token from Microsoft entra for service principal - success

 

2. Generate token for the report inside the workspace - every time fails here with different methods

1 REPLY 1
v-achippa
Community Support
Community Support

Hi @MurugeshPeurmal,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Since the service principal is successfully getting the entra access token, the authentication is working correctly. The issue is most likely with the power bi or fabric configuration required to generate the embed token.

  • Please verify that Service principals can use Fabric APIs is enabled in the fabric admin portal with a security group that includes your service principal.
  • Check if the service principal has access to both the report and its underlying semantic model (dataset).
  • Also verify that your token is requested for the power bi resource (https://analysis.windows.net/powerbi/api/.default), as token for the wrong audience also returns 401 error.

If these settings are already correct, please share the exact error response returned by the generate token API

 

Thanks and regards,

Anjan Kumar Chippa

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.