I am attempting to connect to SharePoint 2016 Server (On Premise) using CSOM. I've researched a number of items and have found no solution. Here's the code I'm using:
clientCtx.AuthenticationMode = ClientAuthenticationMode.Default;
clientCtx.Credentials = new NetworkCredential("userName","password");
//Get the Web
var cliWeb = clientCtx.Web;
//Get all of the lists
var allLists = cliWeb.Lists;
//Now package the query
clientCtx.Load(allLists);
//Now execute the query
try
{
clientCtx.ExecuteQuery();
}
I can see from the ULS log the auth-N works as expected but that the account does not have any permissions. I'm signed in with a Site Collection admin account
Successfully got user key for user. UserNameSuffix: '0#.w|XXXXXXXXX'. a9d0fc9e-de99-707e-8b46-5c178ad55341 08/22/2019 14:46:31.15 w3wp.exe (0x4584) 0x1C94 SharePoint Foundation Logging Correlation Data xmnv Medium Site=/ a9d0fc9e-de99-707e-8b46-5c178ad55341 08/22/2019 14:46:31.16 w3wp.exe (0x4584) 0x1C94 SharePoint Foundation General 8xfr Medium PermissionMask check failed for {75A3160C-BF3B-4D51-AAEF-2AC9D7437BC0}. Asking for 0x08000000, have 0x00000000 a9d0fc9e-de99-707e-8b46-5c178ad55341 08/22/2019 14:46:31.16 w3wp.exe (0x4584) 0x1C94 SharePoint Foundation Site Cache az4z8 Medium Looking up SPSite by ID 2b98c19f-32f4-4498-a61c-bc8f6735119a in memory. a9d0fc9e-de99-707e-8b46-5c178ad55341 08/22/2019 14:46:31.16 w3wp.exe (0x4584) 0x1C94 SharePoint Foundation General 8xfr Medium PermissionMask check failed for {75A3160C-BF3B-4D51-AAEF-2AC9D7437BC0}. Asking for 0x00010000, have 0x00000000 a9d0fc9e-de99-707e-8b46-5c178ad55341
Any insight as to what I'm missing would be greatly appreciated.