Изменить

Поделиться через


Restore-EntraDeletedApplication

Restores a previously deleted application.

Syntax

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.

Type:System.String
Aliases:Object
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