In this scenario, users already have Office 365 E3 licenses assigned individually, and you've now assigned Microsoft 365 E5 licenses through a group-based license assignment. The goal is to remove the E3 licenses from each user with the least administrative effort.
The SC-300 study guide and Microsoft documentation on "Manage license assignment in Azure AD" explain that when licenses are assigned both individually and through groups, the group assignment does not automatically remove the direct user-assigned licenses. To remove the individually assigned license programmatically, the Set-MgUserLicense cmdlet (Microsoft Graph PowerShell) is used.
The documentation states:
"Use the Set-MgUserLicense cmdlet to add or remove product licenses for users. You can specify the license plan to remove using the -RemoveLicenses parameter." Example: Set-MgUserLicense -UserId
[email protected] -RemoveLicenses " O365_ENTER PRISE_E3 "
* A. the Set-KindohsProductKcy cmdlet: This is not a valid Microsoft 365 or Graph cmdlet (appears to be a distractor).
* B. the Update-MgGroup cmdlet: Used to modify group properties - not for managing user licenses.
* D. the Update-MgUser cmdlet: Updates user object attributes (e.g., display name) but cannot assign or remove licenses.
Why not the other options: # Correct Answer: C. the Set-MgUserLicense cmdlet.