Forum Discussion
Anonymous
5 years agoNot applicable
Error accessing Power BI REST API: Admin - Get Activity Events using Service Principal auth
Hello, I try to access the Get Activity Events using Service Principal auth with Python. I did succesfully manage to obtain the token, however using below's code I get the following error upon r...
- Anonymous5 years ago
we had the same issue and after investigations with MS support we found out that the Admin Consent should be removed from the app permissions. Once removed the
PowerBINotAuthorizedException
error was gone !
Hope it helps ?
DavidCousinsT
Advocate I
5 years agoIf chrisarys response doesnt help, try changing resource_url to https://analysis.windows.net/powerbi/api/.default
I had to include the .default bit at the end of the URL to ensure the token generated gave access to all of the Power BI api.