SOLVED

Is there a easy way to exit a user?

Iron Contributor

Hi,

 

We have hybrid Office 365 environment. Every time when there is a user left, I first need to remove the user's Office 365 license, then convert it to shared mailbox for other to access, last I will need to go the on premieres active directory, change the two attributes msExchRemoteRecipientType to 100 and  msExchRecipientTypeDetails to 34359738368. 

 

This is too much work. Sometimes I need to do more than 20 users at one time. I wonder how other people do and is there a easy way to do it?

 

Please advise!

 

Thanks in advance!  

 

6 Replies
Would advise powershell when you need to do things in batches. Some great powershell users on here may have scripts they can provide or push you in the right direction

Best, Chris
That's a pretty nifty script you got there!
Sure is!

If you need to keep the user data, simply use Inactive mailboxes: https://docs.microsoft.com/en-us/office365/securitycompliance/create-and-manage-inactive-mailboxes

 

Shared mailboxes have a dependency on the on-premises user object, meaning you cannot delete/move it out of the sync scope. Then again, they are easier to deal with compared to Inactive mailboxes when it comes to accessing content. Anyway, it's just another option to consider :)

best response confirmed by Grace Yin (Iron Contributor)
Solution

Here's what we do:

- As the user exits, the AD account gets disabled

- A daily scheduled script which:

1. Pulls user accounts that were disabled in the last 24 hours

2. Connects to O365

3. Enables 'x' days litigation hold on the identified mailboxes
4. Waits 60 mins (for the LitHold to take effect)

5. Prefixes the Alias (from on-premise) with "CAS_}"

 

In the next sync interval, these accounts will become inactive mailboxes and will remain in the O365 system for 'x' days per the litigation hold interval. The licenses get automatically freed up as the accounts become inactive.

 

May not be the best approach as every organization would have their own needs, this approach works for us (open to suggestions/improvements).

1 best response

Accepted Solutions
best response confirmed by Grace Yin (Iron Contributor)
Solution

Here's what we do:

- As the user exits, the AD account gets disabled

- A daily scheduled script which:

1. Pulls user accounts that were disabled in the last 24 hours

2. Connects to O365

3. Enables 'x' days litigation hold on the identified mailboxes
4. Waits 60 mins (for the LitHold to take effect)

5. Prefixes the Alias (from on-premise) with "CAS_}"

 

In the next sync interval, these accounts will become inactive mailboxes and will remain in the O365 system for 'x' days per the litigation hold interval. The licenses get automatically freed up as the accounts become inactive.

 

May not be the best approach as every organization would have their own needs, this approach works for us (open to suggestions/improvements).

View solution in original post