Skip to content

nicolonsky/AzureADLicensing

Repository files navigation

AzureADLicensing

PowerShell cmdlets to manage Azure AD group based licensing. Cmdlets use the internal Azure portal API which is not supported by Microsoft.

PowerShell Gallery Version PowerShell Gallery GitHub

Using the module

  1. Install the module: Install-Module -Name AzureADLicensing -AllowClobber
    1. If you have the deprecated AzureRM module installed, uninstall it first Uninstall-AzureRm
  2. Authenticate to your Azure tenant: Connect-AzAccount
    1. Feel free to use a service principal for unattended authentication and automation

Available commands

All critical commands which modify settings support the -WhatIf parameter to predict changes.

Get available licenses and services:

Get-AADLicenseSku

Get included service plans for a license:

$m365= Get-AADLicenseSku | Where-Object {$_.name -match "Microsoft 365 E5"}
$m365.serviceStatuses.servicePlan

Add new license assignment:

Add-AADGroupLicenseAssignment -groupId "a5e95316-1c03-44d7-afac-efd0e788122c" -accountSkuId "nicolasuter:FLOW_FREE"

Add license assignmnet with disabled plan:

Add-AADGroupLicenseAssignment -groupId 0a918505-d0d5-4078-9891-0e8bec67cb65 -accountSkuId "nicolasuter:SPE_E5" -disabledServicePlans @("MYANALYTICS_P2")

Update license assignment:

Update-AADGroupLicenseAssignment -groupId "a5e95316-1c03-44d7-afac-efd0e788122c" -accountSkuId "nicolasuter:FLOW_FREE"

Remove license assignment:

Remove-AADGroupLicenseAssignment -groupId "a5e95316-1c03-44d7-afac-efd0e788122c" -accountSkuId "nicolasuter:FLOW_FREE"

Get license assignments for a specific group:

Get-AADGroupLicenseAssignment -groupId "a5e95316-1c03-44d7-afac-efd0e788122c"

Get all group based licensing assignments:

Get-AADGroupLicenseAssignment -All

About

Cmdlets to manage Azure AD Group based Licensing

Resources

License

Stars

Watchers

Forks

Packages

No packages published