There are a few ways to create Office 365 Groups. You can create a group individually in the Admin Center, but they also get generated automatically when you create a Team in Microsoft Teams and the new Modern SharePoint Team site. This blog will walk through some aspects of how to manage those groups and show how to restore and delete Office 365 groups.
In Office 365, when a group is deleted (Remove-AzureADMSGroup), the default retention period is 30 days. During this period, the Group remains in a Soft Delete state. This allows for administrators to restore the group, if necessary. However, there is a command available if you wish to permanently remove the group.
Connect to Azure AD with PowerShell
Before connecting to Azure AD with PowerShell, be sure the AzureAD PowerShell Module is installed on your machine (a link to Microsoft’s documentation is included in the references section at the end of this post).
Now you’re ready to connect to Azure AD. Connecting to Azure AD will prompt you for credentials. If the connection is successful, you’ll see some basic information about your tenant.
Get Soft-Deleted Groups
Now that you’re successfully connected to your tenant, you want to get a listing of the O365 groups that are in a Soft Delete state.
Restore Deleted Groups
If you wish to restore a given group, run the following command, using the ID from the command above.
Restore-AzureADMSDeletedDirectoryObject -Id <objectId>
Permanently Delete Group(s)
If you wish to bypass the 30-day Recycle Bin waiting period, and permanently delete the group, run the following command:
Remove-AzureADMSDeletedDirectoryObject –Id <objectId>
Run the Remove command, along with the ID of the Group you want to delete. Successful execution will not return any results. Run the Get-AzureADMSDeletedGroup command again to validate that your group is no longer in a Soft Delete state, and was, in fact, deleted.
Finally, if your organization needs help with any aspect of Office 365, please reach out to us. We’d love to help you get started.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
|cookielawinfo-checbox-analytics||11 months||This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".|
|cookielawinfo-checbox-functional||11 months||The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".|
|cookielawinfo-checbox-others||11 months||This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.|
|cookielawinfo-checkbox-necessary||11 months||This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".|
|cookielawinfo-checkbox-performance||11 months||This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".|
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.