external help file | Module Name | online version | schema |
---|---|---|---|
Microsoft.Open.AzureAD16.Graph.PowerShell.Custom.dll-Help.xml |
AzureAD |
2.0.0 |
Removes a password credential from an application.
Remove-AzureADApplicationPasswordCredential -ObjectId <String> -KeyId <String>
[-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]
The Remove-AzureADApplicationPasswordCredential cmdlet removes a password credential from an application in Azure Active Directory (AD).
PS C:\> $AppID = (Get-AzureADApplication -Top 1).objectId
PS C:\> $KeyIDs = Get-AzureADApplicationPasswordCredential -ObjectId $AppId
PS C:\> Remove-AzureADApplicationPasswordCredential -ObjectId $AppId -KeyId $KeyIds[0].KeyId
The first command gets the ID of an application by using the Get-AzureADApplication (./Get-AzureADApplication.md)cmdlet, and then stores it in the $AppID variable.
The second command gets the password credential for the application identified by $AppID by using the Get-AzureADApplicationPasswordCredential (./ Get-AzureADApplicationPasswordCredential.md)cmdlet. The command stores it in the $KeyId variable.
The final command removes the application password credential for the application identified by $AppID.
Specifies how this cmdlet responds to an information event.
The acceptable values for this parameter are:
- Continue
- Ignore
- Inquire
- SilentlyContinue
- Stop
- Suspend
Type: ActionPreference
Parameter Sets: (All)
Aliases: infa
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies an information variable.
Type: String
Parameter Sets: (All)
Aliases: iv
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
@{Text=}
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
Specifies the ID of the application in Azure AD.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.