How do I recover my deleted application

coderjun 0 Reputation points
2023-10-25T09:17:07.4233333+00:00

I accidentally deleted my app. How do I recover it

企业微信截图_e733908d-7edd-43d0-a28d-453f8fb6a05b

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,851 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Barry Evanz 235 Reputation points
    2023-10-27T13:09:51.05+00:00

    Within the Microsoft Entra admin center, navigate to Identity, then Applications, and finally, App registrations. Proceed to the Deleted applications tab, where you can search for and select the specific app that needs restoration. Once chosen, click on "Restore app registration." It's important to note that this method works if the deletion occurred within the last 30 days. Should you attempt to recover an app deleted more than 30 days ago, it regrettably remains permanently unrecoverable.

    For a more programmatic approach, PowerShell commands can be employed. The "Restore-AzureADMSDeletedAppRegistration" command, followed by the object ID of the app, allows for app restoration. To obtain the app object ID, utilize the "Get-AzureADApplication" PowerShell command with the app's ID. Here's how you can use these commands:

    # Restore a deleted app using PowerShell
    Restore-AzureADMSDeletedAppRegistration -ObjectId <app object ID>
    

    To obtain the app object ID, you can use this command:

    # Get the app object ID
    Get-AzureADApplication -ObjectId <app ID>
    

    Replace "<app ID>" with the appropriate app ID, and exercise caution when handling code. Once the app is restored, remember to reassign any necessary permissions or roles, as well as reconfigure the app's settings to its prior state.

    An essential note to bear in mind is that the authority to restore deleted apps is reserved for administrators, as only they possess the requisite privileges to initiate the recovery process.