cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MattTaylor
Helper II
Helper II

Get environment capacity using Power Platform for Admins (or other method)

Hi folks,

 

I've been trying to find a way to get the capacities for my environments (apart from manually looking at the analytics on the Power Platform Admin Centre). It looks like this might do it: https://docs.microsoft.com/en-us/connectors/powerplatformforadmins/#get-environment-as-admin, but I'm not having any luck with it - the capacity part of the properties doesn't seem to have anything in it. 


Has anyone managed to do this?

 

Thanks in advance

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
joe_hannes_col
Continued Contributor
Continued Contributor

Hello @MattTaylor,

 

Just tried it out, and I'm getting the same result in both Power Apps and Power Automate: the capacity part of the properties is omitted.

View solution in original post

MattTaylor
Helper II
Helper II

For anyone that's interested, I found the solution to get that capacity data. 

 

1. Using the 'Power Platform for Admins' connector, look for the 'List Environments as Admin' Action

2. Click Show Advanced Options on the action

3. In the Expand Properties box enter the following:

 

properties.capacity,properties.addons​​

It looks like this:
scn_ppa1.png

 

4. You can then add steps afterwards to use the output. You'll need to parse the JSON of the capacity property in order to pull out individual details (it looks like this):

 

 

[
  {
    "capacityType": "Database",
    "actualConsumption": 2232.062,
    "ratedConsumption": 2232.062,
    "capacityUnit": "MB",
    "updatedOn": "2021-09-16T01:27:45Z"
  },
  {
    "capacityType": "File",
    "actualConsumption": 3311.855,
    "ratedConsumption": 3311.855,
    "capacityUnit": "MB",
    "updatedOn": "2021-09-16T01:27:45Z"
  },
  {
    "capacityType": "Log",
    "actualConsumption": 0.2265625,
    "ratedConsumption": 0.2265625,
    "capacityUnit": "MB",
    "updatedOn": "2021-09-16T01:27:45Z"
  }
]​

 

 

 

I assume you can do the same with the 'Get Environment as Admin' Action. 

 

For reference, this tutorial helped me work out where I needed to make the changes: https://docs.microsoft.com/en-us/power-platform/admin/programmability-tutorial-create-daily-capacity... 

View solution in original post

4 REPLIES 4
joe_hannes_col
Continued Contributor
Continued Contributor

Hello @MattTaylor,

 

Just tried it out, and I'm getting the same result in both Power Apps and Power Automate: the capacity part of the properties is omitted.

View solution in original post

Thanks for responding @joe_hannes_col, it's a shame - I really need a way of setting up alerts for storage and keeping a history so I can analyse the increases over time, without just going to the Admin Centre and doing it with a CSV download. 

joe_hannes_col
Continued Contributor
Continued Contributor

I agree. I fiddled with some PowerShell commands, but I didn't find any that would return the capacity. There probably is a way to query the capacity from the Business Applications Platform API, but I didn't find a request. If I find something I'll post back.

Or maybe the functionality will come back - the property seems to be there, it just appears empty in Power Apps.

MattTaylor
Helper II
Helper II

For anyone that's interested, I found the solution to get that capacity data. 

 

1. Using the 'Power Platform for Admins' connector, look for the 'List Environments as Admin' Action

2. Click Show Advanced Options on the action

3. In the Expand Properties box enter the following:

 

properties.capacity,properties.addons​​

It looks like this:
scn_ppa1.png

 

4. You can then add steps afterwards to use the output. You'll need to parse the JSON of the capacity property in order to pull out individual details (it looks like this):

 

 

[
  {
    "capacityType": "Database",
    "actualConsumption": 2232.062,
    "ratedConsumption": 2232.062,
    "capacityUnit": "MB",
    "updatedOn": "2021-09-16T01:27:45Z"
  },
  {
    "capacityType": "File",
    "actualConsumption": 3311.855,
    "ratedConsumption": 3311.855,
    "capacityUnit": "MB",
    "updatedOn": "2021-09-16T01:27:45Z"
  },
  {
    "capacityType": "Log",
    "actualConsumption": 0.2265625,
    "ratedConsumption": 0.2265625,
    "capacityUnit": "MB",
    "updatedOn": "2021-09-16T01:27:45Z"
  }
]​

 

 

 

I assume you can do the same with the 'Get Environment as Admin' Action. 

 

For reference, this tutorial helped me work out where I needed to make the changes: https://docs.microsoft.com/en-us/power-platform/admin/programmability-tutorial-create-daily-capacity... 

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,304)