Get-EntraServicePrincipalKeyCredential

Obtenir les informations d’identification de clé pour un principal de service.

Syntaxe

Default (Par défaut)

Get-EntraServicePrincipalKeyCredential

    -ServicePrincipalId <String>
    [<CommonParameters>]

Description

L’applet Get-EntraServicePrincipalKeyCredential de commande obtient les informations d’identification de clé d’un principal de service dans Microsoft Entra ID.

Exemples

Exemple 1 : Récupérer les informations d’identification de clé d’un principal de service

Connect-Entra -Scopes 'Application.Read.All'
$servicePrincipal = Get-EntraServicePrincipal -Filter "displayName eq 'Helpdesk Application'"
Get-EntraServicePrincipalKeyCredential -ServicePrincipalId $servicePrincipal.Id
CustomKeyIdentifier DisplayName EndDateTime         Key KeyId                                StartDateTime       Type      Usage
------------------- ----------- -----------         --- -----                                -------------       ----      -----
                                08-02-2025 09:57:08     68b45e27-fef8-4f0d-bc7a-76bd949c16d1 08-02-2024 09:57:08 Symmetric Sign

Cet exemple récupère les informations d’identification de clé pour le principal de service spécifié dans Microsoft Entra ID. Vous pouvez utiliser la commande Get-EntraServicePrincipal pour obtenir un ID d’objet principal de service.

  • -ServicePrincipalId spécifie l’ID du principal de service.

Paramètres

-ServicePrincipalId

Spécifie l’ID de l’application pour laquelle obtenir les informations d’identification du mot de passe.

Propriétés du paramètre

Type:System.String
Valeur par défaut:None
Prend en charge les caractères génériques:False
DontShow:False
Alias:Identifiant d'objet (ObjectId)

Jeux de paramètres

(All)
Position:Named
Obligatoire:True
Valeur du pipeline:True
Valeur du pipeline par nom de propriété:True
Valeur des arguments restants:False

CommonParameters

Cette applet de commande prend en charge les paramètres courants : -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction et -WarningVariable. Pour plus d’informations, consultez about_CommonParameters.