Remove-EntraApplicationKeyCredential
Removes a key credential from an application.
Syntax
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.
-ApplicationId
Specifies the ID of an application.-KeyId
Specifies a custom key ID. UseGet-EntraApplicationKeyCredential
to get the keyId details.
Parameters
-ApplicationId
Specifies a unique ID of an application in Microsoft Entra ID.
Type: | System.String |
Aliases: | ObjectId |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-KeyId
Specifies a custom key ID. The unique identifier for the password.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |