Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Get-EntraUserOwnedObject

Get objects owned by a user.

Syntax

Default (Default)

Get-EntraUserOwnedObject

 -UserId <String>
 [-All]
 [-Top <Int32>]
 [-Property <String[]>]
 [<CommonParameters>]

Description

The Get-EntraUserOwnedObject cmdlet gets objects owned by a user in Microsoft Entra ID. Specify UserId parameter to get objects owned by user.

Examples

Example 1: Get objects owned by a user

Connect-Entra -Scopes 'User.Read'
Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' |
Select-Object Id, displayName, createdDateTime, '@odata.type' |
Format-Table -AutoSize
id displayName createdDateTime @odata.type
-- ----------- --------------- -----------
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Helpdesk Application 10/17/2024 5:05:54 AM #microsoft.graph.application
bbbbbbbb-1111-2222-3333-cccccccccccc Contoso Group 10/21/2024 6:25:19 PM #microsoft.graph.group
cccccccc-2222-3333-4444-dddddddddddd ClaimIssuancePolicy #microsoft.graph.tokenLifetimePolicy
ffffffff-4444-5555-6666-gggggggggggg Contoso Marketing App 10/23/2024 3:17:14 PM #microsoft.graph.application

This example retrieves objects owned by the specified user.

  • -UserId Parameter specifies the ID of a user as a UserPrincipalName or UserId.

Example 2: Get all objects owned by a user

Connect-Entra -Scopes 'User.Read'
Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' -All |
Select-Object Id, displayName, createdDateTime, '@odata.type' |
Format-Table -AutoSize
id displayName createdDateTime @odata.type
-- ----------- --------------- -----------
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Helpdesk Application 10/17/2024 5:05:54 AM #microsoft.graph.application
bbbbbbbb-1111-2222-3333-cccccccccccc Contoso Group 10/21/2024 6:25:19 PM #microsoft.graph.group
cccccccc-2222-3333-4444-dddddddddddd ClaimIssuancePolicy #microsoft.graph.tokenLifetimePolicy
ffffffff-4444-5555-6666-gggggggggggg Contoso Marketing App 10/23/2024 3:17:14 PM #microsoft.graph.application

This example retrieves all the objects owned by the specified user.

  • -UserId parameter specifies the ID of a user as a UserPrincipalName or UserId.

Example 3: Get top three objects owned by a user

Connect-Entra -Scopes 'User.Read'
Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' -Top 3 |
Select-Object Id, displayName, createdDateTime, '@odata.type' |
Format-Table -AutoSize
id displayName createdDateTime @odata.type
-- ----------- --------------- -----------
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Helpdesk Application 10/17/2024 5:05:54 AM #microsoft.graph.application
bbbbbbbb-1111-2222-3333-cccccccccccc Contoso Group 10/21/2024 6:25:19 PM #microsoft.graph.group
cccccccc-2222-3333-4444-dddddddddddd ClaimIssuancePolicy #microsoft.graph.tokenLifetimePolicy

This example retrieves the top three objects owned by the specified user. You can use -Limit as an alias for -Top.

  • -UserId parameter specifies the ID of a user as a UserPrincipalName or UserId.

Parameters

-All

List all pages.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

-Property

Specifies properties to be returned.

Parameter properties

Type:

System.String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Select

Parameter sets

-Top

Specifies the maximum number of records to return.

Parameter properties

Type:System.Int32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Limit

Parameter sets

-UserId

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ObjectId, UPN, Identity, UserPrincipalName

Parameter sets

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.


Feedback

Was this page helpful?