Hi @Edwin Blanco , thank you for your question. My colleague Amanpreet answered this question in this thread. I'll repost it here, but please let me know if you have any questions!
In order to change the device owner, you would need to first add another owner to the device and then remove the existing user. There is no single PowerShell command to change the owner. I am sharing the cmdlets below:
- Open PowerShell as Administrator and run
Install-module AzureADPreview
. If you have this module installed already, you can skip this step. - Login to Azure AD with your Global Admin account by using
Connect-AzureAD
cmdlet. - Run
Get-AzureADDevice -All $true | Where-Object {$_.DeviceTrustType -eq "AzureAd"}
to get object ID of all Azure AD joined devices in your tenant. - Run
Add-AzureADDeviceRegisteredOwner -ObjectId 94b0b212-xxxx-xxxx-xxxx-xxxxxxxxxxxx -RefObjectId 86757ad2-xxxx-xxxx-xxxx-xxxxxxxxxxxx
. Where, -ObjectId is to specify the object id of the device and -RefObjectId is to specify the object ID of the user you want to add as registered owner. - Run
Remove-AzureADDeviceRegisteredOwner -ObjectId 94b0b212-xxxx-xxxx-xxxx-xxxxxxxxxxxx -OwnerId 540b9c12-xxxx-xxxx-xxxx-xxxxxxxxxxxx
. Where, -OwnerId is to specify the object ID of the previous owner that you want to remove. - To confirm the new registered owner, run
Get-AzureADDeviceRegisteredOwner -ObjectId 94b0b212-xxxx-xxxx-xxxx-xxxxxxxxxxxx
or login to Azure Portal and navigate to Azure AD > Devices > All devices.
Please let me know if you have any questions.
If this answer helped you please mark it as "Verified" so other users can reference it.
Thank you,
James