cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chris-h Regular Visitor
Regular Visitor

Embedding Service principle AppOwnsData 401 ServicePrincipalIsNotAllowedByTenantAdminSwitch

My set-up before starting work with Power BI Embedded was an Azure AD with a group that had a Workspace in the Power BI Service (app.powerbi.com) containing reports. 

To be able to embedd reports I followed the steps here: https://app.powerbi.com/embedsetup/appownsdata

 

I've configured it to use Service Principal but when i try to read the report I get a 401 Unathourized back. In fiddler i see X-PowerBI-Error-Info: ServicePrincipalIsNotAllowedByTenantAdminSwitch but I can't find anything on google that helps me. I have allowed Service Principals to use API:s in the admin settings in Power BI Service. Anyone else experiencing this? I must've missed something basic since I can't find anyone with this issue

 

However when I follow the steps here https://docs.microsoft.com/en-us/power-bi/developer/embed-service-principal

on step 2 I tried creating a new AzureADGroup but when that didn't work i found that add a group user (Service principal) to the power bi workspace was the fix. Why this, what did I do wrong? 

https://docs.microsoft.com/en-us/rest/api/power-bi/groups/addgroupuser

 

2 REPLIES 2
angeljimenez Frequent Visitor
Frequent Visitor

Re: Embedding Service principle AppOwnsData 401 ServicePrincipalIsNotAllowedByTenantAdminSwitch

You need to add your service principal in step 5

chris-h Regular Visitor
Regular Visitor

Re: Embedding Service principle AppOwnsData 401 ServicePrincipalIsNotAllowedByTenantAdminSwitch

I had done that, didn't make a difference. But I left that behind now and stuck with the powershell way of doing this which worked