web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / O365 License Summary (...
Power Automate
Answered

O365 License Summary (used & available) via Flow

(0) ShareShare
ReportReport
Posted on by 34

Hi guy's,

 

I am trying to build a flow that will show me a summary of the licenses I have in my tenant. More importantly it needs to show me how many licenses i have as well as how many have been used.

 

What i have done is built an Azure App and then i run a GET using the tenant ID and secret

david_ashworth_0-1635304463881.png

 

I then run a parse and a filter (in this case i am looking for how many E3 licenses i have). I then get this in the body

david_ashworth_1-1635304611567.png

 

This shows me i have 509 of which 506 are in use. My question is: Is there a better way to do this in Flow or do i need to go down the PowerShell route? I have seen some posts about how they are using this method to get an alert when a particular license has none free. In my case i would like an on demand summary of licenses across my tenant.

 

If i am to use the above scenario, what would be the best way to extract that data to make it easily useable in variable that i can pop in an email?

 

Thanks,
David

Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    11,695 Super User 2025 Season 2 on at

    Try the following which will get you the consumed units and prepaid units. Insert the correct SKU in the filter array action:

    2021-10-28_00-31-52.png

    2021-10-28_00-30-10.png

    This is the output of the run:

    ekarim2020_0-1635377797828.png

     

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • Ellis Karim Profile Picture
    11,695 Super User 2025 Season 2 on at

    To view the output of the HTTP action in a more meaningful way, paste the output into a JSON formatter such as Best JSON Viewer and JSON Beautifier Online (codebeautify.org)

     

    2021-10-28_00-42-28.png


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • AAM365 Profile Picture
    2 on at

    I'm getting the following error:

    AAM365_0-1710869742824.png

     

  • twriggles24 Profile Picture
    72 on at
    Hello,
     
    Ekarim, I tried your answer and it worked really well (thanks!) but if I were to increase the licence count whilst the flow is running, would the variables adjust automatically?
     
    I've put a step in my flow to email sales to increase the licence count and then wait but I'm not sure that even if the count increased, would the flow variables pick this change.
     
     
  • Ellis Karim Profile Picture
    11,695 Super User 2025 Season 2 on at
    There is always going to be some delay between the time new licenses are purchased and for those new licenses to register and appear in Entra ID/Azure.
     
    In my organisation we can purchase directly from Microsoft or through a supplier portal. It only takes a few minutes for the new licenses to register, but there is a short delay. Your experiences may be different.
     
    So when you run your flow, that flow run is only ever going to be a snapshot in time of the license count.
     
    If the new licenses were successfully registered in Entra ID/Azure before or during the flow run (AND before count the licenses actions were executed in the flow),  the license count will be updated.
     
    It's important to include the date and time of the flow run in any email communications.
     
    Ellis
     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard