Forum Discussion

spaieszambiacom's avatar
spaieszambiacom
Copper Contributor
Oct 04, 2022
Solved

Sharepoint online CSOM error

Hello,    I've been trying this simple CSOM code: string siteCollectionUrl = "https://ieszambia.sharepoint.com/"; string userName = "mailto:email address removed for privacy reasons"; string passw...
  • SvenSieverding's avatar
    SvenSieverding
    Oct 04, 2022

    spaieszambiacom 

    Mhm.... i normally use the "PnP.Framework" Library and this code

    SecureString securePassword = new NetworkCredential("", password).SecurePassword;

    PnP.Framework.AuthenticationManager auth = new PnP.Framework.AuthenticationManager(username,securePassword);
    ClientContext ctx = auth.GetContext(siteUrl);


Resources