Edit

Share via


Restore-EntraBetaDeletedApplication

Restores a previously deleted application.

Syntax

Restore-EntraBetaDeletedApplication
       -ApplicationId <String>
       [-IdentifierUris <System.Collections.Generic.List`1[System.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'
$deletedApplication = Get-EntraBetaDeletedApplication -SearchString 'My PowerShell Application'
Restore-EntraBetaDeletedApplication -ApplicationId $deletedApplication.Id

Id                                   DeletedDateTime
--                                   ---------------
ffffffff-5555-6666-7777-aaaaaaaaaaaa

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

  • -ApplicationId parameter specifies the ObjectId of the deleted application that is to be restored.

Parameters

-ApplicationId

The object ID of the deleted application that is to be restored.

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

-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

Inputs

System.String

Outputs

System.Object