Creating Custom Connectors for Power BI API: Integration Guide for Power Apps and Power Automate

When trying to pull workspace, group, or tile information from Power BI in Power Apps or Power Automate, the standard connectors often fall short of meeting all requirements.

I recently created a custom connector for Power BI, and here’s my documentation of the process.

Register Your App with Azure

The first step is to register your application with Azure.

Access the Azure portal and open Azure AD.
Next, select “App registrations”,
Choose “New registration”,
Set an appropriate application name. We’ll configure the redirect URL later, so click “Register” for now.
Once the app is created, note down the Client ID (Application ID) and navigate to “Certificates & secrets”.
Select “New client secret”, choose an appropriate expiration period required for the Power BI connector, and click “Add”.
A client secret will be generated – make sure to note down this key.

Now, let’s switch over to Power Apps (Power Automate works as well).

Creating Custom Connector in Power Apps

In Power Apps, navigate to “Data -> Custom connectors” and select “Create from scratch” under new custom connector.
Give it an appropriate name.
You’ll see this screen where you should enter:

  • Scheme: HTTPS
  • Host: api.powerbi.com

Then proceed to security settings.

Select “OAuth 2.0” as the authentication type.
Configure the remaining information as follows:

  • Identity Provider: Azure Active Directory
  • Client id: The client ID you noted from Azure AD
  • Client secret: The secret key you noted from Azure AD
  • Login URL and Tenant ID: Leave as default
  • Resource URL: https://analysis.windows.net/powerbi/api
Once you’ve entered all this information, click “Create connector”. A redirect URL will be generated – make note of this.

Now return to Azure.

Configuring Redirect URL in Azure

Back in Azure, select “Authentication” from the left menu and click “Add a platform”.
Select Web for Web applications,
Paste the redirect URL you noted earlier and click “Configure”.
While here, let’s add API permissions. Select “API permissions” from the left menu and click “Add a permission”.
Scroll down to find and select Power BI Service,
Select “Delegated permissions”.
While it’s best practice to limit permissions to the minimum necessary for your connector, for now, select these permissions:

  • Dashboard.Read.All
  • Group.Read.All
  • Workspace.Read.All



Grant admin consent to complete the permission setup.

With the custom connector creation complete, let’s proceed to test the connection in Power Apps.

Testing Connection in Power Apps (Power Automate)

Back in Power Apps, select “4. Test” and click “New connection”.
Click Create.
Select an account with appropriate permissions.
Upon successful completion, the connection will be added.

This completes the creation of the custom connector for Power BI.
The actual API definitions will be covered in the next article.

コメント

Copied title and URL