Some Office 365 customers have a requirement to filter the Internet traffic.
This filtering can be done at the domain or IP address level. Microsoft strongly recommends that customer enable routing to the root domain names, such as *.Outlook.com, *.MicrosoftOnline.com and *.SharePoint.com instead of routing to specific IP address subnets.
It is possible to use IP-based filtering for the SSL content downloaded from Office365, as detailed in this article Office 365 URLs and IP Address Ranges. However, datacenter IP addresses are subject to change at any time, and Microsoft makes no commitment for updating or notifying the IP address ranges used by Office 365. Therefore it is highly recommended that if needed, customers configure filtering based on domain names and not by IP address.