Our Story

Who we are and how we solve complex IT challenges.

Our Certifications

Microsoft certifications and partnerships validating our technical expertise.

Leadership

Meet the Experienced Leadership Team Driving WME’s Success

Advisory Updates

Expert guidance on Microsoft, security, and compliance developments.

Case Studies

Real-world outcomes from complex Microsoft-focused IT engagements.

Financial Industry

Secure technology solutions for regulated banks and financial institutions.

Healthcare

Secure Microsoft solutions for compliant, connected, and modern healthcare organizations.

Manufacturing

Cloud and security solutions supporting modern manufacturing operations.

Non-Profit

Cost-efficient Microsoft solutions for mission-driven organizations.

Public Sector

Microsoft-based IT services for secure public sector modernization.

High Tech

Scalable cloud, security, and staffing for fast-growing technology companies.

SMBs

Scalable cloud, security, and staffing for fast-growing technology companies.

Cloud Migration Services

Transition your workloads to the cloud securely for greater scalability and performance.

Data Migration Services

Securely transfer your business data with minimal downtime and maximum integrity.

Application Migration Services

Move your applications seamlessly to modern platforms with minimal business disruption.

Identity & Security Migration Services

Strengthen identity management and security while transitioning to modern Microsoft solutions.

IT Staffing

Connect with skilled IT professionals to strengthen your team and accelerate project delivery.

Accounting & Finance

Connect with experienced accounting and finance professionals to support your business goals.

Licensing Support

Discover the benefits of both CSP and On-premises licensing options and find the best fit for your unique business needs. From cost savings to flexibility, we’ve got you covered.

Power Platform

Unlock the full potential of the Microsoft Power Platform Suite to streamline operations, automate repetitive tasks, and gain real-time insights that drive business growth.

Sharepoint Solutions

Supercharge your business productivity and enhance visibility through our proven SharePoint expertise.

Security Solutions

Protect your business with proactive cybersecurity, compliance, and risk management solutions.

Endpoint Management

Secure, manage, and monitor every device with modern endpoint management solutions.

Exchange Client Access Rules

February 13, 2021

Recently I was asked to limit access to the client-facing portions of Exchange online, mainly Outlook for Web, Outlook desktop clients (both Windows and macOS), POP/IMAP, and ActiveSync apps. Basically, this organization only wanted enough access to Exchange to allow Teams voicemail to function, and voicemail to show up in the Microsoft Teams client. The organization hosts their email with another provider, but they’re using Microsoft Teams for calling.

While these methods are probably too much for most organizations, they can serve as a starting point for limiting points of access that you do not want.

Prerequisites 

Creating Exchange client access rules can only be done via PowerShell. To do this, you need the Exchange Online PowerShell module. To install this module on your computer, open PowerShell as an administrator and run this command:

Install-Module -Name ExchangeOnlineManagement

Once the module is installed, you can connect to your environment by running this command and signing in. You should sign-in as a user with the Exchange Administrator role in Azure AD.

Connect-ExchangeOnline

Create Client Access Rule

There is one need-to-know item with client access rules – they take time to apply. Microsoft states that the first rule you create in your environment may take up to 24 hours to apply. In my environment, it didn’t take the full 24 hours, but it did take overnight. After the first rule is created and applies, additional rules, changes to existing rules, or deleting rules may take up to one hour to apply. I was consistently seeing changes take the full one hour.

First, it’s best practice to create a rule with the highest priority (priority 1) that maintains access to the Exchange Admin Center and access via PowerShell. This will make sure that you do not lock yourself out of your environment. To create this rule, run this command.

New-ClientAccessRule -Name "AllowAdminAccess" -Action Allow -AnyOfProtocols RemotePowerShell,ExchangeAdminCenter  -Priority 1

Next, we can create the actual rule to block access to the Exchange protocols. As of this writing, these are the available protocols to block (source: New-ClientAccessRule (ExchangePowerShell) | Microsoft Docs).

  • ExchangeActiveSync
  • ExchangeAdminCenter
  • ExchangeWebServices
  • IMAP4
  • OfflineAddressBook
  • OutlookAnywhere
  • OutlookWebApp
  • POP3
  • PowerShellWebServices
  • RemotePowerShell
  • REST
  • UniversalOutlook (Mail and Calendar app)

There are two ways to block protocols. You can use the AnyOfProtocols parameter, or the ExceptAnyOfProtocols parameter. Any will block the protocols you specify, Except will keep open the protocols you specify. In my case, I was blocking everything except what was required for Teams voicemail, so I used except and kept REST enabled (which is how Teams voicemail gets to the Teams client).

Here is my command to keep open REST, while disabling everything else:

New-ClientAccessRule -Name "BlockClientAccess" -Action DenyAccess -ExceptAnyOfProtocols REST -Priority 2

Once created, you can use this command to view your client access rules.

Get-ClientAccessRule | Format-List

Mobile Apps

Mobile apps created by Microsoft like Outlook on iOS and Android do not adhere to client access rules (source: Client Access Rules in Exchange Online | Microsoft Docs, under Important Notes > Client Access Rules and middle-tier applications). So, to block these, you must use an ActiveSync access rule.

To block Outlook from connecting on iOS and Android, run this command:

New-ActiveSyncDeviceAccessRule -Characteristic DeviceType -QueryString "Outlook" -AccessLevel Block

That is it. Hopefully this post can help you craft your rules to keep your Exchange environment secure.

Disclaimer

All content provided on this blog is for information purposes only. Windows Management Experts, Inc makes no representation as to accuracy or completeness of any information on this site. Windows Management Experts, Inc will not be liable for any errors or omission in this information nor for the availability of this information. It is highly recommended that you consult one of our technical consultants, should you need any further assistance.

Share:

Facebook
Twitter
LinkedIn

Get Microsoft Updates Before They Cost You Downtime

Retirement dates, licensing changes, and security updates from a Microsoft-exclusive team, sent when they matter, not on a filler schedule.

More Posts

Copilot Cowork: Credit-Based Billing

Until now, Copilot Cowork has been included with M365 Copilot Premium licenses. Now that Cowork has moved out of public preview, Cowork is introducing a ...
Read Full Article
SharePoint OTP Retirement Is Coming in July 2026

SharePoint OTP Retirement Is Coming in July 2026 — What IT Admins Need to Do Before Access Breaks

Starting July 2026, external users who access OneDrive and SharePoint files through legacy SPO OTP links will start receiving access denied — silently, with no ...
Read Full Article
Power Virtual Agents Is Gone. Here's What Replaced It and Why It Matters.

Power Virtual Agents Is Gone. Here’s What Replaced It and Why It Matters.

If someone on your team still calls it “Power Virtual Agents,” they’re working from an outdated map. Microsoft retired the product on November 15, 2023 ...
Read Full Article

Get Microsoft Updates Before They Cost You Downtime

Retirement dates, licensing changes, and security updates from a Microsoft-exclusive team, sent when they matter, not on a filler schedule.
Subscription Form email