Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
powerbiexpert22
Impactful Individual
Impactful Individual

Power BI API for license allocation

is there an API in power BI which can be used for allocation license such as Pro, PPU or Premium Capacity. I found below document however this is for allocating visual license to user 

 

https://learn.microsoft.com/en-us/power-bi/developer/visuals/licensing-api

 

3 REPLIES 3
v-pnaroju-msft
Community Support
Community Support

Hi powerbiexpert22,

We would like to follow up and see whether the details we shared have resolved your problem.
If you need any more assistance, please feel free to connect with the Microsoft Fabric community.

Thank you.

v-pnaroju-msft
Community Support
Community Support

Thankyou, @pbiuseruk, for your response.

Hi powerbiexpert22,

We appreciate your inquiry through the Microsoft Fabric Community Forum.

Based on my understanding, the Power BI REST API does not support direct assignment of user licenses such as Pro, PPU, or Premium. License assignment for Power BI users is managed at the Microsoft Entra ID (Azure AD) or Microsoft 365 licensing layer and cannot be performed directly through Power BI APIs.

Please follow the approach below, which may help resolve the issue:

  1. Create an Azure AD security group and assign the required Power BI SKU (Pro or PPU) to that group. Automate adding users to this group using Power Automate or a Power App to streamline the license allocation process.
  2. Use the Microsoft Graph endpoint to assign licenses programmatically:
    POST https://graph.microsoft.com/v1.0/users/{id}/assignLicense
    You can retrieve your SKU ID using GET /subscribedSkus.
  3. Use the Power BI REST API to assign a workspace to a Premium capacity.

Additionally, please refer to the links provided below:
Microsoft Entra licensing - Microsoft Entra | Microsoft Learn
user: assignLicense - Microsoft Graph v1.0 | Microsoft Learn
List subscribedSkus - Microsoft Graph v1.0 | Microsoft Learn
Capacities - Groups AssignToCapacity - REST API (Power BI Power BI REST APIs) | Microsoft Learn

We hope the information helps resolve your issue. Should you have any further queries, please feel free to contact the Microsoft Fabric community.

Thank you.

pbiuseruk
Resolver II
Resolver II

Not sure exactly why you want to do that from Power BI but I'd probably suggest making a group within Azure that's linked to the licenses. Then a Power Automate flow that once clicked, it will go and add the user to the group (giving that user a license). From an Azure side of things, it's better to handle licenses like this. 

Also, it probably makes more sense to have a PowerApp to do this rather than a Power BI report. Power BI is normally just meant for viewing as opposed to "Doing" things. You can do it with a Power Automate button and you could even add in APIs to that PA flow to do whatever you want. 

Hope that helps.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors