Link to home
Start Free TrialLog in
Avatar of Jaime Campos
Jaime CamposFlag for United States of America

asked on

How to reenable a mailbox Exchange 2013 hybrid w/O365 once AD account

We are running Exchange 2013 in a hybrid environment O365. A user account was disabled within AD and now that we re-enabled and try to locate Exchange account it doesn't list mail account within deleted or allow me to re-enable? I can see account within Get-remote mailbox, however how do you re-enable or resync it?

Thanks,

Jaime Campos
SOLUTION
Avatar of Radhakrishnan
Radhakrishnan
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jaime Campos

ASKER

ok, the user account is enabled within AD. I log into Exchange powershell and run Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisplayName -eq "<Jane Doe>" } | fl DisplayName,Database,DisconnectReason and returns nothing. The mailbox type is Office365.

I see account in EAC and select 'connect mailbox', I then select my server and I do not see anything listed to proceed? Do I have to do anything on the O365 side?
1st you need to decide if user having mailbox onpremise or in cloud

also the command need to be run against single user and not against entire database

get-mailboxstatistics <alias> | fl

when you see account with get-remotemailbox, it means mailbox is in cloud, how can you get it on premise

have you checked  if account is in AD connect sync scope and if yes did you get mailbox in o365 admin center?
These are the steps I took to fix the issue.

1)      Remove the user from the active directory completely
2)      Remove the remote mail box that is visible in the on premise exchange server for that user
3)      Delete the user from the cloud
4)      Create a new user in active directory and corresponding mail box in on premise exchange server
5)      Migrate the mailbox to O365
6)      Assign the licence to the user in O365
This will create a new user and mail box for the user.
Recommendation:
1)      If you want to temporarily disable a user from accessing the mail box then you can disable the logging in for the user.
2)      Change the password.
3)      Disable the user from active directory on only if you want to delete the mail box and user from the cloud as this action will most certainly result in the loss of data
4)      If a user is disabled/ deleted from active directory it will be automatically be deleted from the cloud and its mailbox will be deleted too and if it remains in deleted state for more than 30 days it is impossible to recover the data.
5)      You can enable litigation hold to avoid loss of data in such cases
https://blogs.technet.microsoft.com/office365labs/2016/07/27/in-place-archive-in-place-hold-litigation-hold-and-in-place-ediscovery-in-exchange-online/ 
6)      If you must disable a user from active directory for any administrative task  make sure that you take the backup of the corresponding mail box as it will be deleted.
And any attempt to recover the mail box later might result in conflict in old parameters and new mail box" if it is purged" which in turn will result in the loss of data.
Note: Hybrid environment is a complex environment and before making any changes on active directory users who have their mail boxes in cloud take a backup of their mails.
Disabling account won't delete mailbox from O365, it will simply blocked for access

However if you moved user to non synced OU of azure ad connect, its mailbox along with account get deleted from O365

http://blogs.perficient.com/microsoft/2015/04/office-365-how-to-handle-departed-users-part-1-of-2/
https://answers.microsoft.com/en-us/msoffice/forum/msoffice_o365admin-mso_dep365/office-365-mailbox-being-deleted-when-user-is/60dfeb1e-c7ef-497a-a10f-3cdc2d5b3214

you may use disable-mailbox if you want to remove user mailbox either from O365 or Exchange onpremise
To disable remote mailbox (O365 mailbox), use disable-remotemailbox cmdlet
https://technet.microsoft.com/en-us/library/aa997210(v=exchg.160).aspx
https://technet.microsoft.com/en-us/library/ff607304(v=exchg.150).aspx

Also the process you followed is not correct, if you directly wanted to create mailbox in O365, just use new-remotemailbox cmdlet from shell or GUI onpremise

Mahesh.