New-AzureADDevice
This article provides migration details from New-AzureADDevice command to Microsoft Graph PowerShell.
Summary
- Azure AD Command: New-AzureADDevice
- Azure AD Module: AzureAD
- Microsoft Graph Command: New-MgDevice (Community Examples)
- Graph Module: Microsoft.Graph.Identity.DirectoryManagement
- Graph Endpoint: POST /devices
Permissions
Permission type | Least privileged permissions | Higher privileged permissions |
---|---|---|
Delegated (work or school account) | Directory.AccessAsUser.All | Not available. |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | Not supported. | Not supported. |
View more details on permissions.
The calling user must also be in one of the following Microsoft Entra roles: Intune Administrator, or Windows 365 Administrator.
Property Mapping
Azure AD Name | Microsoft Graph Name |
---|---|
AccountEnabled | AccountEnabled |
AlternativeSecurityIds | AlternativeSecurityIds |
ApproximateLastLogonTimeStamp | NA |
DeviceId | DeviceId |
DeviceMetadata | DeviceMetadata |
DeviceObjectVersion | NA |
DeviceOSType | NA |
DeviceOSVersion | NA |
DevicePhysicalIds | NA |
DeviceTrustType | NA |
IsCompliant | IsCompliant |
DisplayName | DisplayName |
IsManaged | IsManaged |
ProfileType | ProfileType |
SystemLabels | SystemLabels |