Get-AzureRmADSpCredential

Retrieves a list of credentials associated with a service principal.

Syntax

Get-AzureRmADSpCredential
   -ObjectId <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmADSpCredential
   -ServicePrincipalName <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzureRmADSpCredential cmdlet can be used to retrieve a list of credentials associated with a service principal. This command will retrieve all of the credential properties (but not the credential value) associated with the service principal.

Examples

-------------------------- Example 1 --------------------------

PS E:\> Get-AzureRmADSpCredential -ServicePrincipalName http://test12345

Returns a list of credentials associated with the service principal having SPN 'http://test12345'.

Required Parameters

-ObjectId

The object id of the service principal to retrieve credentials from.

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

The name (SPN) of the service principal to retrieve credentials from.

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

Optional Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.Azure.Graph.RBAC.Version1_6.ActiveDirectory.PSADCredential