Public/Curanet/M365/Get-CuranetM365Licenses.ps1
function Get-CuranetM365Licenses() { Param( [Parameter(Mandatory)] [string]$SubscriptionId, [Parameter(Mandatory)] [ValidateSet("3370", "3850")] [string]$Account ) try { $Licenses = Invoke-CuranetAPI -Account $Account -Uri "https://api.curanet.dk/microsoft365/v1/Subscriptions/$($SubscriptionId)/Licenses" -Method GET } catch { throw "Failed to retreive subscription details from Curanet $($Account) API: $_" } return $Licenses } |