The remote server returned an error: (429).

Nerobov Andrey 96 Reputation points
2021-03-17T14:03:04.743+00:00

Hello! I have 3 services in my company. All services work with one service account and sometime I catch error:
The remote server returned an error: (429). Stack: at System.Net.HttpWebRequest.GetResponse() at Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute() at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb) at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery() at DD.ProjectApproval.Model.SPListItemExtensions.GetFieldUserValueNew(ListItem item, String fieldName, ClientContext clientContext).
I read microsoft recomendations, but I undurstend about
e.WebRequestExecutor.WebRequest.UserAgent = "NONISV|Contoso|GovernanceCheck/1.0";
GovernanceCheck - Enterprice app name, Do I only have to register new app in Enterprice App or need to configure it else?
Contoso -name of Company, where I can find name in Azure?

  1. 0 -versions of app, where I can find versions?
    And I read about "ExecuteQueryWithIncrementalRetry extension method", Is method better tnan ExecuteQueryRetry in OfficeDevPnP.Core, Version=2.24.1803.0?
    Thanks!
Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

14 answers

Sort by: Most helpful
  1. Nerobov Andrey 96 Reputation points
    2021-03-18T07:52:46.107+00:00

    @Jerryzy-MSFT Where did you get name "GovernanceCheck" and version "1.0" and "Contoso"? Can I use any names?

    0 comments No comments

  2. ZhengyuGuo 10,586 Reputation points Moderator
    2021-03-18T07:59:41.543+00:00

    @Nerobov Andrey ,

    I'm using the sample in official document, you can use your own value, official document have specified, suggest you check out the official document carefully:

    79054-snipaste-2021-03-18-15-57-35.png

    And currently, please wait for 429 recovery firstly.

    0 comments No comments

  3. Nerobov Andrey 96 Reputation points
    2021-03-18T08:08:09.35+00:00

    @Jerryzy-MSFT , I saw it, but I don't know Company Name and App name. I have Azure function where I get error 429. Where's the company name and the app name on the screen?79036-image.png

    0 comments No comments

  4. ZhengyuGuo 10,586 Reputation points Moderator
    2021-03-18T08:13:12.417+00:00

    @Nerobov Andrey ,

    You can use the Tenant name as the comany name and function name as app name.

    Besides the UserAgent, it's best to use ExecuteQueryWithIncrementalRetry handle 429 issue as suggested above.

    0 comments No comments

  5. Nerobov Andrey 96 Reputation points
    2021-03-18T08:25:01.913+00:00

    @Jerryzy-MSFT I find tenat names, but which name is more correct? 79038-image.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.