Forum Discussion
Cannot access Admin APIs with service principal via ADF
- 2 years ago
Gave up, went through the instructions again with a new service principal, and now it works.
¯\_(ツ)_/¯
Hi cmjcf ,
According to the documentation, when using the PBI admin REST API with service principal authentication,” When running under service prinicipal authentication, an app must not have any admin-consent required premissions for Power BI set on it in the Azure portal. ”
Admin - Datasets GetDatasetUsersAsAdmin - REST API (Power BI Power BI REST APIs) | Microsoft Learn
According to my understanding, this means you can try removing all PBI-related API permissions, keeping only the tenant settings enabled, and then check if the API can successfully run using service principal authentication
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- cmjcf2 years agoFrequent Visitor
Hi Anonymous,
I think we're getting confused somewhere. In case you're not familiar with the Entra API Permissions blade, the text in that second heading is "Other permissions granted for <tenant name>". The service principal doesn't have any of those permissions. Those are listed as available, because it previously had them, but I removed them, because the documentation stated that they weren't needed and they weren't working anyway. It only has the single permission listed under "Configured permissions".
- PriyankaSS1 year agoFrequent Visitor
Did you do anything differently the second time around? Do you have a link to the steps you followed?