Building custom solutions that extend, automate, and integrate Microsoft 365 apps.
Based on the error message and the service plan IDs you provided, this behavior is consistent with a service plan dependency constraint rather than a Graph API issue.
From the Microsoft documentation, license operations can fail when a service plan you are trying to remove is still required by other service plans or licenses assigned to the user.
In your case, the service plan being removed (as part of M365 Business Premium) includes Exchange-related components. The service plan IDs involved map to Exchange services (such as Exchange Online, archiving, or related variants), which commonly depend on each other. This suggests that some Exchange-related service plans are still required by other assigned licenses or configurations, so Microsoft Entra blocks the removal to avoid breaking those dependencies.
This commonly occurs when:
- The user has additional licenses or add-ons that rely on Exchange (e.g. Archiving or other mailbox-dependent services)
- The user has a mailbox-dependent workload still active (e.g. archiving, retention, or Teams features)
- Licenses are assigned from multiple sources (direct + group-based), creating overlapping dependencies
There is no strict sequence enforced by Microsoft, but the requirement is to remove or satisfy dependencies first, then remove the license. You can use one of the following approaches:
1.Assign a replacement license first:
- Assign a license that includes Exchange (e.g. Business Standard, E3)
- Wait for provisioning to complete
- Remove the M365 Business Premium license
This prevents breaking the Exchange dependency mid‑operation.
2.Remove the dependencies explicitly:
-Check all assigned licenses (GET /users/{id}/licenseDetails).
-Identify licenses using:
- Exchange Online Archiving
- Exchange-related services
-Remove or disable those dependencies first
-Retry removing Business Premium
3.If group-based licensing is used, remove the user from the licensing group first, wait for backend processing to complete and retry the removal.
I hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.