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 Remove-AzureADDevice command to Microsoft Graph PowerShell.
Summary
- Azure AD Command: Remove-AzureADDevice
- Azure AD Module: AzureAD
- Microsoft Graph Command: Remove-MgDevice ([Community Examples](https://github.com/orgs/msgraph/discussions?discussions q=Remove-MgDevice))
- Graph Module: Microsoft.Graph.Identity.DirectoryManagement
- Graph Endpoint: DELETE /devices/{id}
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 | Device.ReadWrite.All | Not available. |
View more details on permissions.
The calling user must also be in one of the following Microsoft Entra roles: Intune Administrator, Windows 365 Administrator, or Cloud Device Administrator.
Property Mapping
Azure AD Name | Microsoft Graph Name |
---|---|
ObjectId | DeviceId |