Launch offer: 20% off every migration plan until 31 January 2027. See prices
Bulk License Assignment With PowerShell and Graph
← All resources
Free field guide•Automation & Tooling

Bulk License Assignment With PowerShell and Graph

Automate bulk license assignment for tenant migrations using Microsoft Graph, covering usageLocation, disabled plans, group-based licensing, and reconciliation.

#licensing#graph#powershell#automation#sku
Instant access · PDF copy emailed · No credit card
11minRead time
7Chapters
intermediateLevel
PDFYours to keep
In-depth written guide
Run-it-yourself checklist
Real commands & examples
What you'll learn
  • 01How license assignment works in Graph
  • 02Setting usageLocation first
  • 03Idempotent bulk assignment
  • 04Disabling specific service plans
  • 05Swapping a license
  • 06Group-based licensing as an alternative
  • 07Reconciliation: prove what got applied
Preview

Every user that lands in the target tenant needs the right license before they can send mail or open a file — and assigning hundreds of them by hand in the portal is both slow and error-prone. Worse, the most common failure (usageLocation not set) produces a cryptic error that stalls a cutover. This guide automates bulk licensing end to end: setting prerequisites, assigning SKUs with selective service plans, swapping licenses, and reconciling what actually got applied.

How license assignment works in Graph

Licenses are SKUs (subscribedSku), each containing service plans (Exchange, SharePoint, Teams, etc.). You assign a SKU to a user with assignLicense, optionally disabling specific plans. Two prerequisites trip people up:

PrerequisiteWhy it matters
usageLocation set on the userLicense assignment fails without it
Available units on the SKUYou cannot assign more than prepaidUnits.enabled
Connect-MgGraph -TenantId $env:TARGET_TENANT_ID -Scopes @(
    'User.ReadWrite.All','Organization.Read.All','Directory.ReadWrite.All'
) -NoWelcome

# Discover SKUs and remaining capacity before assigning anything
Get-MgSubscribedSku | Select-Object SkuPartNumber, SkuId,
    @{n='Enabled';e={$_.PrepaidUnits.Enabled}},
    ConsumedUnits,
    @{n='Available';e={$_.PrepaidUnits.Enabled - $_.ConsumedUnits}}

Setting usageLocation first

Keep reading the full guide — it's free
Who it's for
IT admins & migration leads
Security & compliance teams
MSPs running client cutovers
Before you ask

Is it really free?

Yes — completely. No trial, no card, no catch. Enter your email and the full guide opens instantly.

Will you spam me?

No. We'll email your copy and, only if you opt in, the occasional genuinely useful migration tip. One click unsubscribes you for good.

Can I share it with my team?

Please do. Forward the PDF or send them the link — every teammate can grab their own copy.