Get-EntraUserOwnedDevice

Get registered devices owned by a user.

Syntax

Get-EntraUserOwnedDevice
   -ObjectId <String>
   [-All]
   [-Top <Int32>]
   [-Property <String[]>]
   [<CommonParameters>]

Description

The Get-EntraUserOwnedDevice cmdlet gets registered devices owned by the specified user in Microsoft Entra ID.

Examples

Example 1: Get devices owned by a user

Connect-Entra -Scopes 'User.Read.All'
Get-EntraUserOwnedDevice -ObjectId 'SawyerM@contoso.com'

ObjectId                             DeviceId                             DisplayName
--------                             --------                             -----------
bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1
cccccccc-2222-3333-4444-dddddddddddd bbbb1111-cc22-3333-44dd-555555eeeeee Device2

This command gets the registered devices owned by the specified user.

Example 2: Get all devices owned by a user

Connect-Entra -Scopes 'User.Read.All'
Get-EntraUserOwnedDevice -ObjectId 'SawyerM@contoso.com' -All

ObjectId                             DeviceId                             DisplayName
--------                             --------                             -----------
bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1
cccccccc-2222-3333-4444-dddddddddddd bbbb1111-cc22-3333-44dd-555555eeeeee Device2

This command gets all the registered devices owned by the specified user.

Example 3: Get top one device owned by a user

Connect-Entra -Scopes 'User.Read.All'
Get-EntraUserOwnedDevice -ObjectId 'SawyerM@contoso.com' -Top 1

ObjectId                             DeviceId                             DisplayName
--------                             --------                             -----------
bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1

This command gets top one registered device owned by the specified user.

Parameters

-All

List all pages.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ObjectId

Specifies the ID of a user (as a User Principal Name or ObjectId) in Microsoft Entra ID.

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Property

Specifies properties to be returned

Type:System.String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Top

Specifies the maximum number of records to return.

Type:System.Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False