Remove-EntraApplicationKeyCredential
Removes a key credential from an application.
Syntax
Default (Default)
Remove-EntraApplicationKeyCredential
-ApplicationId <String>
-KeyId <String>
[<CommonParameters>]
Description
The Remove-EntraApplicationKeyCredential cmdlet removes a key credential from an application.
An application can use this command along with New-EntraApplicationKeyCredential to automate the rolling of its expiring keys.
Examples
Example 1: Remove a key credential
Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy'
$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'"
Remove-EntraApplicationKeyCredential -ApplicationId $application.Id -KeyId 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333'
This command removes the specified key credential from the specified application.
-ApplicationIdSpecifies the ID of an application.-KeyIdSpecifies a custom key ID. UseGet-EntraApplicationKeyCredentialto get the keyId details.
Parameters
-ApplicationId
Specifies a unique ID of an application in Microsoft Entra ID.
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 |
-KeyId
Specifies a custom key ID. The unique identifier for the password.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
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.