Forum Discussion

MurugeshPeurmal's avatar
MurugeshPeurmal
New Member
1 month ago
Solved

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...
  • v-achippa's avatar
    1 month ago

    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