Get-EntraServicePrincipalKeyCredential

サービス プリンシパルのキー資格情報を取得します。

構文

Default (既定)

Get-EntraServicePrincipalKeyCredential

    -ServicePrincipalId <String>
    [<CommonParameters>]

説明

Get-EntraServicePrincipalKeyCredential コマンドレットは、Microsoft Entra IDのサービス プリンシパルのキー資格情報を取得します。

例 1: サービス プリンシパルのキー資格情報を取得する

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

この例では、Microsoft Entra IDで指定されたサービス プリンシパルのキー資格情報を取得します。 コマンド Get-EntraServicePrincipal を使用して、サービス プリンシパル オブジェクト ID を取得できます。

  • -ServicePrincipalId パラメーターは、サービス プリンシパル ID を指定します。

パラメーター

-ServicePrincipalId

パスワード資格情報を取得するアプリケーションの ID を指定します。

パラメーターのプロパティ

型:System.String
規定値:None
ワイルドカードのサポート:False
DontShow:False
Aliases:オブジェクト識別子

パラメーター セット

(All)
配置:Named
必須:True
パイプラインからの値:True
プロパティ名別のパイプラインからの値:True
残りの引数からの値:False

CommonParameters

このコマンドレットでは、一般的なパラメーター -Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction、-WarningVariable の各パラメーターがサポートされています。 詳細については、about_CommonParametersを参照してください。