Get-EntraServicePrincipalPasswordCredential
Haal referenties op voor een service-principal.
Syntax
Default (Standaard)
Get-EntraServicePrincipalPasswordCredential
-ServicePrincipalId <String>
[<CommonParameters>]
Description
De Get-EntraServicePrincipalPasswordCredential cmdlet haalt de wachtwoordreferenties voor een service-principal op in Microsoft Entra ID.
Voorbeelden
Voorbeeld 1: de wachtwoordreferentie van een service-principal ophalen
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 dit voorbeeld worden de wachtwoordreferenties voor de opgegeven service-principal opgehaald in Microsoft Entra ID.
-
-ServicePrincipalIdparameter geeft de object-id van een service-principal. U kunt de opdrachtGet-EntraServicePrincipalgebruiken om een service-principal-id op te halen.
Parameters
-ServicePrincipalId
Hiermee geeft u de id op van de service-principal waarvoor wachtwoordreferenties moeten worden opgeslagen.
Parametereigenschappen
| Type: | System.String |
| Default value: | None |
| Ondersteunt jokertekens: | False |
| DontShow: | False |
| Aliassen: | ObjectId |
Parametersets
(All)
| Position: | Named |
| Verplicht: | True |
| Waarde uit pijplijn: | True |
| Waarde uit pijplijn op eigenschapsnaam: | True |
| Waarde van resterende argumenten: | False |
CommonParameters
Deze cmdlet ondersteunt de algemene parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction en -WarningVariable. Zie about_CommonParametersvoor meer informatie.