
The tools MSPs use to automate Microsoft 365 offboarding fall into four groups: PowerShell scripts and runbooks, Entra ID lifecycle workflows, workflow platforms you build in yourself, and dedicated MSP tools that run a leaver straight from a PSA ticket.
Whichever you pick, the job underneath is the same twelve steps, from blocking sign-in to writing the audit note. Most of those steps can be automated safely across client tenants through GDAP.
A few should always keep a human in front of them.
The checklist matters more than the tool.
A leaver process that runs the same steps in the same order every time is worth more than any product on this list. A tool that skips the step everyone forgets is just a faster way of getting it wrong.
Offboarding is rarely hard. It is tedious, it arrives on a Friday afternoon, and it is done slightly differently by every engineer who picks it up.
Across 20 or 30 client tenants, that variation adds up. One engineer converts the mailbox to shared before removing the licence, another does it the other way round and loses the mailbox.
One remembers to revoke sessions, another only disables the account and the leaver’s phone keeps syncing mail for another hour.
Almost nobody checks whether the leaver had delegate access to other people’s mailboxes and calendars, so that access quietly survives the account it belonged to.
None of these are exotic failures. They are the normal result of running a twelve-step process from memory.
This is the checklist I would hand any service desk, in the order the steps should run. The order matters: converting the mailbox before removing the licence, for example, is the difference between keeping the data and losing it.
| Step | Why | Automatable? | Risk |
|---|---|---|---|
| 1. Block sign-in | Stops new sign-ins immediately | Yes | Low |
| 2. Revoke sessions and refresh tokens | Disabling the account does not end existing sessions on phones and browsers | Yes | Low |
| 3. Reset the password | Removes any chance the old password is still in use somewhere | Yes | Low |
| 4. Remove MFA methods | Prevents re-registration if the account is ever re-enabled | Yes | Medium: needs a privileged role for admin users |
| 5. Convert the mailbox to shared | Keeps the mail available without a licence | Yes | Medium: must happen before the licence is removed |
| 6. Set auto-reply or forwarding | Tells external contacts who to talk to now | Yes | Low |
| 7. Grant mailbox and OneDrive access to the manager or successor | Hands over the work, not just the account | Yes, with a named successor | Medium: wrong successor means a data leak |
| 8. Remove delegate access to other mailboxes and calendars | The leaver’s access to other people’s data survives otherwise | Yes | Low, and the step most often missed |
| 9. Remove group and Teams memberships, transfer ownership | Prevents ownerless Teams and stale access | Yes | Medium: sole owners leave groups unmanaged |
| 10. Remove licences | Frees the seat for the next starter | Yes | Medium: only after steps 5 and 7 |
| 11. Retire or wipe devices | Removes company data from laptops and phones | Partly | High: a full wipe on a personal phone is not reversible |
| 12. Post an audit note on the ticket | Proves what happened and when | Yes | Low |
Two notes on the table.
First, a shared mailbox does not need a licence as long as it stays under 50 GB and has no archive or litigation hold, which is why the licence can usually go once the conversion is done.
Second, “automatable” does not mean “automatic for everyone”. Step 11 in particular should stay behind an approval, because a selective wipe and a full wipe look the same in a script.
If you script offboarding today, this is roughly the shape of it. The Graph cmdlets come from the Microsoft.Graph PowerShell SDK, and the Exchange cmdlets from the ExchangeOnlineManagement module.
# Connect to the client tenant. With GDAP, use the customer's tenant ID.
Connect-MgGraph -TenantId $tenantId -Scopes "User.ReadWrite.All","Group.ReadWrite.All","Directory.ReadWrite.All"
Connect-ExchangeOnline -DelegatedOrganization "contoso.onmicrosoft.com"
$upn = "tom.baker@contoso.com"
$successor = "jane.ellis@contoso.com"
# 1-2. Block sign-in and revoke existing sessions
Update-MgUser -UserId $upn -AccountEnabled:$false
Revoke-MgUserSignInSession -UserId $upn
# 5. Convert the mailbox to shared BEFORE removing the licence
Set-Mailbox -Identity $upn -Type Shared
# 6-7. Auto-reply and successor access
Set-MailboxAutoReplyConfiguration -Identity $upn -AutoReplyState Enabled `
-ExternalMessage "Tom has left Contoso. Please contact Jane Ellis."
Add-MailboxPermission -Identity $upn -User $successor -AccessRights FullAccess -AutoMapping $true
# 8. Find delegate access the leaver holds on OTHER mailboxes
Get-Mailbox -ResultSize Unlimited | Get-MailboxPermission -User $upn |
ForEach-Object { Remove-MailboxPermission -Identity $_.Identity -User $upn -AccessRights FullAccess -Confirm:$false }
# 10. Remove all licences
$skus = (Get-MgUserLicenseDetail -UserId $upn).SkuId
Set-MgUserLicense -UserId $upn -AddLicenses @() -RemoveLicenses $skus
Step 8 is the one worth adding to your script today if it is not there yet. In a tenant of a few hundred mailboxes it takes a while to run, and it regularly turns up access nobody knew about.
The same check is needed for calendar folder permissions and Send As rights, which this snippet does not cover.
Scripts like this work. The problem is everything around them: which tenant, which credentials, who asked for it, who approved it, and where the evidence lives afterwards.
For an MSP, the script is the easy part. Running it against 30 tenants safely is the hard part, and that is where GDAP (Granular Delegated Admin Privileges) does the heavy lifting.
GDAP gives you per-customer, time-bound relationships with specific Entra roles, instead of the old blanket Global Admin access. For offboarding, the useful roles are User Administrator, Exchange Administrator, Groups Administrator and License Administrator.
Removing MFA methods from another admin needs Privileged Authentication Administrator, and device actions need Intune Administrator.
The practical rule follows from that: automate the steps that the least-privileged role set can do, and route the rest to a person. In practice that means:
Most offboarding still starts as an email: “Tom’s last day is Friday, please remove his access and give Jane his mailbox.” Someone reads it, opens a ticket, opens the admin centre, and works through the list.
Ticket-driven offboarding flips that. The PSA ticket is the trigger.
The tool reads who is leaving, when, and who gets the mailbox, checks that the requester is allowed to ask, runs the checklist, and posts the result back on the same ticket with a time entry.
Nobody re-types the request into a form first.
Three checks belong in front of any ticket-driven leaver:
When a client asks six months later why a former employee’s mailbox was shared with someone, “the script ran” is not an answer.
You need the ticket, the requester, the approver, every change with its before and after value, and the time it happened.
That record also protects you.
Offboarding is the workflow most likely to end up in an HR dispute or a data protection question.
An MSP that can produce a complete, timestamped trail for every leaver is in a far better position than one reconstructing events from admin centre logs that only go back so far.
| Approach | Multi-tenant | Ticket-driven | Approvals and audit | Who maintains it | Best for |
|---|---|---|---|---|---|
| PowerShell scripts and runbooks | Yes, with GDAP and per-tenant auth | No, an engineer runs it | Whatever you build | You | Small MSPs with a strong scripter |
| Entra ID lifecycle workflows | Per tenant, configured in each | No, triggered by HR attributes such as leave date | Built-in run history | You, per client | Clients with HR-driven identity and Entra ID Governance licences |
| PSA workflows and checklists | Yes | Yes | Ticket history | You | Standardising the manual process |
| Workflow platforms (build your own) | Yes | Yes, if you build it | Logged per workflow | You or an automation engineer | MSPs with dedicated automation capacity |
| Dedicated MSP tools | Yes | Yes | Built in | The vendor | MSPs who want the checklist pre-built |
Entra ID lifecycle workflows deserve a closer look, because they are Microsoft’s own answer. They include built-in leaver tasks such as disabling the account, removing licences and groups, and revoking refresh tokens.
They also require Microsoft Entra ID Governance or Microsoft Entra Suite licences (as of November 2026), they are configured tenant by tenant, and they trigger from user attributes rather than from a ticket.
Exchange steps such as converting the mailbox to shared need a custom task extension. For a client with an HR system feeding Entra ID, they are a good fit.
For an MSP handling leavers by email across many small tenants, they rarely are.
DaemonLayer is the tool we built for the last row of that table. A plain-English ticket such as “Tom Baker’s last day is Friday, please remove his access and give Jane access to his mailbox” is enough.
It runs the same checklist every time, in the same order:
A few things are enforced in code rather than left to configuration. Admin accounts are never offboarded automatically: a live check against Microsoft 365 sends them straight to your service desk.
Only the leaver’s manager or a known approver can request an offboarding, and a daily limit per client stops a bulk run. DaemonLayer also never deletes user accounts.
The account stays disabled on purpose, because the shared mailbox depends on the user object. The detail is on the onboarding and offboarding feature page.
It works with ConnectWise Manage, Autotask and HaloPSA, and connects to client tenants through GDAP with certificate-based authentication. You can start read-only and enable each action separately.
Four kinds: PowerShell scripts or Azure Automation runbooks, Entra ID lifecycle workflows, workflow platforms where you build the process yourself, and dedicated MSP tools that run the leaver checklist from a PSA ticket.
The right choice depends on how many tenants you manage, whether offboarding starts from a ticket or from HR data, and who you want maintaining it.
The best tool is the one that runs the complete checklist across all your client tenants, starts from the ticket, and leaves an audit trail.
Check specifically for delegate access cleanup, mailbox conversion before licence removal, approval gates for privileged users and device wipes, and a record of every change.
A tool that misses any of those will save time on easy leavers and cost you on the difficult ones.
Disable it, at least at first. A disabled account keeps the shared mailbox working and keeps the OneDrive available for handover. Deleting the user starts a retention clock on their data, so do it deliberately, later, as a separate decision.
Not if it stays under 50 GB and has no archive or litigation hold. Convert the mailbox to shared first, then remove the licence. Doing it the other way round risks losing the mailbox.
Remove the user from their Teams and Microsoft 365 groups, and transfer ownership of any Team where they are the only owner. An ownerless Team keeps working, but nobody can manage membership until an owner is added.
Files they shared from OneDrive stay available until the OneDrive itself is cleaned up.
Yes. A ticket-driven tool reads the leaver, last day and successor from the ticket, checks the requester is allowed to ask, runs the steps and posts the result back to the same ticket in ConnectWise, Autotask or HaloPSA.
Retire or wipe the leaver’s devices through Intune, and recover company hardware.
Keep wipes behind an approval: a selective wipe removes company data only, a full wipe resets the device, and on a personal phone that is not a mistake you can undo.
Write the checklist down first, in order, and make sure delegate access is on it.
Then decide who runs it: an engineer with a script, a workflow you build and maintain, or a tool that runs it from the ticket for you.
If you want to see the last option, book a demo and we will process a leaver ticket end to end in a test tenant, from the client’s email to the audit note on the ticket.
Rudy Mens
Co-founder & CTO, DaemonLayer
Rudy has spent 20+ years as an IT specialist and consultant, specializing in Microsoft 365 and IT automation. He founded LazyAdmin.nl and is a recognized Microsoft MVP (2022–2026). He co-founded DaemonLayer to turn the automations he'd been building for MSPs into a product every service desk could rely on.
Connect on LinkedIn →