How to list and shows the Get-MGDevice RegisteredOwners and RegisteredUsers attribute?

EnterpriseArchitect 4,996 Reputation points
2024-06-18T05:34:23.78+00:00

How to list and show the Get-MGDevice RegisteredOwners and RegisteredUsers attribute?

Because the below result doesn't even show it.

$Properties = 'DisplayName', 'Model', 'OperatingSystem', 'RegisteredOwners', 'RegisteredUsers', 'RegistrationDateTime'
$paramGetMgDevice = @{
     All             = $true
	Filter		     = "not (OperatingSystem in ('Windows', 'Printer'))"
	ConsistencyLevel = 'Eventual'
	CountVariable    = 'CountVar'
	Property		 = $Properties
}
Get-MgDevice @paramGetMgDevice | Select-Object $Properties

Thanks.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,200 questions
Microsoft Intune Enrollment
Microsoft Intune Enrollment
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Enrollment: The process of requesting, receiving, and installing a certificate.
1,299 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,646 questions
Microsoft Entra
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,287 questions
{count} votes

Accepted answer
  1. Yakun Huang-MSFT 1,795 Reputation points Microsoft Vendor
    2024-06-18T06:27:46.4933333+00:00

    Hi @EnterpriseArchitect

    Try using the following request to get the RegisteredOwners and RegisteredUsers attributes.

    Get-MgDeviceRegisteredOwner -DeviceId $deviceId
    Get-MgDeviceRegisteredUser -DeviceId $deviceId
    

    See the link below for more details:

    https://video2.skills-academy.com/en-us/graph/api/device-list-registeredowners?view=graph-rest-1.0&tabs=powershell#request

    https://video2.skills-academy.com/en-us/graph/api/device-list-registeredusers?view=graph-rest-1.0&tabs=powershell#example

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful