Forum Discussion
aromero
6 years agoRegular Visitor
C# Power BI API 401 Unauthorized ServicePrincipalIsNotAllowedByTenantAdminSwitch
I already have done all this steps: I have my Tenant account properly setup, I have done all these steps. Done Allow Service Principal to use the API Services. Done Add Tenant account to the Secu...
Anonymous
6 years agoNot applicable
Hello,
It looks like the error you are getting is due to the service principal not having access to the Power BI Service.
You can find how to enable that option in Step 3 of the Microsoft Documentation.
Please note that you need to enable "Allow service principals to use Power BI APIs".
Also, it is highly recommended that the service principal that was created be added to a security group and then added within Step 3.
Lastly, you will have to add the service principal to the workspace, not your personal workspace, that you would like for it to have access to. It need to be either a member or admin of that workspace.