Get-EntraServicePrincipalPasswordCredential

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

構文

Default (既定)

Get-EntraServicePrincipalPasswordCredential

    -ServicePrincipalId <String>
    [<CommonParameters>]

説明

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

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

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

次の使用例は、Microsoft Entra IDで指定されたサービス プリンシパルのパスワード資格情報を取得します。

  • -ServicePrincipalId パラメーターは、サービス プリンシパルのオブジェクト ID を指定します。 コマンド Get-EntraServicePrincipal を使用して、サービス プリンシパル 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を参照してください。