SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,240 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
System.Net.WebException: 'The remote server returned an error: (403) FORBIDDEN.'
I am using .NET 8, and I've already tried with GetACSAppOnlyContext but it wouldn't work because I need to access more than 5 SharePoint sites simultaneously. There was an error in CC.ExecuteQuery();
using (CC = authManager.GetWebLoginClientContext(siteUrl))
{
List list = CC.Web.Lists.GetByTitle("TT_002_Test");
CamlQuery oQuery = CamlQuery.CreateAllItemsQuery();
ListItemCollection oCollection = list.GetItems(oQuery);
CC.Load(oCollection);
CC.ExecuteQuery();
}