403 forbidden and Token request failed issue in sharepoint csom RRS feed

  • Question

  • we are performing CRUD operations on sharepoint list by using appid appsecret for authentication. We have also used multithreading here so for each thread new clientcontext is generated

    string siteUrl = "https://tenant.sharepoint.com/sites/demo";  

    Parallel.Foreach(users in (tempuser)=> {

    using (var cc = new AuthenticationManager().GetAppOnlyAuthenticatedContext(siteUrl, "[Your Client ID]", "[Your Client Secret]"))  
        cc.Load(cc.Web, p => p.Title);  
    };  });

    we are trying to perform CRUD operations for 1.5 lacs records. After executing executequery certain number of times it is showing 403 forbidden error. So we used throttling ExecuteQueryWithIncrementalRetry() mention in below article. It still showing 403 forbidden error. Can anyone help me for this issue. When i try to debug it works perfectly but after executing certain number of time its showing 403 forbidden and Token request failed issue


    Sunday, May 24, 2020 2:26 AM

All replies

  • Maybe a SharePoint forum would be more appropriate? 


    Sunday, May 24, 2020 7:20 AM