Home

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

%3CLINGO-SUB%20id%3D%22lingo-sub-380411%22%20slang%3D%22en-US%22%3E429%20HTTP%20status%20code%20when%20calling%20IP%2FURL%20web%20services%20and%20how%20to%20avoid%20them%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-380411%22%20slang%3D%22en-US%22%3E%3CP%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EDo%20you%20see%20429%20HTTP%20status%20codes%20when%20you%20call%20the%20Office%20365%20IP%2FURL%20web%20services%3F%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CBR%20%2F%3EMost%20customers%20cache%20IP%20Address%20and%20URL%20information%20for%20Office%20365%20locally%20and%20it%20is%20expected%20that%20devices%20and%20services%20calling%20the%20web%20service%20for%20this%20data%20do%20the%20same.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CBR%20%2F%3EWe%20provide%20three%20web%20service%20methods%20for%20access%20to%20the%20Office%20365%20endpoints%20data%20and%20the%20access%20pattern%20is%20recommended%20to%20be%20calling%20the%20%2Fversion%20API%20once%20an%20hour%20to%20check%20if%20there%20has%20been%20an%20update.%20If%20there%20is%20an%20update%2C%20then%20you%20would%20call%20the%20%2Fendpoints%20and%2For%20%2Fchanges%20web%20methods%20to%20get%20details%20of%20the%20update.%20Since%20the%20data%20normally%20only%20changes%20once%20at%20the%20end%20of%20each%20month%2C%20there%20is%20no%20need%20to%20call%20the%20%2Fendpoints%20or%20%2Fchanges%20APIs%20repeatedly.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CBR%20%2F%3ETo%20encourage%20this%20pattern%2C%20we%20limit%20the%20number%20of%20calls%20for%20each%20client%20per%20hour%20for%20the%20%2Fendpoints%20and%20%2Fchanges%20APIs.%20The%20%2Fversion%20API%20is%20not%20limited.%20The%20limit%20for%20%2Fendpoints%20and%20%2Fchanges%20APIs%20are%20currently%20set%20to%2030%20requests%20an%20hour%2C%20which%20considering%20the%20data%20is%20only%20expected%20to%20change%20a%20few%20times%20a%20month%2C%20is%20far%20more%20than%20would%20be%20needed%20in%20most%20cases.%20Any%20clients%20making%20more%20than%20this%20limit%20per%20hour%20will%20receive%20429%20HTTP%20status%20codes%20and%20calls%20will%20not%20be%20completed.%20Simply%20follow%20the%20recommended%20pattern%20of%20calling%20the%20%2Fversion%20API%20once%20an%20hour%20and%20only%20calling%20the%20%2Fendpoints%20and%20%2Fchanges%20APIs%20if%20a%20new%20version%20is%20detected%20to%20avoid%20receiving%20429%20errors.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CBR%20%2F%3EYou%20will%20need%20to%20watch%20this%20limit%20if%20you%20are%20in%20development%2C%20as%20testing%20can%20easily%20go%20over%2030%20requests%20an%20hour.%20If%20you%E2%80%99re%20seeing%20429%20you%20will%20need%20to%20wait%20until%20the%20top%20of%20the%20hour%20before%20trying%20again.%20Please%20also%20test%20how%20your%20code%20responds%20to%20the%20429%20error%20codes.%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EFor%20more%20information%20about%20these%20web%20services%20see%20%3CA%20href%3D%22http%3A%2F%2Faka.ms%2Fipurlws%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Faka.ms%2Fipurlws%3C%2FA%3E%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Paul Andrew
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 

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
16 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
11 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies