Problem with the new Powershell MgGraph Command Get-MgDeviceRegisteredOwner

Liersch 21 Reputation points
2022-08-03T10:00:30.137+00:00

I hope I am correct in this subthread.

The new MS Graph Command for Powershell Get-MgDeviceRegisteredOwner doesn't output the owner.
I only get an output for DeletedDateTime on this command.

In addition, for the DeviceID argument you need the ObjectID from the Computer Object then the DeviceID.
I tried the Beta Channel for the Microsoft.Graph Module but it is the same issue.

Do you have a possible solution? Thank you!

227667-mggraph-zeigt-nicht-korrekte-daten-an.png

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,988 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,520 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,653 questions
0 comments No comments
{count} votes

Accepted answer
  1. 2022-09-01T03:50:56.447+00:00

    Hello @Liersch and thanks for reaching out. The Get-MgDeviceRegisteredOwner cmdlet will return the owner id and the deletedDateTime as flat properties. You will find additional owner properties such as displayName and others inside the AdditionalProperties property. E.g.

    (Get-MgDeviceRegisteredOwner -DeviceId <device-id>).AdditionalProperties

    Let us know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.


2 additional answers

Sort by: Most helpful
  1. Limitless Technology 44,316 Reputation points
    2022-08-03T16:09:10.207+00:00

    Hello

    Thank you for your question and reaching out. I can understand you are having issues related to MS Graph PowerShell if it helps for you.

    Please try below PowerShell command to get owner name.

    Import-Module Microsoft.Graph.Identity.DirectoryManagement

    Get-MgDeviceRegisteredOwner -DeviceId $deviceId -OutFile $outFileId

    ---

    --If the reply is helpful, please Upvote and Accept as answer--

    1 person found this answer helpful.

  2. Liersch 21 Reputation points
    2022-08-09T09:46:27.74+00:00

    I have tried Powershell 7.2.5, but doesn't work either.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.