License & Subscription Issues

Manage Office 365 Service Plans with Microsoft Graph PowerShell

Khadija KhanKhadija Khan Nov 22, 2026 868 views

Question details

The user wants to assign selected Office 365 services while preventing newly added services from being enabled automatically.

Manage Office 365 Service Plans with Microsoft Graph PowerShell
Product
Microsoft 365 and Microsoft Graph PowerShell
Device & OS
not provided
Scenario
An administrator assigns an Office 365 license but wants users to receive only specified service plans.
Observed behavior
New services added to a license may be enabled because the existing assignment lists disabled plans rather than an allowlist.
Before you start

Identify the user, the license SKU and the exact service plan names to allow. Use an administrator account with permission to manage licenses and install the Microsoft Graph PowerShell SDK if needed.

Solution 1Recommended

Disable unwanted service plans with Microsoft Graph PowerShell

Use the current service plan list to disable every plan except those you explicitly select, then review the list when Microsoft adds services.

Microsoft Graph licensing uses a list of disabled plan IDs, not a persistent allowlist that automatically blocks future plans. The earlier MSOnline PowerShell commands are retired; use Microsoft Graph PowerShell instead.

The example updates a direct license assignment for one user and SKU. It replaces that assignment's disabled-plan list with all currently available plans outside the allowlist. Group-based assignments must be managed through the licensing group.

1
Connect to Microsoft Graph

In PowerShell, install the SDK with Install-Module Microsoft.Graph if needed, then run Connect-MgGraph -Scopes "Organization.Read.All","User.Read.All","LicenseAssignment.ReadWrite.All" and consent to the requested permissions.

2
Find the SKU and service plans

Run Get-MgSubscribedSku -All | Select-Object SkuPartNumber,SkuId to find the SKU. Then run $sku = Get-MgSubscribedSku -All | Where-Object SkuPartNumber -eq "YOUR_SKU_PART_NUMBER" and inspect $sku.ServicePlans | Select-Object ServicePlanName,ServicePlanId.

3
Build the disabled-plan list

Replace the example names with the exact ServicePlanName values you want enabled: $allowed = @("PLAN_NAME_1","PLAN_NAME_2"). Then run $disabled = @($sku.ServicePlans | Where-Object { $_.ServicePlanName -notin $allowed } | ForEach-Object { $_.ServicePlanId }). Check the names and resulting list before applying it.

4
Update the user's license

Replace the user ID and run Set-MgUserLicense -UserId "user@example.com" -AddLicenses @(@{SkuId = $sku.SkuId; DisabledPlans = $disabled}) -RemoveLicenses @(). Verify the assignment with Get-MgUserLicenseDetail -UserId "user@example.com".

5
Review newly added plans

In the Microsoft 365 admin center, open Health > Message center and watch for service changes. When plans are added, inspect $sku.ServicePlans again after refreshing $sku, update the allowlist if needed, and rerun the disabled-plan and assignment commands.

Disable unwanted service plans with Microsoft Graph PowerShell
New plans are not blocked automatically: A newly added service may become enabled before you review it and reapply the disabled-plan list. Check group-based and other license assignments separately, because they can also provide access to a service.
Free Microsoft Office alternative

Work with Office files in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with Office documents, spreadsheets, and presentations. Its Microsoft Office format compatibility helps users move existing files without starting over. It does not manage Microsoft 365 licenses or service plans.

Use familiar document, spreadsheet, and presentation toolsOpen and edit common Microsoft Office formats, including DOCX, XLSX, and PPTXWork with existing Office files when moving to an alternative suiteUse a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Can I automatically block every future service plan?

The license assignment uses disabled plan IDs rather than a persistent allowlist for future services. Monitor Health > Message center in the Microsoft 365 admin center and update the disabled-plan list when new plans appear.

How do I find the service plan names for a license?

In Microsoft Graph PowerShell, select the SKU with Get-MgSubscribedSku -All, then inspect its ServicePlans property for ServicePlanName and ServicePlanId.

Can I still use New-MsolLicenseOptions?

The MSOnline PowerShell module has been retired. Use Microsoft Graph PowerShell and Set-MgUserLicense with the DisabledPlans property for direct assignments.

Why does a user still have access after I disable a plan?

The service may also be enabled through another license or a group-based assignment. Check the user's license details and review the licensing groups that assign the product.