Set-AzureADUserLicense
This article provides migration details from Set-AzureADUserLicense command to Microsoft Graph PowerShell.
Summary
- Azure AD Command: Set-AzureADUserLicense
- Azure AD Module: AzureAD
- Microsoft Graph Command: Set-MgUserLicense (Community Examples)
- Graph Module: Microsoft.Graph.Users.Actions
- Graph Endpoint: POST /users/{id | userPrincipalName}/assignLicense
Permissions
Permission type | Least privileged permissions | Higher privileged permissions |
---|---|---|
Delegated (work or school account) | LicenseAssignment.ReadWrite.All | Directory.ReadWrite.All, User.ReadWrite.All |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | LicenseAssignment.ReadWrite.All | Directory.ReadWrite.All, User.ReadWrite.All |
View more details on permissions.
Property Mapping
Azure AD Name | Microsoft Graph Name |
---|---|
AssignedLicenses | AssignedLicenses |
ObjectId | UserId |