Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article provides migration details from New-AzureADUser command to Microsoft Graph PowerShell.
Summary
- Azure AD Command: New-AzureADUser
- Azure AD Module: AzureAD
- Microsoft Graph Command: New-MgUser (Community Examples)
- Graph Module: Microsoft.Graph.Users
- Graph Endpoint: POST /users
Permissions
| Permission type | Permissions (from least to most privileged) |
|---|---|
| Delegated (work or school account) | User.ReadWrite.All, Directory.ReadWrite.All |
| Delegated (personal Microsoft account) | Not supported. |
| Application | User.ReadWrite.All, Directory.ReadWrite.All |
Property Mapping
| Azure AD Name | Microsoft Graph Name |
|---|---|
| AccountEnabled | AccountEnabled |
| AgeGroup | AgeGroup |
| City | City |
| CompanyName | CompanyName |
| ConsentProvidedForMinor | ConsentProvidedForMinor |
| Country | Country |
| CreationType | CreationType |
| Department | Department |
| DisplayName | DisplayName |
| ExtensionProperty | |
| FacsimileTelephoneNumber | |
| GivenName | GivenName |
| ImmutableId | |
| IsCompromised | |
| JobTitle | JobTitle |
| MailNickName | MailNickname |
| Mobile | |
| OtherMails | OtherMails |
| PasswordPolicies | PasswordPolicies |
| PasswordProfile | PasswordProfile |
| PhysicalDeliveryOfficeName | |
| PostalCode | PostalCode |
| PreferredLanguage | PreferredLanguage |
| ShowInAddressList | ShowInAddressList |
| SignInNames | |
| State | State |
| StreetAddress | StreetAddress |
| Surname | Surname |
| TelephoneNumber | |
| UsageLocation | UsageLocation |
| UserPrincipalName | UserPrincipalName |
| UserState | |
| UserStateChangedOn | |
| UserType | UserType |