Forum Discussion
401 Unauthorized response when fetching an embed token for Power BI
- Anonymous2 years ago
Hi aaronfdsouza ,
Base on your description, it seems you’re encountering an unauthorized error while fetching an embed token for Power BI using a service principal. Could you please refer the following official documentations and check the following info?
Embed Token - Generate Token - REST API (Power BI Power BI REST APIs) | Microsoft Learn
1. Ensure the service principal have the proper permissions
- Ensure that the service principal (app registration) has the necessary permissions in Azure AD. It should have the "API permissions" for Power BI Service.
- Enable the Service Principal option in the Power BI Admin Portal
- Add the service principal to the Power BI workspace security group.
2. Make sure that input the correct info for Organization Tenant ID, Client ID and Secret parameter values
Get the embedding parameter values
3. Check if it hit any following limitations
Considerations and limitations
Best Regards
Hi aaronfdsouza ,
Base on your description, it seems you’re encountering an unauthorized error while fetching an embed token for Power BI using a service principal. Could you please refer the following official documentations and check the following info?
Embed Token - Generate Token - REST API (Power BI Power BI REST APIs) | Microsoft Learn
1. Ensure the service principal have the proper permissions
- Ensure that the service principal (app registration) has the necessary permissions in Azure AD. It should have the "API permissions" for Power BI Service.
- Enable the Service Principal option in the Power BI Admin Portal
- Add the service principal to the Power BI workspace security group.
2. Make sure that input the correct info for Organization Tenant ID, Client ID and Secret parameter values
Get the embedding parameter values
3. Check if it hit any following limitations
Considerations and limitations
Best Regards
- MurugeshPeurmal20 days agoNew Member
i am also having simuler issue and all the required rights has been provided. still i am facing an issue .
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, even with different methods