Get-EntraServicePrincipalPasswordCredential
Ottenere le credenziali per un'entità servizio.
Sintassi
Default (Impostazione predefinita)
Get-EntraServicePrincipalPasswordCredential
-ServicePrincipalId <String>
[<CommonParameters>]
Descrizione
Il Get-EntraServicePrincipalPasswordCredential cmdlet ottiene le credenziali della password per un'entità servizio in Microsoft Entra ID.
Esempio
Esempio 1: Recuperare le credenziali password di un'entità servizio
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
In questo esempio vengono recuperate le credenziali della password per l'entità servizio specificata in Microsoft Entra ID.
-
-ServicePrincipalIdparametro specifica l'ID oggetto di un'entità servizio. È possibile usare il comandoGet-EntraServicePrincipalper ottenere un ID entità servizio.
Parametri
-ServicePrincipalId
Specifica l'ID dell'entità servizio per cui ottenere le credenziali della password.
Proprietà dei parametri
| Tipo: | System.String |
| Valore predefinito: | None |
| Supporta i caratteri jolly: | False |
| DontShow: | False |
| Alias: | ObjectId |
Set di parametri
(All)
| Posizione: | Named |
| Obbligatorio: | True |
| Valore dalla pipeline: | True |
| Valore dalla pipeline in base al nome della proprietà: | True |
| Valore dagli argomenti rimanenti: | False |
CommonParameters
Questo cmdlet supporta i parametri comuni: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction e -WarningVariable. Per altre informazioni, vedi about_CommonParameters.