How to programmatically retrieve Copilot Studio licensing details across all environments in a tenant?

Nitin S 6 Reputation points
2025-04-11T13:16:20.6466667+00:00

Hello Experts,

I am looking for a way to retrieve all the licensing details related to Copilot Studio across all environments within our tenant.

I’m aware that some of this information is accessible through the Power Platform Admin Center, but I’m specifically looking to programmatically fetch details such as:

Allocated vs. unallocated licenses

Usage of Message Packs

Pay-as-you-go license details

Is there any API or PowerShell module available that can provide this level of licensing information for Copilot Studio across the tenant?

Thanks in advance for your help!Untitled

Microsoft Copilot
Microsoft Copilot
Microsoft terminology for a universal copilot interface.
815 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. smita-MSFT 0 Reputation points Microsoft External Staff
    2025-04-14T08:44:19.1233333+00:00

    Hello Nitin S,

    Thanks for reaching out. In order to fetch all the licensing information pertaining to Copilot Studio in all environments in your tenant, you can use Power Platform API which Microsoft offers APIs to work with Power Platform services, which can be used to fetch licensing details. Some of the helpful endpoints are:
    1.Get Environment Details: This API can be used to fetch details about environments in your tenant. 2.Get Capacity Consumption: This API provides information about capacity consumption by different products, including Copilot Studio. PowerShell Module Microsoft offers PowerShell modules that can be used to manage Power Platform environments and retrieve licensing information. The relevant module for your needs is Microsoft.PowerPlatform.Admin.PowerShell. Here are some example commands:
    # Install the module Install-Module
    -Name Microsoft.PowerPlatform.Admin.PowerShell
    # Connect to your tenant
    Add-PowerAppsAccount
    # Get capacity consumption details
    Get-AdminPowerAppCapacity
    # Get environment details
    Get-AdminEnvironment
    Ref: https://learn.microsoft.com/en-us/rest/api/power-platform/
    https://learn.microsoft.com/en-us/power-platform/admin/powershell-getting-started
    https://learn.microsoft.com/en-us/power-platform/admin/powerapps-powershell
    https://learn.microsoft.com/en-us/powershell/powerapps/get-started-powerapps-admin?view=pa-ps-latest

    Thanks,

    Smita
    ************************************************************************* 

    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.