Allow the use of Power BI Rest APIs

In the first 3 posts of this series we created Service Principal, we stored the details in Azure key Vault and finally created a flow to fetch those details. We are almost ready to actually set up the automation for creating workspaces. We have one more step to do, we need to allow the use of Power BI Rest APIs in our tenancy.

This post is part of Power Automate and Power BI Rest API series

Find the Setting

This setting can be found in the Admin portal for Power BI under Tenant settings, you need to be a Power BI admin. If you search for Fabric API you’ll find it quickly. If you click the enabled toggle to on it will give you 2 options. The entire organization would allow the use of Power BI Rest APIs by anyone if they had the right credentials, this would not be good practice. So I recommend selecting Specific security groups. This means the service principal needs to be a member of a security group.

Tenant settings can be found at https://app.powerbi.com/admin-portal/tenantSettings

Fabric APIs setting in

Create Security Group

To create a security group you will need the right level of security in Entra, in many organisations you will not. Go to https://entra.microsoft.com/ and click Groups on the left hand menu. Make sure you are looking at All Groups and then click New group.

The group type should be Security. Enter in a Group name, please follow any naming conventions you should be following. I highly recommend putting in a group description, future you will thank you. Click on No members selected to open the Add members pane. Search for the name of the service principal and tick next the name. Then click Select to close the pane.

No members will now be updated to 1 member, so you can now click Create.

Showing the details of creating a group and adding the service principal to the group.

Back to the setting to allow the use of Power BI Rest APIs

Now we have the security group setup we can change the setting to allow the use of Power BI Rest APIs. Back into Power BI admin portal and find the setting.

Enable the setting and select Specific security group. Then add your security group into the box, the search is pretty good in my experience. The click Apply.

Finally!

We have now ticked all the boxes, done all the prep to write a flow to create a workspace. The next post will be my final post in this series! (well for now as I already have a few ideas for taking it further)

Over 20 year experience at being passionate about training, solving problems and loving a new challenge especially in the Microsoft's Power Platform suite.

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment