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.