Exchange OnlineHow-to

ActiveSync device access in Exchange Online: quarantine, access rules and blocked devices

Decide which mobile devices may sync with Exchange Online: the organization default, device access rules, per-user allow and block lists, and the modern controls to move to.

Native mail apps on phones and tablets connect to Exchange Online with Exchange ActiveSync (EAS), and by default every user can sync any device. When you need control (quarantine new devices, block an old model, or let one executive's tablet through), Exchange Online gives you three layers. In this post I'll walk through each layer in Exchange Online PowerShell, show how to release a quarantined device and how to verify, and explain where Conditional Access takes over.

How this guide is organized: How it works → Step-by-step → Verify → Tips & gotchasFlow diagram of the article's sections in reading order: 1. How it works. 2. Step-by-step (6 steps: Take an inventory first; Create device access rules for what you expect; Set the organization default and the notifications; Release, allow or block individual devices; Apply a mobile device mailbox policy; Move to the modern controls). 3. Verify. 4. Tips & gotchas. Toolbox: Set-CASMailbox, New-ActiveSyncDeviceAccessRule, Set-ActiveSyncOrganizationSettings, DeviceType, DeviceModel.1How it works2Step-by-step3Verify4Tips & gotchas1Take aninventory first2Create deviceaccess rules f…3Set theorganization…4Release, allowor block indivi…5Apply a mobiledevice mailbo…6Move to themodern contr…TOOLBOXSet-CASMailboxNew-ActiveSyncDeviceAccessRuleSet-ActiveSyncOrganizationSettingsDeviceTypeDeviceModelHow this guide is organized: How it works → Step-by-step → Verify → Tips & gotchasFlow diagram of the article's sections in reading order: 1. How it works. 2. Step-by-step (6 steps: Take an inventory first; Create device access rules for what you expect; Set the organization default and the notifications; Release, allow or block individual devices; Apply a mobile device mailbox policy; Move to the modern controls). 3. Verify. 4. Tips & gotchas. Toolbox: Set-CASMailbox, New-ActiveSyncDeviceAccessRule, Set-ActiveSyncOrganizationSettings, DeviceType, DeviceModel.1How it works2Step-by-step1Take an inventory first2Create device access rules for what you expect3Set the organization default and thenotifications4Release, allow or block individual devices5Apply a mobile device mailbox policy6Move to the modern controls3Verify4Tips & gotchasTOOLBOXSet-CASMailboxNew-ActiveSyncDeviceAccessRuleSet-ActiveSyncOrganizationSettingsDeviceTypeDeviceModel
At a glance: how this guide is organized · 6 steps · 5 key settings and tools

Status (October 2026): In Message center post MC1197103 (December 2025), Microsoft announced that from March 1, 2026, Exchange Online no longer accepts devices that use an EAS version lower than 16.1. Outlook for iOS and Android doesn't use EAS and isn't affected, and the change doesn't apply to Exchange Server. Check the Message center for any later updates.

How it works#

Every new device partnership gets an access state of Allowed, Blocked or Quarantined. Exchange decides it from three layers:

LayerScopeManaged with
Per-user allow and block listsOne device ID for one mailboxSet-CASMailbox
Device access rulesEvery device that matches a device type, model, OS or user agentNew-ActiveSyncDeviceAccessRule
Organization default access levelEvery device that nothing else matchesSet-ActiveSyncOrganizationSettings

The default is Allow. If you change it to Block or Quarantine, Microsoft documents that all existing connected devices are affected immediately, unless a device access rule or an individual allow or block entry covers them. That single fact decides the order of the steps below. Separately, mobile device mailbox policies set device requirements such as a password and encryption, and Set-CASMailbox -ActiveSyncEnabled turns EAS on or off for a user. In the Exchange admin center, these settings are under Mobile. I'll use PowerShell here because it's precise and easy to repeat.

Step-by-step#

Putting ActiveSync device access under control in a safe orderStep 1: Take an inventory of connected devices. Export DeviceType, DeviceModel, ClientType and ClientVersion; rules must match exactly. Step 2: Create device access rules. Allow or block by DeviceType, DeviceModel, DeviceOS, UserAgent or XMSWLHeader. Step 3: Set the organization default to Quarantine. Add AdminMailRecipients and a UserMailInsert so users and admins know what happened. Step 4: Release or block individual devices. Add the DeviceId to the mailbox's allowed or blocked list with Set-CASMailbox. Step 5: Apply a mobile device mailbox policy. A baseline such as a PIN; the device decides which features it honors. Step 6: Move to Conditional Access. Block Exchange ActiveSync clients and require an app protection policy.1Take an inventory ofconnected devicesExport DeviceType, DeviceModel,ClientType and ClientVersion; rulesmust match exactly.2Create device access rulesAllow or block by DeviceType,DeviceModel, DeviceOS, UserAgentor XMSWLHeader.3Set the organization defaultto QuarantineAdd AdminMailRecipients and aUserMailInsert so users and adminsknow what happened.4Release or block individualdevicesAdd the DeviceId to the mailbox'sallowed or blocked list withSet-CASMailbox.5Apply a mobile devicemailbox policyA baseline such as a PIN; the devicedecides which features it honors.6Move to Conditional AccessBlock Exchange ActiveSync clientsand require an app protectionpolicy.Putting ActiveSync device access under control in a safe orderStep 1: Take an inventory of connected devices. Export DeviceType, DeviceModel, ClientType and ClientVersion; rules must match exactly. Step 2: Create device access rules. Allow or block by DeviceType, DeviceModel, DeviceOS, UserAgent or XMSWLHeader. Step 3: Set the organization default to Quarantine. Add AdminMailRecipients and a UserMailInsert so users and admins know what happened. Step 4: Release or block individual devices. Add the DeviceId to the mailbox's allowed or blocked list with Set-CASMailbox. Step 5: Apply a mobile device mailbox policy. A baseline such as a PIN; the device decides which features it honors. Step 6: Move to Conditional Access. Block Exchange ActiveSync clients and require an app protection policy.1Take an inventory of connected devicesExport DeviceType, DeviceModel, ClientType andClientVersion; rules must match exactly.2Create device access rulesAllow or block by DeviceType, DeviceModel, DeviceOS,UserAgent or XMSWLHeader.3Set the organization default to QuarantineAdd AdminMailRecipients and a UserMailInsert so usersand admins know what happened.4Release or block individual devicesAdd the DeviceId to the mailbox's allowed or blockedlist with Set-CASMailbox.5Apply a mobile device mailbox policyA baseline such as a PIN; the device decides whichfeatures it honors.6Move to Conditional AccessBlock Exchange ActiveSync clients and require an appprotection policy.
Figure 1 · Process Putting ActiveSync device access under control in a safe order. Create the rules before you change the default: switching to Quarantine or Block affects every device that no rule or individual entry covers, immediately.

1. Take an inventory first#

PowerShell
Connect-ExchangeOnline

# What connects today: client type, model, version and current state
Get-MobileDevice -ResultSize Unlimited |
    Select-Object UserDisplayName, DeviceId, DeviceType, DeviceModel, ClientType, ClientVersion, DeviceAccessState |
    Export-Csv .\MobileDevices.csv -NoTypeInformation

# Devices below EAS 16.1, which Exchange Online no longer accepts
Get-MobileDevice -ResultSize Unlimited |
    Where-Object { ($_.ClientType -eq 'EAS' -or $_.ClientType -match 'ActiveSync') -and $_.ClientVersion -and
        ([version]$_.ClientVersion -lt [version]'16.1') } |
    Select-Object UserDisplayName, DeviceModel, ClientVersion

Use the exported values when you write rules. A rule's query string has to match the device's reported value exactly.

2. Create device access rules for what you expect#

PowerShell
# Allow every device that reports itself as an iPhone
New-ActiveSyncDeviceAccessRule -QueryString "iPhone" -Characteristic DeviceType -AccessLevel Allow

# Block one model (copy the exact DeviceModel value from your inventory)
New-ActiveSyncDeviceAccessRule -QueryString "<DeviceModel value>" -Characteristic DeviceModel -AccessLevel Block

Get-ActiveSyncDeviceAccessRule | Format-Table Name, Characteristic, QueryString, AccessLevel

The -Characteristic parameter accepts DeviceType, DeviceModel, DeviceOS, UserAgent and XMSWLHeader.

3. Set the organization default and the notifications#

PowerShell
Set-ActiveSyncOrganizationSettings -DefaultAccessLevel Quarantine `
    -AdminMailRecipients mobileadmins@contoso.com `
    -UserMailInsert "Your device is waiting for approval. Contact the service desk if you need access."

AdminMailRecipients are the administrators who are notified about quarantined devices. UserMailInsert is a footer of up to 256 characters in the message the user gets when a quarantined device can't sync. Quarantine suits most organizations better than Block, because users get a clear message and admins see the request.

4. Release, allow or block individual devices#

PowerShell
# Find quarantined devices
Get-MobileDevice -ResultSize Unlimited | Where-Object DeviceAccessState -eq 'Quarantined' |
    Format-Table UserDisplayName, DeviceId, DeviceModel, FirstSyncTime

# Release one device for one user, or block it
Set-CASMailbox -Identity adele@contoso.com -ActiveSyncAllowedDeviceIDs @{Add="<DeviceId>"}
Set-CASMailbox -Identity adele@contoso.com -ActiveSyncBlockedDeviceIDs @{Add="<DeviceId>"}

# Turn off ActiveSync for a mailbox completely
Set-CASMailbox -Identity adele@contoso.com -ActiveSyncEnabled $false

5. Apply a mobile device mailbox policy#

PowerShell
New-MobileDeviceMailboxPolicy -Name "Require PIN" -PasswordEnabled $true -MinPasswordLength 6 -AllowSimplePassword $false
Set-CASMailbox -Identity adele@contoso.com -ActiveSyncMailboxPolicy "Require PIN"

Microsoft points out that the device's operating system and mail app decide which EAS policy features they actually honor, so treat these policies as a baseline, not as device management.

6. Move to the modern controls#

Device access rules match on what a device says about itself. For real control, use Microsoft Entra Conditional Access: target Office 365 Exchange Online, block the Exchange ActiveSync clients client app condition, and require an app protection policy on iOS and Android so users move to Outlook mobile. See App protection policies not applying to Outlook mobile if that step fights back.

Verify#

PowerShell
Get-MobileDevice -Mailbox adele@contoso.com |
    Format-Table DeviceModel, ClientType, ClientVersion, DeviceAccessState, DeviceAccessStateReason

Get-MobileDeviceStatistics -Mailbox adele@contoso.com | Format-Table DeviceModel, LastSuccessSync
  • Good looks like: DeviceAccessState is Allowed for approved devices, and LastSuccessSync moves forward after the user refreshes the mail app.
  • DeviceAccessStateReason tells you which layer decided: Individual for a per-user entry, DeviceRule for a rule, Global for the organization default.
  • Blocked or quarantined devices appear with that state, and the admin recipients get the quarantine notice.

Tips & gotchas#

  • Rules before the default. Switching the default to Quarantine without rules in place cuts off every device that doesn't match one, right away.
  • Check every client type. Before you change the default, look at the ClientType column in your inventory, so you don't quarantine a client you depend on.
  • Device IDs can change. Reinstalling or resetting the mail app can create a new partnership, which goes through the rules again.
  • Clean up stale partnerships. Remove-MobileDevice deletes an old partnership; it doesn't wipe anything.
  • Old clients. Devices below EAS 16.1 can't connect to Exchange Online any more. Update the device or switch the user to Outlook mobile.
  • For Exchange Server, see ActiveSync not syncing on Exchange Server.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

M365 Subject Matter Expert, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)