Joiner, mover and leaver with licences
Map a new hire, a role change and a departure to groups, licences, handover, session revocation and retention.
By Invicly Tech, , in Microsoft Entra & Microsoft 365 Administration. About 11 minutes to read.
In short
Every employee goes through three moments: joining, moving to a new role, and leaving. If groups drive access and licences, each moment becomes a small set of group changes plus a few service steps. Leaving needs the most care: block sign-in, revoke sessions, hand over mail and files, and keep data for as long as the rules require.
Explained simply
Admins often call the employee journey joiner, mover, leaver. A joiner needs an account, the right access and a licence on day one. A mover changes team and should gain new access and lose old access. A leaver must lose access quickly while their work is kept safe for others.
The trick is to let groups do the work. If the Sales role group grants the Sales apps, the Sales SharePoint site and a Microsoft 365 licence, then onboarding a salesperson is mostly one step: add them to the group. Moving them out of Sales is another single step.
Licences decide which services a user gets, such as a mailbox or Teams. You can assign them to each user, but assigning them to a group is easier to manage: everyone who joins the group gets the licence, everyone who leaves loses it. Group-based licensing needs Entra ID P1 or a plan that includes it.
Leavers need a clear order. First stop new sign-ins, then end current sessions, then make sure mail and files are handed over, and only then remove licences. If you remove the licence first, the mailbox starts heading for deletion before anyone has saved what matters.
Press Play on a diagram to walk through it one step at a time.
- 1Joiner
Create account, add to role groups, licence via group
- 2Working
Access follows group membership
- 3Mover
Swap old role groups for new ones, review leftovers
- 4Leaver
Block sign-in, revoke sessions, hand over data
- 5Retention
Keep mailbox and files as policy requires, then delete
- Back to step 1
- 1Block sign-in
Set account disabled
- 2Revoke sessions
Invalidate refresh tokens and browser sessions
- 3Disable devices
Stop registered devices getting new tokens
- 4Hand over
Shared mailbox and OneDrive access for the manager
- 5Remove licences
After data is safe, free the seats
- Admin to Entra ID: Block sign-in for leaver1Block sign-in for leaver
- Admin to Entra ID: Revoke sign-in sessions2Revoke sign-in sessions
- Admin to Exchange Online: Convert mailbox to shared, grant manager Full Access3Convert mailbox to shared, grant manager Full Access
- Admin to SharePoint / OneDrive: Grant manager access to OneDrive4Grant manager access to OneDrive
- Admin to Entra ID: Remove from role groups (licence removed)5Remove from role groups (licence removed)
- Admin to Entra ID: Delete user after handover is confirmed6Delete user after handover is confirmed
In depth
Group-based licensing in practice
In the Microsoft 365 admin center, open Billing, Licenses, pick a product and assign it to a group, or in the Entra admin center open the group and choose Licenses. You can switch off individual service plans inside a licence, for example giving Microsoft 365 E3 without Viva Engage.
Two things often go wrong. First, users need a usage location; group-based licensing falls back to the tenant's country if it is missing, but direct assignment fails. Second, a licence assignment can fail for a user, for example because no seats are left or because two products conflict. Failed users show an error state on the group's Licenses page. Check that page after every bulk change, and keep a few spare seats so joiners are not blocked.
- Assign licences to role groups, not people
- Disable unneeded service plans per group
- Watch for errors: not enough seats, conflicting plans
- Get-MgSubscribedSku shows seats used and available
Joiner and mover
A joiner checklist: create the user (or let HR provisioning do it), fill in department, manager and usage location, add the user to the role group, and confirm the licence applied. Then give a temporary password or a Temporary Access Pass so they can register MFA on day one. Expected evidence: the account shows the licence, Exchange shows a mailbox, and the role group's apps appear in My Apps.
A mover is not a joiner with extra steps. Remove the old role groups first, then add the new ones, so the person does not collect access over the years. Check for direct assignments, shared mailbox permissions and SharePoint sites they owned in the old role, and hand those to someone in the old team. Write down what changed so it can be reversed if HR made a mistake.
Leaver: block, revoke, hand over
Start by setting the account to sign-in blocked (accountEnabled false). Then revoke sessions with Revoke sessions on the user's page or Revoke-MgUserSignInSession. This invalidates refresh tokens and session cookies, so apps must send the user back to Entra, where sign-in now fails. Access tokens already issued may keep working until they expire, by default within 60 to 90 minutes, though apps that support continuous access evaluation react sooner. Also disable their registered devices if company devices are not returned.
Next, hand over data. In Exchange, convert the mailbox to a shared mailbox and give the manager Full Access; shared mailboxes under 50 GB need no licence unless they need an archive or hold. For OneDrive, give the manager access using the deleted-user flow in the Microsoft 365 admin center, or copy key files to a team site.
- Blocks new sign-ins
- Existing sessions may continue
- Fully reversible
- Licence and data untouched
- Invalidates refresh tokens and cookies
- Forces apps back to Entra
- Access tokens may last 60 to 90 minutes
- Do it right after disabling
- Moves user to Deleted users
- Restorable for 30 days
- Starts OneDrive retention clock
- Do it last, after handover
Retention after the user is gone
Deletion is not the end of the data. A deleted user stays in Deleted users for 30 days and can be restored with all group memberships. After licence removal, Exchange keeps the mailbox for a grace period of about 30 days before it is removed, unless it was converted to a shared mailbox or is on hold. OneDrive is kept for the retention period set in the SharePoint admin center, 30 days by default and up to 3650 days, and the manager can be given access during that time.
Legal or business rules may require longer retention. That is handled with Microsoft Purview retention policies or holds, covered later in the path. Agree the rules with your organisation before offboarding anyone, and record which ones you applied.
- Deleted users: restorable for 30 days
- Mailbox: convert to shared before removing the licence
- OneDrive: default 30-day retention, configurable
- Longer needs: Purview retention or holds
Learn it in 5 short steps
About 35m each. Track them with a timer in your plan.
- 1Assign licences through groups~35m
- 2Onboard a new hire~35m
- 3Move a user between roles~35m
- 4Revoke sessions for a leaver~35m
- 5Hand over mailbox and files~35m
Key points
- Group-based licensing assigns licences to everyone in a group; it needs Entra ID P1 or a plan that includes it.
- Users need a usage location before a licence can be assigned.
- A mover keeps nothing from the old role by default: remove old groups, add new ones.
- Revoking sessions stops new tokens, but an access token already issued can work until it expires, by default 60 to 90 minutes.
- Hand over mail and files before removing licences or deleting the user.
Key terms
Tap a card to flip it. 0/5 known
Examples
Licensing the Sales role group
Prerequisites: a lab tenant with spare Microsoft 365 seats and Entra ID P1. Step 1: find the SKU ID. Step 2: assign it to SG-Role-Sales. Step 3: add a test user and wait a few minutes. Expected evidence: the user's Licenses page shows the product as inherited from the group, and the group's Licenses page shows no errors. Rollback: remove the licence from the group with -RemoveLicenses, which removes it from every member.
Connect-MgGraph -Scopes "Group.ReadWrite.All","Organization.Read.All"
Get-MgSubscribedSku | Select-Object SkuPartNumber, SkuId, ConsumedUnits
$sku = Get-MgSubscribedSku | Where-Object SkuPartNumber -eq "SPB"
$grp = Get-MgGroup -Filter "displayName eq 'SG-Role-Sales'"
Set-MgGroupLicense -GroupId $grp.Id -AddLicenses @(@{ SkuId = $sku.SkuId }) -RemoveLicenses @()
# rollback
# Set-MgGroupLicense -GroupId $grp.Id -AddLicenses @() -RemoveLicenses @($sku.SkuId)Offboarding a test leaver
Test user leaver1 is leaving; their manager is mgr1. Step 1: block sign-in. Step 2: revoke sessions. Step 3: in Exchange Online PowerShell, convert the mailbox to shared and grant the manager Full Access. Step 4: remove role groups, which removes the group licence. Expected evidence: sign-in logs show failures for leaver1 with an account disabled error, and mgr1 sees the shared mailbox in Outlook. Rollback within 30 days: re-enable the account and add the groups back.
Connect-MgGraph -Scopes "User.ReadWrite.All","User.RevokeSessions.All"
$u = Get-MgUser -UserId "leaver1@contoso.onmicrosoft.com"
Update-MgUser -UserId $u.Id -AccountEnabled:$false
Revoke-MgUserSignInSession -UserId $u.Id
Connect-ExchangeOnline
Set-Mailbox -Identity "leaver1@contoso.onmicrosoft.com" -Type Shared
Add-MailboxPermission -Identity "leaver1@contoso.onmicrosoft.com" `
-User "mgr1@contoso.onmicrosoft.com" -AccessRights FullAccess -InheritanceType AllQuick reference
- Assign licences to role groups; set usage location on every user.
- Joiner: create, fill attributes, add to role group, confirm licence, help register MFA.
- Mover: remove old role groups first, then add new ones; check owned sites and mailboxes.
- Leaver order: block sign-in, revoke sessions, disable devices, hand over, remove licence, delete.
- Revoke-MgUserSignInSession invalidates refresh tokens; access tokens expire on their own.
- Set-Mailbox -Type Shared keeps a leaver's mail reachable; under 50 GB needs no licence.
- Deleted users can be restored for 30 days; OneDrive default retention is 30 days.
Common mistakes
- Removing the licence first, which starts the clock on deleting the mailbox before anyone has handed it over.
- Only disabling the account and forgetting to revoke sessions, so open sessions keep working.
- Treating a mover as a joiner and adding new groups without removing the old ones.
Quick quiz
Pick an answer to see if you're right and why.
Practice exercises
Try each one yourself first. Use the hint if you get stuck, then compare with the solution.
- Exercise 1easy
Put these leaver steps in the right order: delete user, revoke sessions, convert mailbox to shared, block sign-in, remove licence.
- Exercise 2medium
Write a joiner checklist for a new Finance analyst at Contoso, listing each step and the evidence that proves it worked.
- Exercise 3hard
Tenant-free: from this synthetic sign-in extract, decide whether the leaver's access was closed correctly and what to fix. 09:00 account disabled; 09:05 sessions revoked; 09:20 successful Exchange access via existing token; 09:40 failed sign-in, error 50057; 10:30 licence removed; 10:31 mailbox converted to shared.
Check yourself
Answer in your head, reveal, then be honest with yourself.
Feel confident about this topic?
Frequently asked questions
- Do I have to delete a leaver's account?
- Not immediately. Many organisations keep the account disabled for a period, convert the mailbox to shared and delete later. Follow your organisation's retention rules.
- Does a shared mailbox need a licence?
- Not if it stays under 50 GB and needs no archive or litigation hold. Larger or held mailboxes need a licence.
- Can I restore a user I deleted by mistake?
- Yes, within 30 days from Users, Deleted users. Group memberships and most settings come back with them.
- What is a Temporary Access Pass?
- A time-limited passcode an admin issues so a new user can sign in and register MFA or a passkey without a password.