Exchange Online

Overview Many organizations accumulate Exchange Online Plan 1 (EXO P1) licenses assigned to mailboxes that are no longer actively used — often service accounts, former employees, or departmental aliases. Using Exchange Online PowerShell and Microsoft Graph, you can quickly surface these accounts based on two objective criteria: no sign-in activity in the past 90–120 days and mailbox size under 50 GB. Mailboxes meeting both thresholds can be safely converted to Shared Mailboxes, eliminating the per-user license cost with zero loss of functionality.

Step 1 — Export Mailbox Sizes (EXO PowerShell)

Import-Csv 'users.csv' | ForEach-Object {  
    Get-MailboxStatistics -Identity $_.UPN |  
    Select-Object DisplayName, TotalItemSize, ItemCount  
} | Export-Csv 'sizes.csv' -NoTypeInformation

Step 2 — Pull Sign-In Activity (Microsoft Graph)

Connect-MgGraph -Scopes 'User.Read.All'
Import-Csv 'users.csv' | ForEach-Object {  
    Get-MgUser -Filter "UserPrincipalName eq '$($_.UPN)'" |  
    Select-Object DisplayName, UserPrincipalName, AccountEnabled,  
    @{N='LastSignIn';E={ $
    _.SignInActivity.LastSignInDateTime}}  
} | Export-Csv 'signins.csv' -NoType

Flag any mailbox with TotalItemSize < 50 GB. This is the maximum size of a Shared Mailbox without an additional license.

Step 3 — Identify Candidates & Convert to Shared

Cross-reference both exports. Accounts where LastSignIn > 90 days ago (or null) AND TotalItemSize < 50 GB are safe conversion candidates. Convert the mailbox type, then remove the license:

# Convert mailbox to Shared
Set-Mailbox -Identity user@domain.com -Type Shared

# Remove the EXO P1 license via Graph (replace with your tenant's license GUID)
Set-MgUserLicense -UserId user@domain.com -RemoveLicenses @('') -AddLicenses @()

Conversion Eligibility Criteria

Criterion Threshold Rationale
Last sign-in date No activity in >90 days Indicates the account is not being used interactively
Mailbox size Under 50 GB Shared mailboxes are limited to 50 GB without an additional license
Account type RecipientTypeDetails=UserMailbox Shared mailboxes already converted require no action
Sign-in blocked AccountEnabled=False (optional) Accounts with blocked sign-in are strong candidates regardless of last sign-in date

Case Study — Regional Insurance Firm

Patriot Consulting performed a Microsoft 365 licensing audit for a regional insurance company that had 32 mailboxes assigned Exchange Online Plan 1 licenses. Using the PowerShell and Graph methodology described in this brief, we identified that 22 of the 32 accounts had zero sign-in activity for over four months and all were well under the 50 GB threshold. Those 22 mailboxes were converted to Shared and de-licensed immediately.

The remaining 10 active accounts were evaluated for license right-sizing. Rather than maintaining full Microsoft 365 E5 licenses ($57/user/month), we determined that Microsoft Entra ID P1 ($6/user/month) satisfied their actual identity and conditional access requirements — delivering the same security posture at a fraction of the cost.

Description Amount
Annual savings from 22 EXO P1 licenses removed $1,056
Cost avoidance from 32 E5 licenses not purchased $21,888
Net new cost for 10 Entra P1 licenses added - $720
Net annual savings & avoidance $22,224

Ready to audit your Microsoft 365 licensing?

Patriot Consulting offers Microsoft 365 licensing assessments that identify overspend, right-size your license tier, and surface security gaps — typically delivering measurable savings within 30 days.