Whether the account enabled MFA?
Make sure the account has permission for 5 sites then run following codes. Replace username, password, and domain with the appropriate values.
using (ClientContext context = new ClientContext(siteUrl))
{
string userName = "username";
string password = "password";
string domain = "domain";
context.Credentials = new NetworkCredential(userName, password, domain);
List list = context.Web.Lists.GetByTitle("TT_002_Test");
CamlQuery oQuery = CamlQuery.CreateAllItemsQuery();
ListItemCollection oCollection = list.GetItems(oQuery);
context.Load(oCollection); context.ExecuteQuery();
}
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.