When it comes to managing groups within an organization, there is often a need to delete or remove certain groups that are no longer needed. However, there may be instances where a group is deleted by mistake or a decision is made to restore the group later on. This is where the concept of “soft delete” comes into play.
Also Read
- How to Collect Usage Reports from 1 Teams Admin Center
- Better way to create 1 Notification and Alert Rules for App Submission and Device State Rule in Teams Admin Center
- Power BI: How to Export CQD from 1 Teams Admin Center smoothly
- VDI: How to Install or Update Microsoft Teams Desktop App quickly
- Magical deployment of 1 Walkie Talkie Communication in Microsoft Teams
A “soft delete” refers to a method of deleting a group without permanently removing it from the system. Instead, the group is hidden or archived and can be restored at a later date if needed. However, despite the ability to restore a soft-deleted group, it is not always a simple task.
One major issue is that restoring a soft-deleted group often requires the assistance of an administrator or someone with access to the appropriate permissions. This can be a problem if the person who deleted the group no longer has access to the system or if the administrator is unavailable. Additionally, restoring a soft-deleted group may not always result in the group being fully restored to its original state. This is because the group may have been modified or deleted by other users since it was originally soft-deleted.
Another issue is that restoring a soft-deleted group may not be possible at all, depending on the system or platform being used. For example, some systems do not allow for the restoration of soft-deleted groups, and the group must be recreated from scratch.
Investigation
- Check with customer current values on group property EmailAddresses using EXO PowerShell Module
Get-UnifiedGroup “groupname” -IncludeSoftDeletedGroups|fl Identity, EmailAddresses
Identity : Soft Deleted Objects\groupname_6fedbf86-1111-1111-1111-11111111
EmailAddresses : {smtp:alias1@contoso.com, SMTP:alias1@contoso.onmicrosoft.com}
- Check if any contact contains the same values
Get-Contact -Filter {WindowsEmailAddress -like “*alias1@contoso.com” -or WindowsEmailAddress -like “*alias1@contoso.onmicrosoft.com”}|fl Identity,WindowsEmailAddress - Check if any mailbox contains the same values
Get-Mailbox -Filter {EmailAddresses -like “*alias1@contoso.com” -or EmailAddresses -like “*alias1@contoso.onmicrosoft.com”}|fl Identity, EmailAddresses - Check if any group contains the same values
Get-UnifiedGroup -Filter {EmailAddresses -like “*alias1@contoso.com” -or EmailAddresses -like “*alias1@contoso.onmicrosoft.com”}|fl Identity, EmailAddresses
Alternatively you can use the command bellow
$GName = Read-Host -Prompt “Provide affected Group Name”
$aliases = @()
$aliases = (Get-UnifiedGroup “$GName” -IncludeSoftDeletedGroups).EmailAddresses<br>
if(!$aliases) {Write-Host “Not found group with name $($GName)” -ForegroundColor Red}else{
ForEach ($alias in $aliases) {
$alias = (($alias) -split ‘:’,2)[1]
$filter1 = ‘{EmailAddresses -like “*’+$alias+'”}’
$filter2 = ‘{WindowsEmailAddress -like “*’+$alias+'”}’
Write-Host “Checking Contact for $($alias)” -ForegroundColor Green
Get-Contact -Filter $filter2|select Identity,WindowsEmailAddress
Write-Host “Checking Mailbox for $($alias)” -ForegroundColor Green
Get-Mailbox -Filter $filter1|select Identity, EmailAddresses
Write-Host “UnifiedGroup Contact for $($alias)” -ForegroundColor Green
Get-UnifiedGroup -Filter $filter1|select Identity, EmailAddresses
}
}
Resolution
After finding the object that contains the same alias, ask to customer to check if this object is on AAD or AD, remove this value and restore the group
Conclusion
while the ability to restore a soft-deleted group may seem like a useful feature, it is not always a simple task and may not be possible in all cases. It is important for organizations to understand the limitations of restoring soft-deleted groups and to have a plan in place for dealing with accidental deletions.
Frequently Asked Questions and Answers:
What is a soft delete?
A “soft delete” refers to a method of deleting a group without permanently removing it from the system. Instead, the group is hidden or archived and can be restored at a later date if needed.
Why is restoring a soft-deleted group not always a simple task?
Restoring a soft-deleted group often requires the assistance of an administrator or someone with access to the appropriate permissions. Additionally, restoring a soft-deleted group may not always result in the group being fully restored to its original state.
Are there any systems that do not allow for the restoration of soft-deleted groups?
Yes, some systems do not allow for the restoration of soft-deleted groups, and the group must be recreated from scratch.
What should organizations do to deal with accidental deletions?
Organizations should understand the limitations of restoring soft-deleted groups and have a plan in place for dealing with accidental deletions. This could include ensuring that multiple administrators have access to the appropriate permissions or regularly reviewing and archiving groups that are no longer needed.