Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I followed the article listed here https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal
I then wrote a C# console application that first generates an access token and then generates an embed token using the Power BI Nuget library method GetReportInGroupAsync
However, this method throws an Unauthorized error. I printed the response data and saw the following header;
X-PowerBI-Error-Info: ServicePrincipalIsNotAllowedByTenantAdminSwitch
My Power BI admin has already enabled this setting in the Power BI Admin Portal and the security group that contains my service principal is added to the list of groups for which access is allowed.
What am I missing?
Solved! Go to Solution.
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
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
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
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
3 |