Offboard a leaver: block sign-in and remove access

Azure Portal, Hands On10 minutesFreeSteps checked 13 November 2026By Cloud Hands On

In this task you'll stop a leaver signing in and remove their access.

When someone leaves, the account must stop working straight away, but usually shouldn't be deleted on day one: their files, mailbox and audit trail may still be needed. So you block sign-in, revoke sessions (so tokens already issued stop working), and remove the groups, roles and app access they had.

Deleting comes later. A deleted user sits in Deleted users for 30 days and can be restored; after that it's gone for good.

Example. A finance assistant at Larkfield Group leaves on Friday at 17:00. At 17:05 the service desk blocks sign-in, revokes sessions, removes the finance groups and the Helpdesk Administrator role, and notes in the ticket that the account will be deleted after 30 days.

Before you start

You need: User Administrator (Privileged Role Administrator to remove admin roles). Time: 10 minutes.

Where to look

  1. Home
  2. Microsoft Entra ID
  3. Users
  4. (the user)
  5. Edit properties

Steps

  1. Open Microsoft Entra ID, then Users, and select the leaver.
  2. Select Edit properties, open the Settings tab, untick Account enabled and select Save.Sign-in is now blocked. The account, its files and its history stay.
  3. Back on the user's Overview, select Revoke sessions and confirm with Yes.Without this, apps that already signed them in can keep working for up to an hour or more.
  4. Open Groups in the user's menu, tick each group and select Remove memberships.Or remove them from each group's own Members page.
  5. Open Assigned roles. Select each role and remove the assignment.Admin roles are the most important to remove: a disabled admin account is still a target.
  6. Open Applications to check for any app access given directly, and note any devices under Devices for IT to collect.

Commands

# Block sign-in
az ad user update --id leaver@<your-domain> --account-enabled false

# Revoke sessions (Microsoft Graph)
USER=$(az ad user show --id leaver@<your-domain> --query id -o tsv)
az rest --method post --url "https://graph.microsoft.com/v1.0/users/$USER/revokeSignInSessions"

# Remove from a group
az ad group member remove --group grp-finance --member-id $USER

Watch out for

Cost
Free.
Security
Do it at the time they leave, not days later. Revoke sessions as well as blocking sign-in. Check for admin roles, app ownership and anything shared with them personally.
Common mistakes
Deleting the account straight away (losing data you may need), or only blocking sign-in and forgetting the groups, roles and sessions.

Clean up

Nothing extra: this task is the clean-up. Delete the account after the agreed waiting period.

Words to know

Block sign-in
Turning off Account enabled, so the password no longer works.
Revoke sessions
Invalidates the refresh tokens already issued, so apps that are open have to sign in again, and can't.
Deleted users
The 30-day recycle bin for user accounts.

Tick off each step and track your progress in the guide.

Open this task in Azure Portal, Hands On

Keep going