I accidently deleted an Azure Ad application and want to restore it from Powershell.
To get the Azure Ad deleted application, I found this command Get-AzureADDeletedApplication
.
To restore the application, I am using the below command:
Restore-AzureADDeletedApplication
But I am getting Resource not found error. Please help me with the error and where I am going wrong.
CodePudding user response:
Thank You @NiMux
for your suggestion- We have tested in our environment; it is working fine using the objectId
there is no option to pass clientId
as a parameter of Restore-AzureADDeletedApplication
.
If you are passing the ClientId
forcefully it will give you an error.
Note:
The AppRegistration
can be restored but it won't restore the Enterprise Application once deleted.
Output: After restoring the AppRegistration
.