New feature: Recover deleted Office 365 Group via PowerShell

Microsoft

If you've deleted an Office 365 group, it's now retained by default for a period of 30 days. Within that period, you can now restore the group and its associated apps and data via a new PowerShell cmdlet.  For additional information please go to https://aka.ms/groupssoftdelete.

 

RestoreGroup.JPG

50 Replies

@Ronald Knaap during my testing I noticed delays as well. In my case the user got a "Something has changed etc etc and you must restart Outlook" popup. After restarting Outlook the Groups appeared.

I've restarted Outlook several times but still no restored group so far. 

 

Maybe it's a matter of time

 

Which is our slogan with Office 365 the last few months.. If something doesn't work...

"It's a matter of time!" :) 

 

And most of the times... it is :)

I guess it makes sense, considering the model Groups use to "signal" the different workloads. It's a very good idea to note this in the documentation, maybe with somewhat bigger letters :)


@Ronald Knaap wrote:

 

Which is our slogan with Office 365 the last few months.. If something doesn't work...

"It's a matter of time!" :) 

Many Office 365 problems are solved by just waiting longer.

I just needed the restore for a group which is being used in a production environment. I did the restore 15 min ago and the timeline of the conversations is already back(this took like 5 min).

 

It is only taking some more time to restore the Onenote and SharePoint data. Are there any insights on how long it will take before everything is restored. Or is this the delay part, what i am waiting for now?

@Christophe FiessingerWhen i now navigate to the group from outlook web. I get in the group. Only when i go to files i get. the message: That there is no data and that i can start using the area. When i navigate to the Library i get an 403 error page cannot be found. Does this means it is still restoring?

From the documentation mentioned above:

This process usually takes just a few minutes but in a few rare cases it can take as long as 24 hours to completely restore. To verify that the group has been successfully restored, run this command in PowerShell:

Get-AzureADGroup –ObjectId <objectId>

Once the restore has successfully completed, the group should reappear on the navigation pane in Outlook and Outlook on the web and all restored content, including SharePoint and Planner, should be available to the group members again.

Well, it looks like it's a problem on my client because I restored a group which my colleague removed yesterday and it reappeared in his Outlook client.. (after a restart of the client) 

 

Or it has something to do with the groups because I (mis)used them a lot for testing ;)

Not sure what you did but as usual if it feels like a bug please reach our support channel to get it handled properly.

The restore is completed so it took arround 10 min to restore the Conversations and 6 hours to restore +/-350 GB of data in SharePoint.

 

Anyways the restore works just perfect :) Thanks for making this feature available!


@Christophe Fiessinger wrote:

From the documentation mentioned above:

This process usually takes just a few minutes but in a few rare cases it can take as long as 24 hours to completely restore. To verify that the group has been successfully restored, run this command in PowerShell:

Get-AzureADGroup –ObjectId <objectId>

Once the restore has successfully completed, the group should reappear on the navigation pane in Outlook and Outlook on the web and all restored content, including SharePoint and Planner, should be available to the group members again.


I think you should reword that. The "few minutes" hasn't been true for any of my test cases so far.

 

Also, the Group appears in the Get-AzureADGroup output (indicating it's been restored successfully) long before all the content in different apps is available.

 

And also, the Group appears in the Outlook navigation pane long before all the content in different apps is available.

 

Perhaps a more accurate wording would be to say that the Get-AzureADGroup output or the appearance in Outlook confirms that the restore has *started*, and that it may process for several hours before all services are available again. That would set expectations better than the current wording.

I totally agree with that. In the time between the success from the command in powershell and the time the restore is actually completed it would be great to see some kind of progress so you know what you are dealing with.
This would be a great addition to the script because if one half of the restore is complete and the other half gives you a 403 error. I was wondering if my data would be restored.

I installed Online Services Sign-In Assistant and AzureADPreview 2.0.0.98 on Windows 10 and connected to Azure AD with our tenant admin account, but when I execute Get-AzureADMSDeletedGroup cmdlet I receive the error;

The term 'Get-AzureADMSDeletedGroup' is not recognized as the name of a cmdlet, function, script file, or operable program.
Do I need antoher version of the AzureADPreview or am I missing a prerequisite?

 

 

Hi Paul,

 

The 'Get-AzureADMSDeletedGroup' cmdlet is part of AzureADPreview 2.0.0.98 so you should be able to use it if you installed this module. Can you please verify that the module has been installed correctly? You can use "Get-Module AzureADPreview" for that.

If you have installed the correct module on your computer you should be able to use the cmdlet. Please let me know if it still doesn't work.

 

-Rob

Hi Rob,

 

Thanks for your reply.
I just got it working, but don't know what the issue was.
On Win10 and Server2012R2 the AzureADPreview module installed, but Get-Module AzureADPreview showed no result.
On server2008R2 it works. I first installed the PackageManagement PowerShell Modules and the Online Services Sign-In Assistant and that executed Install-Module -Name AzureADPreview.
The same steps didn't work on Win10 and Server 2012R2.

Do you know if there is a log where I can find Install-Module errors?

 

@Drew Madelung if you get the lastest module you will see a new property exposed: DeletedDateTime as shown belowGet-AzureADMSDeletedGroup | Sort-Object DisplayName| Format-Table Id, DisplayName, Description, Visibility, DeletedDateTimeGet-AzureADMSDeletedGroup | Sort-Object DisplayName| Format-Table Id, DisplayName, Description, Visibility, DeletedDateTime

This is Great News! well done

I tested the restore process and found that everything came back pretty quickly.  I could access the restored Group in Outlook on the Web almost immediately.  The SharePoint Team Site took a little longer to restore, maybe 5-10 minutes later.

 

The only service that hasn't restored yet is Teams.  Do we have to wait even longer for Teams?  I re-connected Teams to the Group to see if the content was there, it was not.  Should the Team automatically reconnect to the Group after restore?  Will it still restore the content even after I've re-connected Teams to the Group?

Teams will also be restored, This will take about the same amount of time as the SharePoint Library