Get-​Azure​AD​Service​Principal​Created​Object

Get objects created by a service principal.

Syntax

Get-AzureADServicePrincipalCreatedObject
   [-All <Boolean>]
   -ObjectId <String>
   [-Top <Int32>]
   [<CommonParameters>]

Description

The Get-AzureADServicePrincipalCreatedObject cmdlet gets an object created by a service principal in Azure Active Directory (AD).

Examples

Example 1: Retrieve the objects that were created by a service principal

PS C:\> $ServicePrincipalId = (Get-AzureADServicePrincipal -Top 1).ObjectId
PS C:\> Get-AzureADServicePrincipalCreatedObject -ObjectId $ServicePrincipalId

The first command gets the ID of a service principal by using the Get-AzureADServicePrincipal cmdlet. The command stores the ID in the $ServicePrincipalId variable.

The second command gets objects created by the service principal identified by $ServicePrincipalId.

Required Parameters

-ObjectId

Specifies the ID of a service principal in Azure AD.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False

Optional Parameters

-All

If true, return all objects created by the service principal. If false, return the number of objects specified by the Top parameter

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-Top

Specifies the maximum number of records to return.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False