Επεξεργασία

Κοινή χρήση μέσω


Get-AzureADServicePrincipalOwnedObject

Gets an object owned by a service principal.

Syntax

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

Description

The Get-AzureADServicePrincipalOwnedObject cmdlet gets an object that is owned by a service principal in Azure Active Directory (Azure AD).

Examples

Example 1: Retrieve the owned objects of a service principal

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

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

The second command gets the owned objects of a service principal identified by $ServicePrincipalId.

Parameters

-All

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

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ObjectId

Specifies the ID of a service principal in Azure AD.

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

-Top

Specifies the maximum number of records to return.

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