Permanently Delete User from Office 365 – All You Need to Know


Microsoft Office 365 is an application suite which consists of various services & tools like MS Office Online, Exchange Online, Lync Online, etc. One of the most popular tool/ service is Exchange Online. The organizations use Outlook Web Access(OWA) as their web email client & prefer Exchange Online to manage all users’ email mailboxes. In case an employee has left the organization, we should first block their access & secure their data before we consider deleting their account permanently.

There are two ways to permanently delete user from Office 365, which are soft & hard deletion. When you soft delete a user from Office 365 using O365 control panel, they are saved in a recycle bin for 30 days. But after 30 days, the account gets hard deleted (purged), in simple words; the user mailbox gets deleted and cannot be recovered.

Recommended: Before moving forward with the deletion process, we should first backup Office 365 mailbox to keep records of the mailbox data.

Another way to hard delete / deactivate Office 365 user is by using PowerShell commands. To manage the accounts using PowerShell commands, all you need to do is go to the Azure AD (Active Directory).

We will discuss in detail about the method to permanently delete Office 365 mailbox in the following sections.

But first let’s take a look on some user queries on this issue.


Permanently Delete User from Office 365 : User Queries

The few issues or concerns of the users while they try to disable Office 365 email account are as mentioned below.


“Our organization had a user whose mailbox we had migrated to Exchange Online from On Premise. While this process was in progress, the user mailbox got some bug. And this forced us to regenerate the user’s on premise mailbox and transfer all the mails to that new account.

We managed to disable/ disconnect the user’s online mailbox but now we are unable to migrate the new user mailbox while the old mailbox is still there. So now my question is; how to permanently delete Office 365 mailbox so that we can migrate the new mailbox to Exchange Online(Office 365)?”


“I need to remove email account from Office 365. The user is now blacklisted from our organization. So being an IT admin, I am looking for a solution to permanently delete user from Office 365. One method that I am aware of is to wait for 30 days for the soft deleted emails to get deleted automatically from the recycle bin. Is there any other alternative that I am unaware of?


After looking at the user concerns, now let us discuss the scenarios/ cases where a user account can be permanently deleted from Office 365.


Hard Deleted Mailboxes : Deletion Scenarios

A hard-deleted user account is a mailbox that was deactivated/ removed in the following conditions:

  • If the user account is soft deleted, it is moved to the Recycle bin and stays there for 30 days. If the user has been soft-deleted for more than 30 days and the associated Azure AD (Active Directory) user has been hard-deleted. In this case, all mailbox data such as contacts, emails, calendars, and documents will be deleted forever.
  • If the soft deleted user account has been removed using the Remove-Mailbox -PermanentlyDelete cmdlet and parameter in EMS (Exchange Management Shell).
  • If the user account’s associated Azure AD user account has been hard-deleted in the Azure AD. The user account will now be soft deleted in O365/ Exchange Online. If within the retention time period of 30 days, a new Azure Active Directory(AD) user mailbox is created/ synchronized from the original on-premise recipient account with the same ArchiveGuid or ExchangeGuid, and that new account is licensed for Exchange Online, then this will hard delete the original user mailbox from Office 365. Every mailbox data will be lost and cannot be recovered.


Now, after discussing about the user issues & scenarios that disable Office 365 account; let us now explore various methods to permanently delete user from Office 365.


How to Permanently Delete Office 365 Mailbox?

There are various procedures to hard delete a user account in Exchange Online / Office 365. The methods are as follows:

  1. Soft Delete Using EMS & Wait for 30 Days

To remove the user mailbox, you need to have certain permissions.

When you remove an Exchange Online user account using the EMS (Exchange Management Shell), the relating O365 user is deactivated/ disconnected and it is also removed from the list of user mailboxes in the O365 admin center. The user account can still be recovered within 30 days, before the user account gets permanently deleted.


The following command is an example which removes/ disables an Exchange Online account and the corresponding Office 365 user mailbox for XYZ SSA.


Remove-Mailbox -Identity “XYZ SSA”


Note: You could wait for 30 days for hard deletion of the soft deleted account, or you could follow the below procedure to permanently delete Office 365 account.


  1. Permanently Delete Office 365 Account Using PowerShell

To hard delete the above user from Office 365, use the below mentioned command to delete the user mailbox for XYZ SSA from the Azure AD.


Step :1 Run the following command to connect to Azure AD. Enter the admin Username & Password of the Office 365 account.



Step :2  To check the list of all the deleted mailboxes present in the recycle bin, use the following command:

Get-MsolUser –ReturnDeletedUsers

Step :3 Delete email account from Office 365 using PowerShell commands as given below:

i) For Single Mailbox Deletion

Remove-MsolUser –UserPrincipalName [XYZ SSA] –RemoveFromRecycleBin –Force

ii) For Multiple Accounts Deletion

Get-MsolUser –MaxResults 25 -ReturnDeletedUsers | Remove-MsolUser –RemoveFromRecycleBin -Force

Step :4 You may again follow the Step :2 to verify the hard deletion of the mailbox. If the user account is not visible in the recycle bin, it means that the user mailbox is disabled permanently.



In this blog we have explored the two types of deletion of an Office 365 user, various user queries regarding deletion of an O365 user account, several hard deletion scenarios & how to permanently delete user from Office 365. Also it is recommended to first take backup of all user’s data before you remove/ deactivate Office 365 user mailbox.

NOTE: This article is posted AS IS from the original author

Tej Pratap Shukla (Dexter) –





Notes From Microsoft iGnite 2016 #msignite

Running from Hall A to Hall C and then back to Hall A I needed up walking/running approximately 4 miles (6 km) per day, yeah it was good cardio J

I went there to learn more about on-premises Exchange Server 2016 and Hybrid configuration with Office 365 BUT was not quite impressed though you search the sessions you will find approx. 57 sessions on EXCHANGE but most of the are just Office 365 features and product marketing. It looks like iGnite email related (messaging) content were focused to a specific customer market or in other words they ignored the large enterprise customer running complex exchange environment.

I’d also mention that there were some sessions which I liked most and one of them was just specific to Office 365 but it is related to on-premises stuff (Below is the list of sessions I liked most or in other word 5/5 on the score card).

Challenge cloud encryption myths and learn about Office 365 BYOK plans
Yes, now you can bring your own keys.  Very information session from Jaclynn.

Migrate to Exchange Online via Exchange Hybrid
2nd session of the day for Hybrid.  Tons of information, must watch Tim and Mike did an awesome job.  And yes don’t forget to run the RCW on-premises.

Meet twin sons of different mothers (MVPs and Exchange engineers). It was a very interactive session carried out by Tony Redmond with folks from Product Team (Karim Battish and Jeff Mealiffe) and Exchange MVP (Andrew Higginbotham and Jeff Guillet). The room was full of on-premises Exchange Enthusiast.

The Ultimate Field Guide to Office 365 Groups. Microsoft gave a lot of information at Ignite about future developments for Office 365 Groups. This session provided a counterweight in that it focused on how groups are used in the field. This session was carried out by Tony Redmond and Bejamin Niaulin.

Unplug with the experts on Exchange Server and Exchange Online
Another interactive session. Discussion on on-premises, Modern-Auth, ADFS and Hybrid


So to conclude that overall it was a busy event, specially with running from one hall to another (wish they plan it better next year). Other than attending these breakout sessions I got most of questions answered by meeting the product team at the booth, I spent HOURS with them.


#MSiGnite 2016 Post Keynote Day2 Sessions

The day 2 has just started and I’m going post more blog post but short post and it will cover the highlight to give you (readers) the idea what’s going here 🙂

The first session i attended was on Collaboration with Office 365. 
Speaker – Kady Dundas – and Dan Holmes

This Office 365 sessions explained how can an organization be more effective and productive leveraging features such as Office 365 Group/OutlookYammer, Smart File Attachment using OD4b. One of the most use case of Office 365 Group v/s Distribution Group where Distribution Groups members email back and forth and there no conversation history other than the mailboxes of the distribution group members and users end up using really all in some cases. Also a tedious task if someone new joins the team, Office 365 Group solves that issue.

Office 365 groups were also covered #Millennial , where these groups can be leveraged for contractor and Millennial , since Millennial like social networking and Office 365 are work very well with Yammer too.  Office 365 Group can be configured Public and Private.

Smart attachment of a document using OD4B, Document co-authring and Chat feature in the document (possible with Skype) and Sharepoint Dashboard were also the part of this session. I’m not sure if this event is going to be repeated and if not then watch a recorded session

Collaboration with Microsoft Office 365


Online Document Editing (Office Online Server 2016) Failed with On-Prem Exchange 2016 Server

Screen Shot 2016-07-22 at 4.44.30 PM

If you have setup an Office Online Server 2016 with Exchange Server 2016 CU2, and if you are getting this error then there is something wrong with the configuration. It does not mean that your installation was wrong but during the configuration of Office WebApp Farm you forgotten to mention the Edit Option. So re-run the command with the Editing Enable and you will be done.

Screen Shot 2016-07-22 at 5.39.52 PM

PS C:> New-OfficeWebAppsFarm -InternalURL "" -ExternalURL "" -CertificateName "The Office 365 SME" -EditingEnabled -EditingEnabled

Screen Shot 2016-07-22 at 4.40.22 PM
Screen Shot 2016-07-22 at 4.55.30 PM

Office Document Editing using Office Online Server 2016 with On-Prem Exchange 2016

Product covered – Office Online Server 2016 and Exchange 2016 CU2

Summary/Goal – Achieve document editing using a web browser without having desktop version of MS Office 2016


Like Office 365 document editing, you can also setup your infrastructure for the on-prem document editing . The end-user does not require desktop version of Microsoft Office.

In this lab, I’m using a 3rd party ssl certificate and all the domain name are FQDN.
Exchange URLS, auto 
OOS Server URL 
Friendly Certificate name The Office 365 SME


Begin Installation

Office Online Server 2016

If you see the same error as I did then install the particular KB, once installed it will dis-appeared as below

Screen Shot 2016-07-22 at 3.00.49 PM

Screen Shot 2016-07-22 at 4.08.16 PM


Now setup your OfficeWebApp Farm as below – As mentioned above I’m using the same url. These are my lab urls–

Screen Shot 2016-07-22 at 4.10.32 PM

It FAILED, because the certificate name was type incorrectly. I ran the same cmdlet agains with the correct Certificate Name ‘The Office 365 SME’

Screen Shot 2016-07-22 at 4.29.04 PM

Setting up Exchange 2016 Server to integrate with Office Online Server 2016

Screen Shot 2016-07-22 at 4.36.06 PM

Verifying the above integration –

Screen Shot 2016-07-22 at 5.24.57 PM


Viewing / Editing the Document Online via browser on your On-Prem Exchange 2016

Screen Shot 2016-07-22 at 4.37.54 PM


Screen Shot 2016-07-22 at 4.38.24 PM


Cheers 🙂

Now your on-prem Exchange 2016 offers you the same feature (one of them) as Office 365.

Office Online Server 2016 Install and Update for Universal C Runtime in Windows

You may get this error if you are installing Office Online Server 2016 on Windows 2012 R2 Data center.

There are two ways to fix it, either install the below KB or do the full server update if you are setting up a new server , like in this example.

Office Online Server 2016

As soon as I’ve done the server update and ran the setup again I don’t see this error anymore and the installation goes smooth.

Screen Shot 2016-07-22 at 12.19.25 PM

Now you are good to go with the installation of OOS 16.