Remove-EntraDeletedApplication
Permanently delete a recently deleted application object from deleted items.
Syntax
Remove-EntraDeletedApplication
[-ObjectId] <String>
[<CommonParameters>]
Description
Permanently delete a recently deleted application object from deleted items. After an item is permanently deleted, it can't be restored.
For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles.
- To permanently delete deleted applications or service principals: Application Administrator, Cloud Application Administrator, or Hybrid Identity Administrator.
Examples
Example 1: Remove deleted application object
Connect-Entra -Scopes 'Application.ReadWrite.All'
$deletedApplication = Get-EntraDeletedApplication -SearchString 'My PowerShell Application'
Remove-EntraDeletedApplication -ObjectId $deletedApplication.Id
This command removes recently deleted application. You can use the command Get-EntraDeletedApplication
to get deleted application Id.
-ObjectId
parameter specifies the Id of a deleted application.
Example 2: Remove deleted application using pipelining
Connect-Entra -Scopes 'Application.ReadWrite.All'
Get-EntraDeletedApplication -Filter "DisplayName eq 'My PowerShell Application'" | Remove-EntraDeletedApplication
This command removes recently deleted application using pipelining.
Parameters
-ObjectId
The unique identifier of deleted application.
Type: | System.String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
System.String
Outputs
System.Object