When trying to delete an account from Office 365 I receive an error message stating that this can only be done from the on premise Active directory.
With synchronised identities in Office 365, changes can only be made in the on-premises Active Directory and then synced to Office 365, or using the Office 365 (MSOnline) Powershell modules.
1. Delete the associated on-premises Active Directory account.
2. Use the Office 365 (MSOnline) Powershell modules which can be downloaded from here.
Once installed, the commands needed are:
remove-msoluser -userprincipalname email@example.com
This places the account in the 365 recycle bin for 30 days.
To remove from here use this command:
remove-msoluser -userprincipalname firstname.lastname@example.org -removefromrecyclebin
After this has been done the mailbox will be permanently deleted and unrecoverable.