Exchange Connection Problems

Fix Exchange Online Connection Filtering Access Denied Errors

Kushani NimanthikaKushani Nimanthika Nov 20, 2026 869 views

Question details

The user needs to add an IP address to the Exchange Online connection filter allow list and resolve access-denied errors.

Product
Exchange Online
Device & OS
not provided
Scenario
Saving an allowed IP address in connection filtering fails, and the user also cannot establish an Exchange Online PowerShell session.
Observed behavior
The settings page reports an organization settings error, while PowerShell returns an access-denied error when creating a session.
Before you start

Have the IP address or range you want to allow and an account with the required Exchange administrative permissions ready. Record the complete connection error, removing any sensitive information before sharing it.

Solution 1Recommended

Add the allowed IP using Exchange Online PowerShell

Use this method when the settings page cannot save the IP address and you have an account authorized to manage the connection filter policy.

Being able to connect to Microsoft 365 PowerShell does not by itself confirm that the account has the permissions needed to connect to Exchange Online or change its policies.

1
Check the administrator role

In the Microsoft 365 admin center, open Users > Active users, select the account, and check its assigned roles. An administrator can assign the Exchange Administrator role if appropriate.

2
Install and connect

In PowerShell, run Install-Module ExchangeOnlineManagement if the module is not installed. Then run Connect-ExchangeOnline and sign in with the authorized account, completing any required authentication prompts.

3
Find the policy

Run Get-HostedConnectionFilterPolicy to identify the policy name and review its current IP allow list.

4
Add the IP address

Run Set-HostedConnectionFilterPolicy -Identity "Default" -IPAllowList @{Add="203.0.113.10"}, replacing Default with the policy name if needed and 203.0.113.10 with the IP address you intend to allow.

5
Verify the change

Run Get-HostedConnectionFilterPolicy -Identity "Default" | Format-List Name,IPAllowList, replacing Default with your policy name, and confirm that the address appears.

Add the allowed IP using Exchange Online PowerShell
Use only trusted addresses: The example IP address is a documentation placeholder. Allow only addresses you trust, because the connection filter allow list can bypass some spam filtering.
Free Microsoft Office alternative

Work with Office files using WPS Office

WPS Office is a free, lightweight alternative for everyday document, spreadsheet, and presentation work. Its familiar interface and Microsoft Office format compatibility make it easy to move existing files. It does not manage or fix Exchange Online connection policies.

Work with documents while Exchange administrators resolve connection issuesOpen and edit Microsoft Word, Excel, and PowerPoint formatsUse a familiar interface for an easier transitionGet a lightweight office suite with free tools
microsoft office alternative - wps office

Frequently Asked Questions

Why can I connect to Microsoft 365 PowerShell but not Exchange Online?

The connections use different services and authorization checks. Verify the account's Exchange role under Users > Active users in the Microsoft 365 admin center, then try Connect-ExchangeOnline.

How do I add an IP without replacing the existing allow list?

Use Set-HostedConnectionFilterPolicy with -IPAllowList @{Add="your-IP-address"}. Replace the placeholder with the intended address and specify the correct policy with -Identity.

What should I do if New-PSSession returns access denied?

Use the ExchangeOnlineManagement module and Connect-ExchangeOnline, then verify the account's Exchange permissions. If the connection still fails, share the sanitized complete error with Microsoft support.

How can I confirm that the IP was added?

Run Get-HostedConnectionFilterPolicy -Identity "Default" | Format-List Name,IPAllowList and check the results. Replace Default if your policy has a different name.