'AuthenticationManager' does not contain a constructor that takes 0 arguments

%3CLINGO-SUB%20id%3D%22lingo-sub-1710732%22%20slang%3D%22en-US%22%3E'AuthenticationManager'%20does%20not%20contain%20a%20constructor%20that%20takes%200%20arguments%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1710732%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20the%20following%20code%20to%20connect%20to%20SharePoint%20using%20clientID%20and%20ClientSecret%3A-%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%20%20%20%20string%20siteUrl%20%3D%20%22https%3A%2F%2F****l.sharepoint.com%2Fsites%2FDocumentApprovalProcess%2F%22%3B%0A%20%20%20%20string%20clientId%20%3D%20%22***%22%3B%0A%20%20%20%20string%20clientSecret%20%3D%20%22**%22%3B%0A%20%20%20%20%0A%20%20%20%20using%20(var%20context%20%3D%20new%20AuthenticationManager().GetAppOnlyAuthenticatedContext(siteUrl%2C%20clientId%2C%20clientSecret))%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20i%20am%20getting%20this%20error%3A-%3C%2FP%3E%3CP%3E%3CSTRONG%3E'AuthenticationManager'%20does%20not%20contain%20a%20constructor%20that%20takes%200%20arguments%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1710732%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Valued Contributor

I have the following code to connect to SharePoint using clientID and ClientSecret:-

 

    string siteUrl = "https://****l.sharepoint.com/sites/DocumentApprovalProcess/";
    string clientId = "***";
    string clientSecret = "**";
    
    using (var context = new AuthenticationManager().GetAppOnlyAuthenticatedContext(siteUrl, clientId, clientSecret))

 

 

but i am getting this error:-

'AuthenticationManager' does not contain a constructor that takes 0 arguments

0 Replies