How to use Power BI REST APIs in Power Automate without a service principal
Image Source: Shutterstock.com
Feb 3, 2023 6:30 AM

How to use Power BI REST APIs in Power Automate without a service principal

External Blog Post

Last spring, I wrote a “how to” blog post about using Power BI REST APIs in Power Automate. You can find it here.

Last spring, I wrote a “how to” blog post about using Power BI REST APIs in Power Automate. You can find it here . During the months after writing it, I’ve created quite a punch of more Power Automate flows reading Power BI REST APIs for example to our Power BI CoE . While working with these new flows, I noticed that there are APIs that do not support service principal at all as an authentication method. Only way to use these APIs is with a logged in O365 user account (with appropriate permissions documented in each API document page).

This is an issue when using Power Automate as you must create an access token to read the Power BI REST APIs. The MS documented way to do that is with a service principal (in Power Automate – leaving out PowerShell, Azure functions etc approaches here). Doing any HTTP action calls to the Power BI REST APIs without the access token just does not work. Ooor does it..?

https://forwardforever.com/how-to-use-power-bi-rest-apis-without-a-service-principal/


More about Power BI REST APIs

Power BI REST APIs provide a powerful way to interact with Power BI programmatically. In order to use these APIs in Power Automate, you need to create a service principal (application) and grant it access to the relevant resources. This involves creating an Azure Active Directory application and registering it within your tenant. Once this is done, you can use the application's credentials (client ID & secret) when calling the Power BI REST API from within your flow.

The alternative approach is to use anonymous authentication when calling the Power BI Rest API from within your flow. This means that no service principal will be required as long as all of the operations are executed on behalf of an authenticated user who has sufficient permissions over their own data sets/workspaces in Power BI. Anonymous authentication provides a much simpler way to call into the API without having to manage any third-party applications or service principals which makes it ideal for scenarios where only one user needs access or quick prototyping workflows which don't require complex authorization models


Apr 25, 2022 — How to configure a service principal in Azure and then use it in Power BI Admin REST API calls in Power Automate for authorization.

Nov 24, 2022 — Under Admin API settings, you'll see Allow service principals to use read-only Power BI admin APIs. Set the toggle to Enabled, and then select ...

Nov 18, 2022 — To grant the Azure AD app access to the Power BI content and APIs, the admin needs to enable service principal on the Power BI admin portal. Go ...