429 HTTP status code when calling IP/URL web services and how to avoid them

Microsoft

Do you see 429 HTTP status codes when you call the Office 365 IP/URL web services?


Most customers cache IP Address and URL information for Office 365 locally and it is expected that devices and services calling the web service for this data do the same.


We provide three web service methods for access to the Office 365 endpoints data and the access pattern is recommended to be calling the /version API once an hour to check if there has been an update. If there is an update, then you would call the /endpoints and/or /changes web methods to get details of the update. Since the data normally only changes once at the end of each month, there is no need to call the /endpoints or /changes APIs repeatedly.


To encourage this pattern, we limit the number of calls for each client per hour for the /endpoints and /changes APIs. The /version API is not limited. The limit for /endpoints and /changes APIs are currently set to 30 requests an hour, which considering the data is only expected to change a few times a month, is far more than would be needed in most cases. Any clients making more than this limit per hour will receive 429 HTTP status codes and calls will not be completed. Simply follow the recommended pattern of calling the /version API once an hour and only calling the /endpoints and /changes APIs if a new version is detected to avoid receiving 429 errors.


You will need to watch this limit if you are in development, as testing can easily go over 30 requests an hour. If you’re seeing 429 you will need to wait until the top of the hour before trying again. Please also test how your code responds to the 429 error codes.

 

For more information about these web services see http://aka.ms/ipurlws 

0 Replies