Get-EntraServicePrincipalPasswordCredential
Obtenez les informations d’identification d’un principal de service.
Syntaxe
Default (Par défaut)
Get-EntraServicePrincipalPasswordCredential
-ServicePrincipalId <String>
[<CommonParameters>]
Description
L’applet Get-EntraServicePrincipalPasswordCredential de commande obtient les informations d’identification de mot de passe d’un principal de service dans Microsoft Entra ID.
Exemples
Exemple 1 : Récupérer les informations d’identification de mot de passe d’un principal de service
Connect-Entra -Scopes 'Application.Read.All'
$servicePrincipal = Get-EntraServicePrincipal -Filter "displayName eq 'Helpdesk Application'"
Get-EntraServicePrincipalPasswordCredential -ServicePrincipalId $servicePrincipal.Id
CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime
------------------- ----------- ----------- ---- ----- ---------- -------------
17-04-2025 07:32:41 gjW bdf6a3df-cc9b-4612-b948-e32804ee88f7 17-04-2024 07:32:41
21-03-2025 08:12:08 4fl 7f4414ec-8f72-49a8-b949-70d635899656 21-03-2024 08:12:08
12-12-2024 08:39:07 mjl 0fff6b21-0a20-4f7c-93ba-26ed9b648344 12-12-2023 08:39:10
Cet exemple récupère les informations d’identification de mot de passe pour le principal de service spécifié dans Microsoft Entra ID.
-
-ServicePrincipalIdspécifie l’ID d’objet d’un principal de service. Vous pouvez utiliser la commandeGet-EntraServicePrincipalpour obtenir un ID de principal de service.
Paramètres
-ServicePrincipalId
Spécifie l’ID du principal de service pour lequel obtenir les informations d’identification de 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.