Restore-EntraDeletedApplication

Restores a previously deleted application

Syntax

Restore-EntraDeletedApplication
        [-IdentifierUris <System.Collections.Generic.List`1[System.String]>]
       -ObjectId <String> 
       [<CommonParameters>]

Description

This cmdlet restores a previously deleted application.

Restoring an application doesn't restore the associated service principal automatically. You must explicitly restore the deleted service principal.

For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles.

  • Application Administrator
  • Cloud Application Administrator
  • Hybrid Identity Administrator

Examples

Example 1: Restores a previously deleted application

Connect-Entra -Scopes 'Application.ReadWrite.All'
Get-EntraApplication

ObjectId                             AppId                                DisplayName
--------                             -----                                -----------
dddddddd-3333-4444-5555-eeeeeeeeeeee 00001111-aaaa-2222-bbbb-3333cccc4444 PowerShellGraphAPI
eeeeeeee-4444-5555-6666-ffffffffffff 11112222-bbbb-3333-cccc-4444dddd5555 WingTips
ffffffff-5555-6666-7777-aaaaaaaaaaaa 22223333-cccc-4444-dddd-5555eeee6666 AzurePopulator

Connect-Entra -Scopes 'Application.ReadWrite.All'
Remove-EntraApplication -ObjectId dddddddd-3333-4444-5555-eeeeeeeeeeee
Get-EntraDeletedApplication

ObjectId                             AppId                                DisplayName
--------                             -----                                -----------
dddddddd-3333-4444-5555-eeeeeeeeeeee 00001111-aaaa-2222-bbbb-3333cccc4444 analog

Connect-Entra -Scopes 'Application.ReadWrite.All'
Restore-EntraDeletedApplication -ObjectId dddddddd-3333-4444-5555-eeeeeeeeeeee

ObjectId                             AppId                                DisplayName
--------                             -----                                -----------
dddddddd-3333-4444-5555-eeeeeeeeeeee 00001111-aaaa-2222-bbbb-3333cccc4444 analog

This example shows how an application is deleted, then the deleted application is retrieved using the Get-EntraDeletedApplication cmdlet, and after the application is restored by specifying the application's Object ID in the Restore-EntraDeletedApplication cmdlet.

Parameters

-IdentifierUris

The IdentifierUris of the application that is to be restored

Type:System.Collections.Generic.List`1[System.String]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ObjectId

The ObjectId of the deleted application that is to be restored

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

System.String

Outputs

System.Object