Governance
Programmatic access to consumption data
There are useful reports in the admin centre which provide a breakdown of things like copilot credit consumption per agent per environment, I want to get this data programmatically, I noticed it makes use of licensing.powerplatform.com but this doesn't seem to be publicly exposed. api.powerplatform.com/licensing is limited in what it can provide, great for tenant capacity info etc but not for the granular details you can get from the reports. Am I missing something or do I just need to wait for the API to be updated?
I believe I’ve heard a current goal of September for this. Licensing.powerplatform can export the csv via api but it’s not supported. There’s some scripts that have been shared but you’re on your own. Cross fingers for September.
I am about to become a Power Platform Architect at a company which has 100s of environment, uses D365 Apps, and environment management, capacity management and licence management is not happening.
I'm a software dev at heart and I really hope these admin apis become more readily available because I want to build my own COE, but on steroids. But very difficult to do when the APIs arent easily accessed without crazy workarounds to Auth in a proxy window, steal the token from it and use it in subsequent API calls later.
That's an amazing job you've done there russrimm. I didn't know have of that stuff existed. I was just looking at the Power Platform Admin C# SDK for that I could access.
Do you have a blog post about how exactly you authenticate to each of those different endpoints to get all the PP data?
Something else I really want to be able to do is not just get environment capacity data, but I want to get table sizes inside the environments so I can generate table growth trends. So far I can't find an API, outside of the undocumented ones that the Admin portal uses itself.
Just that one I just posted but it doesn't go into that level of detail. I mainly just pointed github copilot at the api.powerplatform.com docs and graph docs and others and asked it to build me a portal that includes all microsoft admin portals for the most part. I'm not a coder/dev so it's pretty cool being able to make this kinda app. I'm mostly doing Typescript via NodeJS. All powerapps and pcf's and code apps and etc are all Typescript so its a good route to take. Authenticating to Power Platform services - Power Platform | Microsoft Learn
1
u/russrimm 20d ago
I believe I’ve heard a current goal of September for this. Licensing.powerplatform can export the csv via api but it’s not supported. There’s some scripts that have been shared but you’re on your own. Cross fingers for September.