Get-EntraServicePrincipalKeyCredential
Sleutelreferenties ophalen voor een service-principal.
Syntax
Default (Standaard)
Get-EntraServicePrincipalKeyCredential
-ServicePrincipalId <String>
[<CommonParameters>]
Description
De Get-EntraServicePrincipalKeyCredential cmdlet haalt de sleutelreferenties voor een service-principal op in Microsoft Entra ID.
Voorbeelden
Voorbeeld 1: De sleutelreferentie van een service-principal ophalen
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
In dit voorbeeld worden de sleutelreferenties opgehaald voor de opgegeven service-principal in Microsoft Entra ID. U kunt de opdracht Get-EntraServicePrincipal gebruiken om een service-principal-object-id op te halen.
-
-ServicePrincipalIdparameter geeft de service-principal-id.
Parameters
-ServicePrincipalId
Hiermee geeft u de id op van de toepassing waarvoor de wachtwoordreferentie moet 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.