Hi @Braian Anderson,
According to the definition of NetworkCredential, its three parameters are, username, password, and domain name. You can try the code below.
using System;
using System.Net;
using Microsoft.SharePoint.Client;
namespace SharePointCSOM
{
class Program
{
static void Main(string[] args)
{
string siteUrl = "https://yoursharepointsite.com";
string username = "yourusername";
string password = "yourpassword";
string domain = "yourdomain";
NetworkCredential credentials = new NetworkCredential(username, password, domain);
using (ClientContext context = new ClientContext(siteUrl))
{
context.Credentials = credentials;
Web web = context.Web;
context.Load(web);
context.ExecuteQuery();
Console.WriteLine("Title: " + web.Title);
}
}
}
}
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.