0 votes

Hello Support

We are in need of a process that will disable/delete the user mailbox after 30 days of deprovisioning a user. We already use Mailtip and forward email to the manager on file and would like to wait 30 days before deleting the mailbox from Exchange. We are using O365 but sync from On Prem to Cloud only.

Thank you as always for your support.


by (3.2k points)

1 Answer

0 votes
by (220k points)
selected by
Best answer

Hello Jay,

There is no need to delete the mailbox, you can simply revoke the Office 365 license 30 days after deprovisioning a user. To do so, you can use a Scheduled Task that will check user deprovision date and revoke all licenses if a user account was deprovisioned more than 30 days ago. The deprovision date can be specified in one of Adaxes custom attributes (e.g. CustomAttributeDate1).
For example, your Deprovision Custom Command can look like the following:

To create the Scheduled Task:

  1. Launch Adaxes Administration Console.
  2. Right-click your Adaxes service node, navigate to New and click Scheduled Task.
  3. On step 3 of the Create Scheduled Task wizard, select User Object type and click Next.
  4. Click Add Action.
  5. Select Activate or modify Office 365 account and then select Deactivate.
  6. Select Revoke licenses and Block checkboxes and then click OK.
  7. Double-click Always.
  8. Select If <property><relation><value>.
  9. Select If Deprovision Date greater or equal and click Edit.
  10. Select minus 30 days and click OK twice.
  11. Right-click the condition you have created and click Add Action.
  12. Select Update the User and click Add.
  13. Select Deprovision Date from the Property to modify drop-down list.
  14. Select Remove property and click OK twice.
  15. Finish creating the Scheduled Task.

You should have something like the following:

Related questions

0 votes
1 answer

Hi, Does someone already have a script that I can run as a scheduled task that will email a list of enabled active directory accounts that have exchange mailboxes? I ... First, Middle, Last, Title, Location and Email address. Any assistance is appreciated.

asked Feb 2, 2017 by mdedmon (150 points)
0 votes
1 answer

How would a script be written that accomplishes the following task? In this scenario, UserA would be selected with the Modify user action, then UserB would be input to ... rule that runs the script to allow reviewer permissions on UserA's calendar for UserB

asked Dec 6, 2012 by mdeflice (350 points)
0 votes
1 answer

I need to pull a years worth of deprovisioned user from Adaxes. When I try to do this through the interface I only get a couple of months worth of data. What would be the ... this data...Powershell? Is there a script that someone has that I can use? Thanks.

asked Apr 15, 2014 by loopy (20 points)
0 votes
1 answer

I want to create a custom Deprovission command which exports the mailbox of the user to a pst file, when it's completed the account should be deleted. Can this be done with adaxes? Thnx Remco

asked Jan 10, 2014 by RTiel (780 points)
0 votes
1 answer

I have been testing different methods to do this with a powershell script, and it doesn't seem like the most reliable method with my limited PowerShell scripting ... ; Delete Mailbox task as a custom task for automated user deprovisioning. Thanks! Chris

asked May 16, 2017 by Bowman4864 (270 points)
2,740 questions
2,474 answers
1,374,935 users