[How to] Permanently Remove Deleted Users from Office 365
If it was on the local servers, we could have forcefully deleted all the users and no traces were able to be seen on the deleted items, but unfortunately on office 365 when you delete users it always gets stack on the ‘Deleted users’ and you cannot remove users from this place too. This is why because, this point is the safety net. If you mistakenly deleted some users that are actually important, and if it gets hard delete on one click…. You can just imagine what could be the impact of it on you…so whichever the user we delete from the Office 365 it gets soft delete and relocated in ‘Deleted Users’ location, so that if it was mistaken then we can restore it easily.
All of the above was the good point, but in every system, there comes the trade-off of advantages with disadvantages. Hence here the disadvantage is, sometime you create a user and it is not as of you wanted… there might be some technical difficulties. So, you just want to make fresh start and create a ‘New User’ and when you click on create; you get an error saying ‘user already exist’. You check the user on ‘Active users’ no it is not there… and when you check on ‘Deleted users’ oh… it is there. And there comes you need to hard delete that user from the ‘Deleted users’. So, what we do??? We even don’t have remove users on GUI… Hence here I am with the help that how to remove the ‘Deleted users’ from the office 365.
Below is the snapshot with the users on the ‘Deleted users’ section of Office 365 which I want to get clear up.
So, to clear up these users, I get connected to the CUI of Office 365 using ‘WAAD Module for WPS’
PS C:\Users> Connect-MsolService
On the prompted, credentials I provided my Office 365 administrator credential.
So, to make sure I do have users on the deleted directory, I use cmdlet
PS C:\Users> Get-MsolUser -ReturnDeletedUsers
Now, if I have to remove the specific user form the user list. I can just identify single user and use the below cmdlet to remove the user.
PS C:\Users> Remove-MsolUser -UserPrincipalName 032bct2070@demos.pdhewaju.com.np -RemoveFromRecycleBin -Force
But If, I have to make whole ‘Deleted user’ list empty. I can use this cmdlet to clear up the ‘Deleted Users’
PS C:\Users> Get-MsolUser -ReturnDeletedUsers | Remove-MsolUser -RemoveFromRecycleBin -Force
So when I go back to my GUI on ‘Deleted users’ I can see everything is empty.
Hope this blog was helpful to you all… keep catching up 😀