Edit

Share via


Restore-EntraDeletedApplication

Restores a previously deleted application.

Syntax

Default (Default)

Restore-EntraDeletedApplication

    [-IdentifierUris <System.Collections.Generic.List`1[System.String]>]
    -ApplicationId <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-EntraDeletedApplication -SearchString 'My PowerShell Application'
Restore-EntraDeletedApplication -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-EntraDeletedApplication cmdlet, and subsequently the application is restored by specifying the application's Object ID in the Restore-EntraDeletedApplication cmdlet.

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

Parameters

-ApplicationId

The ApplicationId (Object Id) of the deleted application that is to be restored.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Object

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-IdentifierUris

The IdentifierUris of the application that is to be restored.

Parameter properties

Type:

System.Collections.Generic.List`1[System.String]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

System.String

Outputs

System.Object