Get-EntraApplicationKeyCredential
Gets the key credentials for an application.
Syntax
Default (Default)
Get-EntraApplicationKeyCredential
-ApplicationId <String>
[<CommonParameters>]
Description
The Get-EntraApplicationKeyCredential cmdlet retrieves the key credentials for an application. Specify ApplicationId parameter to retrieve the key credentials for an application.
Examples
Example 1: Get key credentials
Connect-Entra -Scopes 'Application.Read.All'
$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'"
Get-EntraApplicationKeyCredential -ApplicationId $application.Id
CustomKeyIdentifier DisplayName EndDateTime Key KeyId StartDateTime Type Usage
------------------- ----------- ----------- --- ----- ------------- ---- -----
{116, 101, 115, 116…} MyApp Cert 6/27/2024 11:49:17 AM bbbbbbbb-1c1c-2d2d-3e3e-444444444444 6/27/2023 11:29:17 AM AsymmetricX509Cert Verify
This command gets the key credentials for the specified application.
-ApplicationId parameter specifies the ID of an application object in Microsoft Entra ID.
Parameters
-ApplicationId
Specifies a unique ID of an application in Microsoft Entra ID to retrieve key credentials. Use Get-EntraApplication for more details.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ObjectId |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.