Get-EntraUserCreatedObject
Get objects created by the user.
Syntax
Get-EntraUserCreatedObject
-UserId <String>
[-All]
[-Top <Int32>]
[-Property <String[]>]
[<CommonParameters>]
Description
The Get-EntraUserCreatedObject
cmdlet gets objects created by a user in Microsoft Entra ID.
Examples
Example 1: Get a user-created object
Connect-Entra -Scopes 'User.Read','User.Read.All'
Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com'
Id DeletedDateTime
-- ---------------
bbbbbbbb-1111-2222-3333-cccccccccccc
cccccccc-2222-3333-4444-dddddddddddd
dddddddd-3333-4444-5555-eeeeeeeeeeee
eeeeeeee-4444-5555-6666-ffffffffffff
This example retrieves an object created by the specified user.
-UserId
parameter specifies the object Id of a user(as a UserPrincipalName or UserId).
Example 2: Get all user-created objects
Connect-Entra -Scopes 'User.Read','User.Read.All'
Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' -All
Id DeletedDateTime
-- ---------------
bbbbbbbb-1111-2222-3333-cccccccccccc
cccccccc-2222-3333-4444-dddddddddddd
dddddddd-3333-4444-5555-eeeeeeeeeeee
eeeeeeee-4444-5555-6666-ffffffffffff
This example retrieves all objects created by the specified user.
-UserId
parameter specifies the object Id of a user(as a UserPrincipalName or UserId).
Example 3: Get a top one user-created object
Connect-Entra -Scopes 'User.Read','User.Read.All'
Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' -Top 1
Id DeletedDateTime
-- ---------------
bbbbbbbb-1111-2222-3333-cccccccccccc
This example retrieves top one object created by the specified user.
-UserId
parameter specifies the object Id of a user(as a UserPrincipalName or UserId).
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 |
-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 |
-UserId
Specifies the ID (as a UserPrincipalName or UserId) of a user in Microsoft Entra ID.
Type: | System.String |
Aliases: | ObjectId |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |