Forum Discussion

Vijaya Vellabati's avatar
Vijaya Vellabati
Copper Contributor
Aug 01, 2017
Solved

Authenticating to SharePoint Online site using CSOM

Hello,    We have federated authentiation in our org and i am trying to connect to SharePoint site using CSOM with SharePoint Online credentials but getting an error. Here is the error message; Mi...
  • paulpascha's avatar
    Aug 02, 2017

    I've seen this error more than once. In most cases I just typed username / password wrong. Federated authentication should not be a problem but have you considered using App Credentials also? Are you using Multi-factor authentication? 

     

    PnP's AuthenticationManager Class provides some usefull utility methods to obtain an authenticated context in different ways. Could you try using GetWebLoginClientContext  for getting an authenticated context? 

    https://github.com/SharePoint/PnP-Sites-Core/blob/master/Core/OfficeDevPnP.Core/AuthenticationManager.cs

     

     

Resources