Allow the use of Power BI Rest APIs

In the first 3 posts of this series we created Service Principal, stored the details in Azure key Vault and created a flow. We have one more step to do, we need to allow the use of Power BI Rest APIs in our tenancy and then we will be ready to actually set up the automation for creating workspaces.
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

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.

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.)
More Power BI Posts
- Conditional Formatting Update
- Data Refresh Date
- Using Inactive Relationships in a Measure
- DAX CrossFilter Function
- COALESCE Function to Remove Blanks
- Personalize Visuals
- Gradient Legends
- Endorse a Dataset as Promoted or Certified
- Q&A Synonyms Update
- Import Text Using Examples
- Paginated Report Resources
- Refreshing Datasets Automatically with Power BI Dataflows
- Charticulator
- Dataverse Connector – July 2022 Update
- Dataverse Choice Columns
- Switch Dataverse Tenancy
- Connecting to Google Analytics
- Take Over a Dataset
- Export Data from Power BI Visuals
- Embed a Paginated Report
- Using SQL on Dataverse for Power BI
- Power Platform Solution and Power BI Series
- Creating a Custom Smart Narrative
- Power Automate Button in a Power BI Report