A Repeatable Microsoft 365 Offboarding Script with Graph PowerShell
Overview Offboarding is one of those tasks that’s simple on paper and easy to get subtly wrong in practice. Miss a step and you end up with a departed user who still has an active session token, a mailbox nobody can read, or a license you’re paying for months later.
Between employees and a steady rotation of contractors, I was offboarding people often enough that a checklist in my head wasn’t good enough. This post walks through the script I use now. It takes a UPN and runs the whole sequence the same way every time.