none
Specifying UserAgent to prevent 429 errors when doing SharePoint Online API calls?

모든 응답

  • Hi,

    To get the app name and version, you need register SharePoint Add-in first, please follow the article below:

    https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/register-sharepoint-add-ins

    Please check the article below to get more explanation.

    https://dev.office.com/blogs/updated-guidance-around-sharepoint-web-service-identification-and-throttling

    You can also use the ExecuteQueryWithIncrementalRetry method to avoid the 429 errors.

    The following solution from GitHub for your reference:

    https://github.com/SharePoint/PnP/tree/dev/Samples/Core.Throttling

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.


    2018년 6월 7일 목요일 오전 9:11
    중재자
  • Hi Dennis,

    We read through that documentation. 

    Question: Does specifying the user-agent that associated with an "App" increase the amount of requests we can make without getting throttled? 

    We are trying to figure out if there is any point of setting up an "App" and specifying a User-Agent in all requests to help identify us. We only want to do that if it's going to make it possible to make more requests without getting rate limited so much. 
    2018년 6월 7일 목요일 오후 9:02
  • Hi,

    Base on the Official document, it is recommending that SharePoint web service callers identify their service through the UserAgent HTTP Header – even if you are already using an application identifier.

    Best Regards,

    Dennis 


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.


    2018년 6월 8일 금요일 오전 9:24
    중재자
  • Thanks for the reply.

    OK I can definitely add this UserAgent http header to my requests, but the biggest problem I am having is knowing what to put in it.

    Do I just come up with my own appname and version? 

    For example from the website they have 

    CompanyName = Contoso

    AppName=GovernanceCheck

    Version=1.0

    User agent string:

     "NONISV|Contoso|GovernanceCheck/1.0"

    Are they able to use any string they want for company, appname and version? Or do these need to match an application name/company name/version in an Office365 app?

    2018년 6월 14일 목요일 오후 1:28
  • Hi,

    Any update?

    Did you solve this issue?

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    2018년 7월 3일 화요일 오전 9:12
    중재자