License & Subscription Issues

Enable Only Required Microsoft 365 License Service Plans

Anum MushtaqAnum Mushtaq Nov 20, 2026 869 views

Question details

The user needs to enable only approved service plans when assigning Microsoft 365 licenses.

Enable Only Required Microsoft 365 License Service Plans
Product
Microsoft 365 licensing and Microsoft Graph PowerShell
Device & OS
not provided
Scenario
An administrator assigns licenses with PowerShell and wants newly added service plans excluded unless explicitly approved.
Observed behavior
New service plans may become enabled by default if the license assignment configuration is not updated.
Before you start

Identify the license SKU, target user, and exact service plan names you want to enable. Use an account with the required Microsoft Entra licensing role and Microsoft Graph permissions, and check whether the license is assigned directly or through a group.

Solution 1Recommended

Use Microsoft Graph PowerShell to disable unapproved service plans

Use an allowlist to calculate which plans to disable for a directly assigned license, then rerun the process when plans change.

The script reads the plans currently available in the SKU and disables every plan not listed in the allowlist. It does not automatically run when Microsoft adds a plan; review and rerun your provisioning process to apply the updated configuration.

The legacy MSOnline module and its New-MsolLicenseOptions and Set-MsolUserLicense commands are retired. Use Microsoft Graph PowerShell for new licensing scripts.

1
Connect to Microsoft Graph

In PowerShell, install the Microsoft.Graph module if needed with Install-Module Microsoft.Graph -Scope CurrentUser. Then run Connect-MgGraph -Scopes 'Organization.Read.All','User.Read.All','LicenseAssignment.ReadWrite.All' and grant the requested permissions.

2
Inspect the SKU and plans

Run Get-MgSubscribedSku -All | Select-Object SkuPartNumber, SkuId to find the license. Then run (Get-MgSubscribedSku -All | Where-Object SkuPartNumber -eq 'YOUR_SKU_PART_NUMBER').ServicePlans | Select-Object ServicePlanName, ServicePlanId to identify the exact names to allow.

3
Apply the allowlist

Replace the placeholders in this PowerShell example and run it for a directly assigned license: $sku = Get-MgSubscribedSku -All | Where-Object SkuPartNumber -eq 'YOUR_SKU_PART_NUMBER' if (@($sku).Count -ne 1) { throw 'Expected exactly one matching SKU.' } $allowed = @('YOUR_REQUIRED_PLAN_NAME', 'YOUR_OTHER_REQUIRED_PLAN_NAME') $missing = @($allowed | Where-Object { $_ -notin $sku.ServicePlans.ServicePlanName }) if ($missing.Count -gt 0) { throw "Unknown service plans: $($missing -join ', ')" } $disabled = @($sku.ServicePlans | Where-Object { $_.ServicePlanName -notin $allowed } | ForEach-Object { $_.ServicePlanId }) Set-MgUserLicense -UserId 'USER_PRINCIPAL_NAME' -AddLicenses @(@{ SkuId = $sku.SkuId; DisabledPlans = $disabled }) -RemoveLicenses @()

4
Verify and maintain the assignment

Run Get-MgUserLicenseDetail -UserId 'USER_PRINCIPAL_NAME' and inspect the ServicePlans property. Include the allowlist calculation in your provisioning process and rerun it after SKU plans change.

Use Microsoft Graph PowerShell to disable unapproved service plans
Check group assignments and dependencies: For a group-assigned license, update the service plan settings on the licensing group instead. Check service plan dependencies before disabling plans, and review other license assignments that may also enable a service.
Free Microsoft Office alternative

Work with Office files using WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with documents, spreadsheets, and presentations. Its Office format support helps you move existing files into your workflow. It does not manage Microsoft 365 license service plans.

Use document, spreadsheet, and presentation tools without changing Microsoft 365 service plan assignments.Open and edit common Microsoft Office formats, including DOCX, XLSX, and PPTX.Get started with a familiar interface and a lightweight application.Continue working with existing Office files as you transition to WPS Office.
microsoft office alternative - wps office

Frequently Asked Questions

How do I find the service plans included in a Microsoft 365 license?

In Microsoft Graph PowerShell, run Get-MgSubscribedSku -All, select the SKU by SkuPartNumber, and inspect its ServicePlans property for plan names and IDs.

Will the script automatically disable plans Microsoft adds later?

No. The allowlist calculation includes newly available plans the next time it runs. Schedule or rerun your provisioning process and verify the resulting assignment.

Can I use this script for a group-assigned license?

The example updates a direct user assignment. For a group-assigned license, change the disabled service plans on the licensing group in Microsoft Entra instead.

Why might a service remain enabled after I disable its plan?

Another direct or group-based license assignment may enable the same service. Check the user's license assignments and service plans in the Microsoft 365 admin center or Microsoft Entra admin center.

Should I still use New-MsolLicenseOptions?

No. The MSOnline module is retired. Use Microsoft Graph PowerShell and Set-MgUserLicense for direct user license assignments.