none
Remote connection to Sharepoint ONLINE in c# with default credentials RRS feed

  • Question

  • We have an C# app which is CURRENTLY authenticating to Onpremise Sharepoint with a Client Context and DefaultNetwork credential. 

    The Sharepoint component is moving to Sharepoint Online.  I have tried the SharepointOnline Credential Object to authenticate,  and it works 'kinda sorta' but with 2 main problems. 

    1) It only works with LEGACY authentication enabled, and I understand that Micrsoft are deprecating that.

    2) It requires that you pass an ID & password to authenticate.  It does not seem to let you use .DefaultCredential or DefaultNetworkCreadential.

    IS there a way in C# to remotely authenticate to SharepointOnline using either Client Context or WebClient / HTTPREQUEST ( or similar ) to the REST API which is suported in Modern Authentication and with a default Credential or default Network Credential. If possible, please can you link to sample code.

    Thank you


    Richard

    Friday, February 14, 2020 8:59 AM

All replies