Track your office 365 licenses with SharePoint + Power Automate
- Ómar Örn Magnússon
- Sep 8, 2020
- 1 min read
As apart of the automation process I wanted to find a way to track the status of my licenses in an easy manner and be apart of the automation processes so I could easily check the status and use this as apart of the whole automation process wich a will be blogging about soon in a 3 part blog called Automating your onboarding.
This is an easy way to track the licenses in hand and trigger some action when you are low
first, the PowerShell script I used
$cred = Get-AutomationPSCredential -Name 'Flow Automation'
connect-msolservice -credential $cred
$licanse = @()
$itemlist = Get-MsolAccountSku
foreach ($item in $itemlist){
$licanselist = @{
AccountSkuId = $item.AccountSkuId
ActiveUnits= $item.ActiveUnits
Unitsleft= $item.ActiveUnits - $item.ConsumedUnits
ConsumedUnits= $item.ConsumedUnits
}
$licanse += New-Object PSObject -Property $licanselist
}
$licansejson = $licanse | ConvertTo-Json
Write-Output $licansejson
Then once every x hours this flow

captures all the licenses to this SharePoint list.

it can also go to CDS or SQL, more to come in my 3 part Onboarding blog
Comments