Microsoft 365 URLs and Ports for SharePoint Online API Access
Question details
Identify the current Microsoft 365 network requirements and secure connectivity needed for SharePoint Online to access an on-premises API.

- Product
- Microsoft SharePoint Online
- Device & OS
- not provided
- Scenario
- An organization needs to configure network and security controls for an on-premises API used in a SharePoint Online integration.
- Observed behavior
- The desired configuration permits the required API traffic while accounting for changing Microsoft 365 endpoints and the integration's connectivity method.
Identify the component that will call the API, such as a SharePoint Framework app or a workflow connector, and whether it runs in a browser or a Microsoft cloud service. Confirm whether the API is publicly reachable or requires a supported gateway or other connectivity component.
Check Microsoft 365 endpoints for the SharePoint Online scenario
Use Microsoft's current documentation instead of a static list of URLs or IP ranges.
Microsoft's endpoint list primarily describes connections to Microsoft 365 services. It does not by itself identify the source IP addresses of every integration that might call your on-premises API.
Visit https://learn.microsoft.com/en-us/microsoft-365/enterprise/urls-and-ip-address-ranges and select the Microsoft 365 cloud environment used by your organization.
Find the SharePoint Online and OneDrive for Business section and review the URLs, IP ranges, ports, protocols, and categories relevant to your scenario. Some endpoints are shared, so do not exclude an entry solely because it also serves OneDrive.
Use the Microsoft 365 IP address and URL web service linked from the documentation to monitor endpoint changes and update applicable outbound firewall or proxy rules.

Configure secure connectivity to the on-premises API
Use this approach to determine which inbound rules, authentication, and connectivity components the integration actually needs.
Work with Office files using WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with Office documents. Open existing files to make the move easier, while using Microsoft documentation and tools to configure SharePoint API connectivity.

Frequently Asked Questions
Where can I find the current SharePoint Online URLs and IP ranges?
Open Microsoft's Microsoft 365 URLs and IP address ranges documentation and review the SharePoint Online and OneDrive for Business section for your cloud environment. Use the linked endpoint web service to monitor changes.
Can I exclude all OneDrive endpoints from the SharePoint list?
Not necessarily. SharePoint Online and OneDrive for Business share some endpoints. Review each entry against the services and features your organization uses before excluding it.
Is TCP port 443 the only port needed for the API?
HTTPS commonly uses TCP 443, but the full requirement depends on the calling component, API configuration, and connectivity route. Check the connector or gateway documentation and your API's listening port.
Do Microsoft 365 endpoint IP ranges identify callers to my API?
Not automatically. The Microsoft 365 endpoint list primarily identifies destinations used to reach Microsoft services. Consult the specific calling service or connector documentation for its outbound source IP requirements.
Does SharePoint Online always need a gateway to reach an on-premises API?
No. The available route depends on the integration and calling component. Check whether that component supports an on-premises gateway or another private connection before configuring access.




