Managing Office 365 endpoints

Office 365 network connectivity

10/4/2017 Connections to Office 365 consist of high volume, trusted network requests that perform best when they're made over a low-latency egress that is near the user. Some Office 365 connections can benefit from optimizing the connection.

  1. Ensure your firewall allow lists allow for connectivity to Office 365 endpoints.

  2. Use your proxy infrastructure to allow Internet connectivity to wildcard and unpublished destinations.

  3. Maintain an optimal perimeter network configuration.

Connecting to Office 365 through firewalls and proxies.

Update your firewall's outbound allow lists

You can optimize your network by sending all trusted Office 365 network requests directly through your firewall, bypassing all additional packet level inspection or processing. This reduces slow performance from latency and reduces your perimeter capacity requirements. The easiest way to choose which network requests to trust is to use our pre-built PAC files on the Proxies tab above.

If your firewall blocks outbound traffic, you'll want to ensure all of the IP and FQDNs listed as Required in this XML file are on the allow list. Recognize all services require the use of some 3rd party services. We don't provide IP addresses for these 3rd party services such as certificate providers, Content Delivery Networks, DNS providers, and so on. For full Office 365 functionality, you must be able to reach all destinations requested by Office 365 regardless of how much information we publish about the destination.

Many destinations do not have an IP address published or are listed as a wildcard domain with no specific fully qualified domain name, to use this functionality you must be able to resolve these network requests to the current IP address being requested and send the network request over the Internet.

Automate your process by using a firewall that parses the XML file on your behalf and updates your rules automatically based on the services or features you plan to route directly through your firewall. You can also use the Azure Range tool that has been built by the community and parses the XML for you with export options for Cisco XE Route or ACL list configuration, plain text, or CSV.

A longer explanation of the network destinations is available on our reference site as well through our RSS based change log so you can subscribe to changes.

Configure outbound paths with PAC files

Use PAC or WPAD files to manage network requests that are associated with Office 365 but don't have an IP address provided. Typically network requests that are sent through a proxy or perimeter device incur additional latency. While proxy authentication incurs the largest tax, other services such as reputation lookup and attempts to inspect packets can cause a poor user experience. Additionally these perimeter network devices need enough capacity to process all of the network requests. We recommend bypassing your proxy or inspection infrastructure for direct Office 365 network requests.

Use one of our PAC files as a starting place to determine what network traffic will be sent to a proxy and which will be sent to a firewall. If you’re new to PAC or WPAD files, read this post about deploying PAC files from one of our Office 365 consultants. You'll want to review these as a starting place and edit to suit your environment.

PAC files updated 10/4/2017.

The first example is a demonstration of our recommended approach to managing endpoints over the Internet only. Bypasses the proxy for Office 365 destinations where the IP address is published and sends remaining network requests to the proxy.

Code snippet:

// JavaScript source code

October 2017 - Updates go live 1st Nov 2017
//This PAC file contains all FQDNs needed for all services and splits the traffic between those which Microsoft can provide IPs for (so can be sent through a managed firewall with conditional access) and those which IPs cannot be provided for, so need to go to an unrestricted proxy or egress. 
//Due to the use of wildcards, some extra logic is provided to send traffic to the proxy before a 'direct' wildcard is hit.
//Includes Core ProPlus URLs but not Office Mobile/IPAD/IOS/ANDROID fqdns from https://support.office.com/en-gb/article/Network-requests-in-Office-365-ProPlus-eb73fcd1-ca88-4d02-a74b-2dd3a9f3364d
//Every Effort is made to ensure 100% accuracy but this PAC should be used as an example and cross-checked with your needs and the Office 365 URL & IP page
//Intended only for Worldwide Office 365 instances, which the vast majority of customers will be using

function FindProxyForURL(url, host)
{
    // Define proxy server
    var proxyserver = "PROXY 10.10.10.10:8080";
    var proxyserver2 = "PROXY 10.10.10.11:8080"
    // Make host lowercase
    var lhost = host.toLowerCase();
    host = lhost;

    //Catch explicit FQDNs which need the proxy but are covered under wildcarded FQDNs which have IPs. This has to be done first before the wildcard is hit

    if ((shExpMatch(host, "browser.pipe.aria.microsoft.com")) 
        || (shExpMatch(host, "compliance.outlook.com"))       
        || (shExpMatch(host, "mobile.pipe.aria.microsoft.com"))
        || (shExpMatch(host, "quicktips.skypeforbusiness.com"))
        || (shExpMatch(host, "r1.res.office365.com")) 
        || (shExpMatch(host, "r3.res.office365.com"))
        || (shExpMatch(host, "r4.res.office365.com"))
        || (shExpMatch(host, "r3.res.outlook.com"))
        || (shExpMatch(host, "xsi.outlook.com")))

    {
        return proxyserver;
    }
        //Send FQDNs which Microsoft provide IPs for direct, so they can be sent via a firewall

    else if ((isPlainHostName(host))
    || (shExpMatch(host, "*.asm.skype.com"))
    || (shExpMatch(host, "*.broadcast.skype.com"))
    || (shExpMatch(host, "*.cc.skype.com"))
    || (shExpMatch(host, "*.config.skype.com"))
    || (shExpMatch(host, "*.conv.skype.com"))
    || (shExpMatch(host, "*.dc.trouter.io"))
    || (shExpMatch(host, "*.infra.lync.com"))
    || (shExpMatch(host, "*.lync.com"))
    || (shExpMatch(host, "*.msg.skype.com"))
    || (shExpMatch(host, "*.office365.com"))
    || (shExpMatch(host, "*.outlook.com"))
    || (shExpMatch(host, "*.outlook.office.com"))
    || (shExpMatch(host, "*.pipe.aria.microsoft.com"))
    || (shExpMatch(host, "*.pipe.skype.com"))
    || (shExpMatch(host, "*.portal.cloudappsecurity.com"))
    || (shExpMatch(host, "*.protection.office.com"))
    || (shExpMatch(host, "*.sharepoint.com"))
    || (shExpMatch(host, "*.skypeforbusiness.com"))
    || (shExpMatch(host, "*.svc.ms"))
    || (shExpMatch(host, "*.teams.microsoft.com"))
    || (shExpMatch(host, "*.teams.skype.com"))
    || (shExpMatch(host, "*.yammer.com"))
    || (shExpMatch(host, "*.yammerusercontent.com"))
    || (shExpMatch(host, "*broadcast.officeapps.live.com"))
    || (shExpMatch(host, "*excel.officeapps.live.com"))
    || (shExpMatch(host, "*onenote.officeapps.live.com"))
    || (shExpMatch(host, "*powerpoint.officeapps.live.com"))
    || (shExpMatch(host, "*view.officeapps.live.com"))
    || (shExpMatch(host, "*visio.officeapps.live.com"))
    || (shExpMatch(host, "*word-edit.officeapps.live.com"))
    || (shExpMatch(host, "*word-view.officeapps.live.com"))    
    || (shExpMatch(host, "account.office.net"))
    || (shExpMatch(host, "adminwebservice.microsoftonline.com"))
    || (shExpMatch(host, "agent.office.net"))
    || (shExpMatch(host, "apc.delve.office.com"))
    || (shExpMatch(host, "api.login.microsoftonline.com"))
    || (shExpMatch(host, "aus.delve.office.com"))
    || (shExpMatch(host, "browser.pipe.aria.microsoft.com"))    
    || (shExpMatch(host, "can.delve.office.com"))
    || (shExpMatch(host, "ccs-sdf.login.microsoftonline.com"))
    || (shExpMatch(host, "ccs.login.microsoftonline.com"))
    || (shExpMatch(host, "clientconfig.microsoftonline-p.net"))
    || (shExpMatch(host, "clientlog.portal.office.com"))
    || (shExpMatch(host, "config.edge.skype.com"))
    || (shExpMatch(host, "controls.office.com"))
    || (shExpMatch(host, "cus-000.tasks.osi.office.net"))
    || (shExpMatch(host, "delve.office.com"))
    || (shExpMatch(host, "device.login.microsoftonline.com"))    
    || (shExpMatch(host, "ea-000.tasks.osi.office.net"))
    || (shExpMatch(host, "eus-zzz.tasks.osi.office.net"))
    || (shExpMatch(host, "gbr.delve.office.com"))
    || (shExpMatch(host, "hip.microsoftonline-p.net"))
    || (shExpMatch(host, "hipservice.microsoftonline.com"))
    || (shExpMatch(host, "home.office.com"))
    || (shExpMatch(host, "ind.delve.office.com"))
    || (shExpMatch(host, "jpn.delve.office.com"))
    || (shExpMatch(host, "jpn.delve.office.com"))
    || (shExpMatch(host, "kor.delve.office.com"))
    || (shExpMatch(host, "lam.delve.office.com"))
    || (shExpMatch(host, "login.microsoft.com"))
    || (shExpMatch(host, "login.microsoftonline.com"))
    || (shExpMatch(host, "login.microsoftonline-p.com"))
    || (shExpMatch(host, "login.windows.net"))
    || (shExpMatch(host, "logincert.microsoftonline.com"))
    || (shExpMatch(host, "loginex.microsoftonline.com"))
    || (shExpMatch(host, "login-us.microsoftonline.com"))     
    || (shExpMatch(host, "nam.delve.office.com"))
    || (shExpMatch(host, "neu-000.tasks.osi.office.net"))
    || (shExpMatch(host, "nexus.microsoftonline-p.com"))
    || (shExpMatch(host, "nexus.officeapps.live.com"))
    || (shExpMatch(host, "nexusrules.officeapps.live.com"))
    || (shExpMatch(host, "pipe.skype.com"))
    || (shExpMatch(host, "portal.microsoftonline.com"))
    || (shExpMatch(host, "portal.office.com"))
    || (shExpMatch(host, "prod.registrar.skype.com"))
    || (shExpMatch(host, "prod.tpc.skype.com"))
    || (shExpMatch(host, "provisioningapi.microsoftonline.com"))
    || (shExpMatch(host, "s-0001.s-msedge.net"))
    || (shExpMatch(host, "s-0004.s-msedge.net"))
    || (shExpMatch(host, "scsinstrument-ss-us.trafficmanager.net"))   
    || (shExpMatch(host, "sea-000.tasks.osi.office.net"))    
    || (shExpMatch(host, "signup.microsoft.com"))
    || (shExpMatch(host, "stamp2.login.microsoftonline.com"))
    || (shExpMatch(host, "suite.office.net"))    
    || (shExpMatch(host, "tasks.office.com"))
    || (shExpMatch(host, "teams.microsoft.com"))
    || (shExpMatch(host, "testconnectivity.microsoft.com"))
    || (shExpMatch(host, "weu-000.tasks.osi.office.net"))
    || (shExpMatch(host, "wus-000.tasks.osi.office.net"))
    || (shExpMatch(host, "www.office.com"))
    || (shExpMatch(host, "www.sway.com")))
      
    {
        return "DIRECT";
    }
    else

        // Send all unknown IP traffic to Proxy for unrestricted access. This section is not necessary if you have a catchall for all other traffic to go to an unfiltered proxy. 
        //However the fqdns required, but for which we dont have IPs for, are listed here incase you need an explicit list.

    if ((shExpMatch(host, "*.aadrm.com")) 
        || (shExpMatch(host, "account.activedirectory.windowsazure.com"))
        || (shExpMatch(host, "*.adhybridhealth.azure.com"))    
        || (shExpMatch(host, "*.api.microsoftstream.com"))   
        || (shExpMatch(host, "*.api.skype.com"))
        || (shExpMatch(host, "*.assets-yammer.com"))   
        || (shExpMatch(host, "*.azurerms.com")) 
        || (shExpMatch(host, "*.azureedge.net"))            
        || (shExpMatch(host, "*.cloudapp.net")) 
        || (shExpMatch(host, "*.entrust.net")) 
        || (shExpMatch(host, "*.geotrust.com"))
        || (shExpMatch(host, "*.helpshift.com"))   
        || (shExpMatch(host, "*.hockeyapp.net"))    
        || (shExpMatch(host, "*.live.com"))
        || (shExpMatch(host, "*.localytics.com"))    
        || (shExpMatch(host, "*.microsoft.com"))
        || (shExpMatch(host, "*.microsoftonline.com"))
        || (shExpMatch(host, "*.microsoftonline-p.com"))
        || (shExpMatch(host, "*.microsoftonline-p.net"))
        || (shExpMatch(host, "*.msecnd.net"))
        || (shExpMatch(host, "*.msedge.net"))      
        || (shExpMatch(host, "*.msocdn.com"))   
        || (shExpMatch(host, "*.office.com"))   
        || (shExpMatch(host, "*.office.net")) 
        || (shExpMatch(host, "*.omniroot.com"))
        || (shExpMatch(host, "*.onmicrosoft.com"))
        || (shExpMatch(host, "*.public-trust.com"))
        || (shExpMatch(host, "*.search.production.apac.trafficmanager.net"))
        || (shExpMatch(host, "*.search.production.emea.trafficmanager.net"))
        || (shExpMatch(host, "*.search.production.us.trafficmanager.net"))
        || (shExpMatch(host, "*.secure.skypeassets.com"))  
        || (shExpMatch(host, "*.sfbassets.com"))
        || (shExpMatch(host, "*.sharepointonline.com")) 
        || (shExpMatch(host, "*.sway.com"))
        || (shExpMatch(host, "*.symcb.com"))
        || (shExpMatch(host, "*.symcd.com"))     
        || (shExpMatch(host, "*.verisign.com"))
        || (shExpMatch(host, "*.verisign.net"))
        || (shExpMatch(host, "*.windows.net"))
        || (shExpMatch(host, "ad.atdmt.com")) 
        || (shExpMatch(host, "admin.onedrive.com"))
        || (shExpMatch(host, "ajax.aspnetcdn.com")) 
        || (shExpMatch(host, "aka.ms"))
        || (shExpMatch(host, "amp.azure.net")) 
        || (shExpMatch(host, "api.microsoftstream.com"))
        || (shExpMatch(host, "apis.live.net"))
        || (shExpMatch(host, "assets.onestore.ms"))
        || (shExpMatch(host, "auth.gfx.ms"))
        || (shExpMatch(host, "broadcast.skype.com")) 
        || (shExpMatch(host, "cacerts.digicert.com"))        
        || (shExpMatch(host, "cdn.onenote.net"))
        || (shExpMatch(host, "cdn.optimizely.com"))
        || (shExpMatch(host, "compliance.outlook.com"))   
        || (shExpMatch(host, "connect.facebook.net"))        
        || (shExpMatch(host, "crl.globalsign.com"))
        || (shExpMatch(host, "crl3.digicert.com"))  
        || (shExpMatch(host, "crl4.digicert.com")) 
        || (shExpMatch(host, "dc.services.visualstudio.com")) 
        || (shExpMatch(host, "domains.live.com"))
        || (shExpMatch(host, "ecn.dev.virtualearth.net "))   
        || (shExpMatch(host, "eus-www.sway-cdn.com"))
        || (shExpMatch(host, "eus-www.sway-extensions.com"))
        || (shExpMatch(host, "eur.delve.office.com"))
        || (shExpMatch(host, "feedback.skype.com"))
        || (shExpMatch(host, "firstpartyapps.oaspapps.com")) 
        || (shExpMatch(host, "graph.skype.com"))   
        || (shExpMatch(host, "groupsapi2-prod.outlookgroups.ms"))  
        || (shExpMatch(host, "groupsapi3-prod.outlookgroups.ms"))  
        || (shExpMatch(host, "groupsapi4-prod.outlookgroups.ms"))  
        || (shExpMatch(host, "groupsapi-prod.outlookgroups.ms")) 
        || (shExpMatch(host, "latest-swx.cdn.skype.com")) 
        || (shExpMatch(host, "liverdcxstorage.blob.core.windowsazure.com")) 
        || (shExpMatch(host, "management.azure.com"))        
        || (shExpMatch(host, "mem.gfx.ms"))
        || (shExpMatch(host, "ocsp.globalsign.com"))
        || (shExpMatch(host, "ocsp.msocsp.com"))       
        || (shExpMatch(host, "ocsp2.globalsign.com"))
        || (shExpMatch(host, "oneclient.sfx.ms"))
        || (shExpMatch(host, "outlook.uservoice.com")) 
        || (shExpMatch(host, "pipe.skype.com")) 
        || (shExpMatch(host, "platform.linkedin.com"))
        || (shExpMatch(host, "policykeyservice.dc.ad.msft.net"))
        || (shExpMatch(host, "prod.firstpartyapps.oaspapps.com.akadns.net")) 
        || (shExpMatch(host, "r1.res.office365.com"))
        || (shExpMatch(host, "r3.res.office365.com"))
        || (shExpMatch(host, "r4.res.office365.com"))
        || (shExpMatch(host, "s.ytimg.com")) 
        || (shExpMatch(host, "scsquery-ss-asia.trafficmanager.net")) 
        || (shExpMatch(host, "scsquery-ss-eu.trafficmanager.net")) 
        || (shExpMatch(host, "scsquery-ss-us.trafficmanager.net")) 
        || (shExpMatch(host, "secure.aadcdn.microsoftonline-p.com"))
        || (shExpMatch(host, "secure.globalsign.com")) 
        || (shExpMatch(host, "site-cdn.onenote.net")) 
        || (shExpMatch(host, "skydrive.wns.windows.com")) 
        || (shExpMatch(host, "skypemaprdsitus.trafficmanager.net"))   
        || (shExpMatch(host, "spoprod-a.akamaihd.net"))  
        || (shExpMatch(host, "staffhub.ms"))
        || (shExpMatch(host, "staffhub.uservoice.com")) 
        || (shExpMatch(host, "sway.com"))              
        || (shExpMatch(host, "swx.cdn.skype.com"))  
        || (shExpMatch(host, "telemetry.remoteapp.windowsazure.com"))         
        || (shExpMatch(host, "telemetryservice.firstpartyapps.oaspapps.com"))    
        || (shExpMatch(host, "web.microsoftstream.com"))         
        || (shExpMatch(host, "wus-firstpartyapps.oaspapps.com"))  
        || (shExpMatch(host, "wus-www.sway-cdn.com"))
        || (shExpMatch(host, "wus-www.sway-extensions.com"))   
        || (shExpMatch(host, "xsi.outlook.com"))
        || (shExpMatch(url, "http://apps.identrust.com/roots/dstrootcax3.p7c"))
        || (shExpMatch(url, "http://cert.int-x3.letsencrypt.org"))
        || (shExpMatch(url, "http://crl.identrust.com/DSTROOTCAX3CRL.crl"))
        || (shExpMatch(url, "http://isrg.trustid.ocsp.identrust.com"))
        || (shExpMatch(url, "http://ocsp.digicert.com"))
        || (shExpMatch(url, "http://ocsp.int-x3.letsencrypt.org"))
        || (shExpMatch(url, "http://ocsp.msocsp.com"))
        || (shExpMatch(url, "http://ocspx.digicert.com"))   
        || (shExpMatch(url, "https://assets.onestore.ms/cdnfiles/external/"))   
        || (shExpMatch(url, "https://cdn.optimizely.com/js/"))  
        || (shExpMatch(url, "https://nps.onyx.azure.net"))
        || (shExpMatch(url, "https://web.localytics.com/v3/localytics.js"))  
        || (shExpMatch(url, "https://www.digicert.com/CACerts/DigiCertGlobalRootCA.crt"))
        || (shExpMatch(url, "https://www.digicert.com/CACerts/DigiCertHighAssuranceEVRootCA.crt"))
        || (shExpMatch(host, "www.google-analytics.com"))
        || (shExpMatch(host, "www.onedrive.com"))
        || (shExpMatch(host, "www.remoteapp.windowsazure.com"))
        || (shExpMatch(host, "www.youtube.com")))
        

    {
        return proxyserver;
    }

    //Catchall for all other traffic to another proxy 

else return proxyserver;
}

The second example is a demonstration of our recommended approach to managing connections when ExpressRoute and Internet circuits are available. Sends ExpressRoute advertised destinations to the ExpressRoute circuit and Internet only advertised destinations to the proxy.

Code snippet:

// JavaScript source code
//October2017 Update
// Consolidated FQDNs of URLS which are reachable via Microsoft peering over ExpressRoute. All other traffic sent to a proxy in this example. 
//Every Effort is made to ensure 100% accuracy but this PAC should be used as an example and cross-checked with your traffic flow needs and the Office 365 URL & IP page. 
//Intended only for Worldwide Office 365 instances, which the vast majority of customers will be using

function FindProxyForURL(url, host)
{
    // Define proxy server
    var proxyserver = "PROXY 10.10.10.10:8080";
    // Make host lowercase
    var lhost = host.toLowerCase();
    host = lhost;
    //SUB-FQDNs of ExpressRoutable wildcards which need to be explicitly sent to the proxy at the top of the PAC because they arent ER routable
    if ((shExpMatch(host, "*.click.email.microsoftonline.com"))
        || (shExpMatch(host, "*.portal.microsoftonline.com")))					
    {
        return proxyserver;
    }
        //EXPRESS ROUTE DIRECT
    else if ((isPlainHostName(host))
            || (shExpMatch(host, "*.asm.skype.com"))
            || (shExpMatch(host, "*broadcast.officeapps.live.com"))
            || (shExpMatch(host, "*.cc.skype.com"))
            || (shExpMatch(host, "*.config.skype.com"))    
            || (shExpMatch(host, "*.conv.skype.com"))
            || (shExpMatch(host, "*.dc.trouter.io"))
            || (shExpMatch(host, "*excel.officeapps.live.com"))
            || (shExpMatch(host, "*.lync.com"))	
            || (shExpMatch(host, "*.microsoftonline.com"))
            || (shExpMatch(host, "*.msg.skype.com"))
            || (shExpMatch(host, "*onenote.officeapps.live.com"))
            || (shExpMatch(host, "*.outlook.office.com"))
            || (shExpMatch(host, "*.pipe.skype.com")) 
            || (shExpMatch(host, "*.pipe.aria.microsoft.com")) 
            || (shExpMatch(host, "*powerpoint.officeapps.live.com"))
            || (shExpMatch(host, "*.protection.office.com"))
            || (shExpMatch(host, "*.protection.outlook.com"))						
            || (shExpMatch(host, "*.sharepoint.com")) 
            || (shExpMatch(host, "*.skypeforbusiness.com")) 
            || (shExpMatch(host, "*.svc.ms"))   
            || (shExpMatch(host, "*.teams.microsoft.com"))  
            || (shExpMatch(host, "*.teams.skype.com"))  
            || (shExpMatch(host, "*view.officeapps.live.com"))                                 
            || (shExpMatch(host, "*visio.officeapps.live.com"))
            || (shExpMatch(host, "*word-view.officeapps.live.com"))
            || (shExpMatch(host, "*word-edit.officeapps.live.com"))	
            || (shExpMatch(host, "autodiscover-*.outlook.com"))				
            || (shExpMatch(host, "apc.delve.office.com"))
            || (shExpMatch(host, "aus.delve.office.com"))
            || (shExpMatch(host, "account.office.net"))
            || (shExpMatch(host, "agent.office.net"))  
            || (shExpMatch(host, "browser.pipe.aria.microsoft.com"))  
            || (shExpMatch(host, "can.delve.office.com")) 
            || (shExpMatch(host, "ccs-sdf.login.microsoftonline.com"))
            || (shExpMatch(host, "ccs.login.microsoftonline.com"))  
            || (shExpMatch(host, "clientconfig.microsoftonline-p.net"))
            || (shExpMatch(host, "config.edge.skype.com"))
            || (shExpMatch(host, "delve.office.com"))
            || (shExpMatch(host, "domains.live.com")) 
            || (shExpMatch(host, "eur.delve.office.com"))
            || (shExpMatch(host, "gbr.delve.office.com"))
            || (shExpMatch(host, "hip.microsoftonline-p.net"))
            || (shExpMatch(host, "home.office.com"))
            || (shExpMatch(host, "ind.delve.office.com"))
            || (shExpMatch(host, "jpn.delve.office.com"))
            || (shExpMatch(host, "kor.delve.office.com"))
            || (shExpMatch(host, "lam.delve.office.com"))
            || (shExpMatch(host, "login.microsoftonline-p.net"))				
            || (shExpMatch(host, "login.windows.net"))						
            || (shExpMatch(host, "login.microsoft.com"))
            || (shExpMatch(host, "nam.delve.office.com"))
            || (shExpMatch(host, "nexus.microsoftonline-p.net"))
            || (shExpMatch(host, "outlook.office365.com")) 
            || (shExpMatch(host, "pipe.skype.com"))	
            || (shExpMatch(host, "portal.office.com"))
            || (shExpMatch(host, "prod.registrar.skype.com"))
            || (shExpMatch(host, "prod.tpc.skype.com"))
            || (shExpMatch(host, "s-0001.s-msedge.net"))
            || (shExpMatch(host, "s-0004.s-msedge.net"))
            || (shExpMatch(host, "scsinstrument-ss-us.trafficmanager.net")) 
            || (shExpMatch(host, "scsquery-ss-asia.trafficmanager.net"))
            || (shExpMatch(host, "scsquery-ss-eu.trafficmanager.net")) 
            || (shExpMatch(host, "scsquery-ss-us.trafficmanager.net"))  
            || (shExpMatch(host, "signup.microsoft.com"))
            || (shExpMatch(host, "smtp.office365.com"))  
            || (shExpMatch(host, "suite.office.net")) 
            || (shExpMatch(host, "teams.microsoft.com"))  
            || (shExpMatch(host, "www.outlook.com"))   						
            || (shExpMatch(host, "www.office.com")))



       
    {
        return "DIRECT";
    }

        // If Azure public peering is available the following can be added to the Expressroute section above and sent direct via ER. If not these can be sent via the internet i.e delete them from the PAC file.
       
        //*.adhybridhealth.azure.com
        //*.cloudapp.net
        //*.blob.core.windows.net
        //*.hybridconfiguration.azurewebsites.net
        //*.keydelivery.mediaservices.windows.net
        //*.queue.core.windows.net
        //*.servicebus.windows.net - Port: 5671 (If 5671 is blocked, agent falls back to 443, but using 5671 is recommended.)
        //*.store.core.windows.net
        //*.streaming.mediaservices.windows.net
        //*.table.core.windows.net
        //compliance.outlook.com
        //dc.services.visualstudio.com
        //equivio.office.com
        //equivioprod*.cloudapp.net
        //hybridconfiguration.azurewebsites.net
        //liverdcxstorage.blob.core.windowsazure.com//
        //management.azure.com
        //mshrcstorageprod.blob.core.windows.net
        //office365servicehealthcommunications.cloudapp.net
        //office365zoom.cloudapp.net
        //policykeyservice.dc.ad.msft.net
        //protection.office.com
        //secure.aadcdn.microsoftonline-p.com
        //telemetry.remoteapp.windowsazure.com
        //vortex.data.microsoft.com
        //www.remoteapp.windowsazure.com
        //zoom-cs-prod*.cloudapp.net



        //Catchall for all other traffic to proxy
    else
    {
        return proxyserver;
    }
}

The third example demonstrates sending all network requests associated with Office 365 to a single destination. This is commonly used to bypass all inspection of Office 365 network requests and also offers you a format where all published endpoints are in list in the PAC format to use for your customization.

Code snippet:

// JavaScript source code
//October 2017 Update new URLS go live 1st Nov2017 - Some URLs may have been removed from this file from previous versions as they are no longer required.
//Consolidated FQDNs required to access Office 365 - All services including optional components covered and elements covered under wildcards removed. 
//Some repeated domains have been consoliodated into unpublished wildcards in order to keep the file as small as possible.
//Includes Core ProPlus URLs but not Office Mobile/IPAD/IOS/ANDROID fqdns from https://support.office.com/en-gb/article/Network-requests-in-Office-365-ProPlus-eb73fcd1-ca88-4d02-a74b-2dd3a9f3364d
//Every Effort is made to ensure 100% accuracy but this PAC should be used as an example and cross-checked with your needs and the Office 365 URL & IP page
//Intended only for Worldwide Office 365 instances, which the vast majority of customers will be using

function FindProxyForURL(url, host)
{
    // Define proxy server
    var proxyserver = "PROXY 10.10.10.10:8080";
    // Make host lowercase
    var lhost = host.toLowerCase();
    host = lhost;

    if ((shExpMatch(host, "*.adhybridhealth.azure.com"))
        || (shExpMatch(host, "*.api.microsoftstream.com"))  
        || (shExpMatch(host, "*.api.skype.com"))  
        || (shExpMatch(host, "*.asm.skype.com"))     
        || (shExpMatch(host, "*.assets-yammer.com"))
        || (shExpMatch(host, "*.azureedge.net"))   
        || (shExpMatch(host, "*.broadcast.skype.com"))
        || (shExpMatch(host, "*.cc.skype.com")) 
        || (shExpMatch(host, "*.cdn.skype.com")) 
        || (shExpMatch(host, "*.cloudapp.net")) 	
        || (shExpMatch(host, "*.config.skype.com")) 
        || (shExpMatch(host, "*.conv.skype.com"))
        || (shExpMatch(host, "*.crl.entrust.net"))
        || (shExpMatch(host, "*.dc.trouter.io"))
        || (shExpMatch(host, "*.digicert.com"))
        || (shExpMatch(host, "*.entrust.net")) 	        
        || (shExpMatch(host, "*.geotrust.com"))
        || (shExpMatch(host, "*.giphy.com")) 
        || (shExpMatch(host, "*.globalsign.com"))
        || (shExpMatch(host, "*.helpshift.com")) 
        || (shExpMatch(host, "*.hockeyapp.net"))       							
        || (shExpMatch(host, "*.live.com"))
        || (shExpMatch(host, "*.localytics.com"))    	
        || (shExpMatch(host, "*.lync.com"))
        || (shExpMatch(host, "*.microsoft.com"))				
        || (shExpMatch(host, "*.microsoftonline.com"))
        || (shExpMatch(host, "*.microsoftonline-p.com"))	
        || (shExpMatch(host, "*.microsoftonline-p.net"))
        || (shExpMatch(host, "*.msecnd.net"))	
        || (shExpMatch(host, "*.msedge.net"))
        || (shExpMatch(host, "*.msg.skype.com")) 					
        || (shExpMatch(host, "*.msocdn.com"))
        || (shExpMatch(host, "*.notification.api.microsoftstream.com"))	
        || (shExpMatch(host, "*.ocsp.omniroot.com"))    			
        || (shExpMatch(host, "*.office365.com"))
        || (shExpMatch(host, "*.omniroot.com"))
        || (shExpMatch(host, "*.onmicrosoft.com"))
        || (shExpMatch(host, "*.office.com"))	
        || (shExpMatch(host, "*.office.net"))
        || (shExpMatch(host, "*.officeapps.live.com"))		 
        || (shExpMatch(host, "*.onenote.com"))				
        || (shExpMatch(host, "*.outlook.com"))	
        || (shExpMatch(host, "*.outlookgroups.ms"))  
        || (shExpMatch(host, "*.oaspapps.com"))
        || (shExpMatch(host, "*.pipe.skype.com")) 			
        || (shExpMatch(host, "*.portal.cloudappsecurity.com"))
        || (shExpMatch(host, "*.public-trust.com"))
        || (shExpMatch(host, "*.search.production.us.trafficmanager.net"))
        || (shExpMatch(host, "*.search.production.emea.trafficmanager.net"))
        || (shExpMatch(host, "*.search.production.apac.trafficmanager.net"))
        || (shExpMatch(host, "*.sfbassets.com"))  
        || (shExpMatch(host, "*.sharepointonline.com")) 
        || (shExpMatch(host, "*.sharepoint.com"))	
        || (shExpMatch(host, "*.skypeforbusiness.com"))	
        || (shExpMatch(host, "*.streaming.mediaservices.windows.net"))	
        || (shExpMatch(host, "*.svc.ms")) 	
        || (shExpMatch(host, "*.sway.com"))
        || (shExpMatch(host, "*.symcb.com"))
        || (shExpMatch(host, "*.symcd.com"))
        || (shExpMatch(host, "*.teams.skype.com"))
        || (shExpMatch(host, "*.users.storage.live.com"))
        || (shExpMatch(host, "*.verisign.com"))
        || (shExpMatch(host, "*.verisign.net"))				
        || (shExpMatch(host, "*.windows.net"))	
        || (shExpMatch(host, "*.yammer.com"))	
        || (shExpMatch(host, "*.yammerusercontent.com"))         
        || (shExpMatch(host, "account.activedirectory.windowsazure.com"))
        || (shExpMatch(host, "admin.onedrive.com"))
        || (shExpMatch(host, "aka.ms"))	
        || (shExpMatch(host, "ajax.aspnetcdn.com"))
        || (shExpMatch(host, "amp.azure.net"))	
        || (shExpMatch(host, "apis.live.net"))
        || (shExpMatch(host, "api.microsoftstream.com"))
        || (shExpMatch(host, "apps.identrust.com/roots/dstrootcax3.p7c"))
        || (shExpMatch(host, "assets.onestore.ms"))
        || (shExpMatch(host, "auth.gfx.ms"))
        || (shExpMatch(host, "c.bing.net"))
        || (shExpMatch(host, "cert.int-x3.letsencrypt.org"))
        || (shExpMatch(host, "cdn.onenote.net"))
        || (shExpMatch(host, "cdn.optimizely.com"))
        || (shExpMatch(host, "client.hip.live.com"))     
        || (shExpMatch(host, "config.edge.skype.com"))
        || (shExpMatch(host, "connect.facebook.net"))
        || (shExpMatch(host, "crl.identrust.com/DSTROOTCAX3CRL.crl"))	
        || (shExpMatch(host, "dc.services.visualstudio.com"))	
        || (shExpMatch(host, "eus-www.sway-cdn.com"))	
        || (shExpMatch(host, "eus-www.sway-extensions.com"))
        || (shExpMatch(host, "feedback.skype.com"))
        || (shExpMatch(host, "graph.skype.com"))
        || (shExpMatch(host, "hybridconfiguration.azurewebsites.net"))  
        || (shExpMatch(host, "isrg.trustid.ocsp.identrust.com"))
        || (shExpMatch(host, "liverdcxstorage.blob.core.windowsazure.com"))					
        || (shExpMatch(host, "management.azure.com"))
        || (shExpMatch(host, "mem.gfx.ms"))
        || (shExpMatch(host, "nps.onyx.azure.net"))   
        || (shExpMatch(host, "ocsp.int-x3.letsencrypt.org"))
        || (shExpMatch(host, "ocsp.msocsp.com"))     
        || (shExpMatch(host, "ocsp.omniroot.com"))     
        || (shExpMatch(host, "officecdn.microsoft.com.edgesuite.net"))
        || (shExpMatch(host, "officecdn.microsoft.com.edgekey.net"))
        || (shExpMatch(host, "oneclient.sfx.ms"))
        || (shExpMatch(host, "outlook.uservoice.com"))
        || (shExpMatch(host, "pipe.skype.com"))	
        || (shExpMatch(host, "platform.linkedin.com"))										
        || (shExpMatch(host, "policykeyservice.dc.ad.msft.net"))				
        || (shExpMatch(host, "prod.registrar.skype.com")) 
        || (shExpMatch(host, "prod.tpc.skype.com")) 
        || (shExpMatch(host, "quicktips.skypeforbusiness.com"))
        || (shExpMatch(host, "s-0001.s-msedge.net")) 
        || (shExpMatch(host, "s-0004.s-msedge.net"))   
        || (shExpMatch(host, "s0.assets-yammer.com"))  
        || (shExpMatch(host, "scsinstrument-ss-us.trafficmanager.net")) 
        || (shExpMatch(host, "scsquery-ss-us.trafficmanager.net")) 
        || (shExpMatch(host, "scsquery-ss-eu.trafficmanager.net")) 
        || (shExpMatch(host, "scsquery-ss-asia.trafficmanager.net")) 
        || (shExpMatch(host, "site-cdn.onenote.net"))
        || (shExpMatch(host, "skydrive.wns.windows.com"))
        || (shExpMatch(host, "skypemaprdsitus.trafficmanager.net"))
        || (shExpMatch(host, "spoprod-a.akamaihd.net"))		
        || (shExpMatch(host, "ssw.live.com"))
        || (shExpMatch(host, "staffhub.ms))
        || (shExpMatch(host, "staffhub.uservoice.com"))    
        || (shExpMatch(host, "storage.live.com"))				
        || (shExpMatch(host, "telemetry.remoteapp.windowsazure.com"))	
        || (shExpMatch(host, "tse1.mm.bing.net"))     
        || (shExpMatch(host, "web.microsoftstream.com"))     
        || (shExpMatch(host, "wus-www.sway-cdn.com"))						
        || (shExpMatch(host, "wus-www.sway-extensions.com"))        
        || (shExpMatch(host, "wu.client.hip.live.com"))     
        || (shExpMatch(host, "www.bing.com"))
        || (shExpMatch(host, "www.onedrive.com"))
        || (shExpMatch(host, "www.google-analytics.com"))
        || (shExpMatch(host, "www.remoteapp.windowsazure.com")))



    {
        return proxyserver;
    }

        //Catchall for all other traffic to another proxy

    else return "PROXY 10.10.10.11:8080";
}

Here's a few more tools from the community, if you've built something you'd like to share leave a note in the comments. None of the community tools referenced in this article are officially supported or maintained by Microsoft and are provided here for your convenience.

  • Here's the oldest community generated tool to help manage the process. The tool built by a member of the Office 365 community. Here are the instructions and the download.

  • Proof of Concept with exportable firewall rules: Microsoft Cloud IP API.

  • From IT Praktyk: Instructions, RSS conversion, and XML conversion.

  • From Peter Abele: Download.

  • Use your network analysis to determine which network requests should bypass your proxy infrastructure. The most common FQDNs used to bypass customer proxies include the following due to the volume of network traffic sent and received from these endpoints.

    outlook.office365.com
    outlook.office.com
    <tenant-name>.sharepoint.com
    <tenant-name>-my.sharepoint.com
    <tenant-name>-<app>.sharepoint.com
    *.Lync.com
    
  • Ensure any network requests being sent to your firewall directly have a corresponding entry in the firewall allow list to allow the request to go through.

Perimeter network integration

Did you know Microsoft's WAN is one of the largest backbones in the world?

It's true, this massive network is what makes Office 365 and our other cloud services work regardless of where in the world you are. Our network consists of high bandwidth, low latency, fail-over capable links with thousands of route miles of privately owned dark fiber, and multi-Terabit connections between datacenters and edge nodes, all to make it easier to use our cloud services.

With a network like this, you want your organization's devices to connect to our network as soon as possible. With over 2500 ISP peering relationships globally and 70 points of presence, getting from your network to ours should be seamless. It can't hurt to spend a few minutes making sure your ISP's peering relationship is the most optimal, here's a few examples of good and not so good peering hand-offs to our network.

You can manually or automatically configure the devices on your network to optimally handle Office 365 application network requests, depending on your equipment. What configuration changes you need to make to optimally handle Office 365 network traffic will depend on your environment. Office 365 network requests may benefit from network configurations that allow the following:

  • Priority over less critical network traffic.

  • Routing to a local egress to avoid backhauling over a slow WAN link while taking advantage of the low latency available on the Microsoft network. Here’s a good discussion based on customer engagements.

  • Using DNS near a local egress to ensure the network request that leaves the local egress arrives at the nearest Microsoft peering location.

  • Exclusion from deep packet inspection or other intensive network packet processing to meet latency requirements at scale.

Modern network devices include capabilities to manage network requests for trusted applications such as Office 365 differently than generic, untrusted Internet traffic. With the emerging landscape of SD-WAN solutions, such differentiation of traffic and path selection can also be performed with awareness of the changing state of the network, such as point in time availability, latency or performance of various connectivity paths between the user and the cloud.

See Network and migration planning for Office 365, Performance troubleshooting plan for Office 365, and Deployment planning checklist for Office 365 for additional guidance on planning your network configuration.

To implement this scenario:

Check with your network solution or service provider if they can use Office 365 URL and IP definitions from XML to facilitate local (to the user), low overhead network egress for Office 365 traffic, manage its priority relative to other applications and adjust the network path for Office 365 connections into Microsoft network depending on changing network conditions. Some solutions download and automate Office 365 URL and IP XMLs definition in their stacks.

Always ensure that the implemented solution has necessary degree of resiliency, appropriate geo-redundancy of the network path for Office 365 traffic and accommodates changes to Office 365 URLs and IPs as they become published.

Frequently-asked administrator questions about connectivity:

Click the link at the bottom to indicate if the article was helpful or not and submit any additional questions. We monitor the feedback and update the questions here with the most frequently asked.

When new endpoints are announced, there is usually a 30+ day buffer before they are effective and network requests begin going to them. This buffer is to ensure customers and partners have an opportunity to update their systems. FQDN and IP prefix additions and removals are processed in the XML file at the same time as the announcement, meaning a new FQDN will be in the XML file 30 days before use. Since we stop sending network requests to endpoints we're removing prior to announcing their removal, when we remove the endpoint from the XML at the same time as the announcement it is already unused.

Office 365 endpoints are published at the end of each month with 30 days notice. Occasionally changes will occur more than once a month or with shorter notice periods. When an endpoint is added, the effective date listed in the RSS feed is the date after which network requests will be sent to the endpoint. If you're new to RSS, here is how to subscribe via Outlook or you can have the RSS feed updates emailed to you.

After you subscribe to the RSS feed, you can parse the information yourself or with a script. The following table describes the format of the RSS feed o make it easier.

Section

Part 1

Part 2

Part 3

Part 4

Part 5

Part 6

Description

Count

Date after which you can expect network requests to be sent to the endpoint.

Basic description of the feature or service that requires the endpoint.

Can you connect to this endpoint on an ExpressRoute Circuit in addition to the internet?

Yes - you can connect to this endpoint on both the internet and ExpressRoute.

No - you can only connect to this endpoint on the internet.

The destination FQDN or IP range being added or removed.

Example

1/

[Effective xx/xx/xxx.

Required: <description>.

ExpressRoute:

<Yes/No>.

<FQDN/IP>],

A couple other things to note, every entry has a common set of delimiters:

  • / - after the count

  • [ - to indicate the entry for the count

  • . - used in between each distinct section of the entry

  • ], - to indicate the end of a single entry

  • ]. - To indicate the end of all the entries

Tenant location is best determined using our datacenter map.

Peering locations are described in more detail in peering with Microsoft.

With over 2500 ISP peering relationships globally and 70 points of presence, getting from your network to ours should be seamless. It can't hurt to spend a few minutes making sure your ISP's peering relationship is the most optimal, here's a few examples of good and not so good peering hand-offs to our network.

Accepted ExpressRoute routes are defined by Microsoft’s IP ranges and the specific Office 365BGP communities.

We regularly add new features and services to the Office 365 suite, expanding the connectivity landscape. If you’re subscribed to the E3 or E5 SKU, the simple way to think about the list of endpoints is that you need all of them to get full functionality for the suite. If you aren’t subscribed to either of these SKUs the difference is minimal in terms of the number of endpoints.

In the image below you can see an example from a portion of the FQDN table in the Office Online section. The rows are organized by feature and differences in connectivity. The first two rows indicate Office Online relies on the endpoints marked Required in the Office 365 Authentication and Identity and portal and shared sections. This is typical for a service within Office 365 to rely on these shared services. The third row indicates client computers must be able to reach *.officeapps.live.com to use Office Online and the fourth row indicates computers must also be able to reach *.cdn.office.net to use Office Online.

Even though both row three and four are required to use Office Online, they’ve been separated to indicate the destination is different:

  1. *.officeapps.live.com does not represent a CDN, meaning requests to this namespace will go directly to a Microsoft datacenter.

  2. *.officeapps.live.com is accessible on ExpressRoute circuits using Microsoft Peering.

  3. The IP addresses associated with Office Online and *.officeapps.live.com can be found by following this link.

  4. *.cdn.office.net represents a CDN hosted by Akamai, meaning requests to this namespace will go to an Akamai datacenter.

  5. *.cdn.office.net is not accessible on ExpressRoute circuits.

  6. The IP addresses associated with Office Online and *.cdn.office.net are not available.

Screen capture of endpoints page

We only provide IP addresses for the Office 365 servers you should route directly to over the Internet or ExpressRoute. This isn't a comprehensive list of all IP addresses you'll see network requests for. You'll see network requests to Microsoft and third party owned, unpublished, IP addresses. These IP addresses are dynamically generated or managed in a way that prevents timely notice when they change. If your firewall can't allow access based on the FQDNs for these network requests, use a PAC or WPAD file to manage the requests.

See an IP associated with Office 365 that you want more information on?

  1. Check if the IP address is included in a larger published range using a CIDR calculator.

  2. See if a partner owns the IP with a whois query. If it's Microsoft owned, it may be an internal partner.

  3. Check the certificate, in a browser connect to the IP address using HTTPS://<IP_ADDRESS>, check the domains listed on the certificate to understand what domains are associated with the IP address. If it’s a Microsoft owned IP address and not on the list of Office 365 IP addresses, it’s likely the IP address is associated with a Microsoft CDN such as MSOCDN.NET or another Microsoft domain without published IP information. If you do find the domain on the certificate is one where we claim to list the IP address, please let us know.

Office 365 and other Microsoft services use several third-party services such as Akamai and MarkMonitor to improve your Office 365 experience. To keep giving you the best experience possible, we may change these services in the future. In doing so, we often publish the CNAME record which points to a third party owned domain, A record, or IP address. Third party domains may host content, such as a CDN, or they may host a service, such as a geographical traffic management service. When you see connections to these third parties, they’re in the form of a redirect or referral, not an initial request from the client. Some customers need to ensure this form of referral and redirection is allowed to pass without explicitly adding the long list of potential FQDNs third party services may use.

The list of services is subject to change at any time. Some of the services currently in use include:

MarkMonitor is in use when you see requests that include *.nsatc.net. This service provides domain name protection and monitoring to protect against malicious behavior.

ExactTarget is in use when you see requests to *.exacttarget.com. This service provides email link management and monitoring against malicious behavior.

Akamai is in use when you see requests that include one of the following FQDNs. This service offers geo-DNS and content delivery network services.

*.akadns.net
*.akam.net
*.akamai.com
*.akamai.net
*.akamaiedge.net
*.akamaihd.net
*.akamaized.net
*.edgekey.net
*.edgesuite.net

  • You connect to third-party services to retrieve basic internet services such as DNS lookups and CDN content retrieval. You also connect to third-party services for integrations such as incorporating YouTube videos in your OneNote notebooks.

  • You connect to secondary services hosted and run by Microsoft such as edge nodes that enable your network request to enter Microsoft’s global network at the closest internet location to your computer. As the third largest network on the planet, this improves your connectivity experience. You also connect to Microsoft Azure services such as Azure Media Services which are used by a variety of Office 365 services.

  • You connect to primary Office 365 services such as the Exchange Online mailbox server or the Skype for Business Online server where your unique and proprietary data lives. You can connect to the primary Office 365 services by FQDN or IP address and use internet or ExpressRoute circuits. You can only connect to the third party and secondary services using FQDNs on an internet circuit.

The following diagram shows the differences between these service areas. In this diagram, the customer on-premises network in the lower left has multiple network devices to assist in managing network connectivity. Configurations like this one are common for enterprise customers. If your network only has a firewall between your client computers and the internet, that’s supported as well and you’ll want to ensure your firewall can support FQDNs and wildcards in the allow list rules.

Shows the three different types of network endpoints when using Office 365

Office 365 is a suite of services built to function over the internet, the reliability and availability promises are based on many standard internet services being available. For example, standard internet services such as DNS, CRL, and CDNs must be reachable to use Office 365 just as they must be reachable to use most modern internet services.

In addition to these basic internet services, there are third-party services that are only used to integrate functionality. For example, using Giphy.com within Microsoft Teams allows customers to seamlessly include Gifs within Teams. Similarly, YouTube and Flickr are third-party services that are used to seamlessly integrate video and images into Office clients from the internet. While these are needed for integration, they’re marked as optional in the Office 365 endpoints article which means core functionality of the service will continue to function if the endpoint isn’t accessible.

If you’re attempting to use Office 365 and are finding third party services aren’t accessible you’ll want to ensure all FQDNs marked required or optional in this article are allowed through the proxy and firewall.

Secondary services are Microsoft services that don’t fall within Office 365 control. These are things like the edge network, Azure Media Services, and Azure Content Delivery Networks. These are all required to use Office 365 and must be reachable.

If you’re attempting to use Office 365 and are finding third party services aren’t accessible you’ll want to ensure all FQDNs marked required or optional in this article are allowed through the proxy and firewall.

Restricting access to our consumer services should be done at your own risk, the only reliable way to block consumer services is to restrict access to the login.live.com FQDN. This FQDN is used by a broad set of services including non-consumer services such as MSDN, TechNet, and others. Restricting access to this FQDN may result in the need to also include exceptions to the rule for network requests associated with these services.

Keep in mind that blocking access to the Microsoft consumer services alone won’t prevent the ability for someone on your network to exfiltrate information using an Office 365 tenant or other service.

The short icon for LinkedIn Learning. New to Office 365?
Discover free video courses for Office 365 admins and IT pros, brought to you by LinkedIn Learning.

See Also

Microsoft Azure Datacenter IP Ranges

Microsoft Public IP Space

Network infrastructure requirements for Microsoft Intune

Power BI and ExpressRoute

Office 365 URLs and IP address ranges

Managing ExpressRoute for Office 365 connectivity

Connect with an expert
Contact us
Expand your skills
Explore training

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×