phpSPO icon indicating copy to clipboard operation
phpSPO copied to clipboard

Too few arguments to function Office365\SharePoint\ClientContext::__construct(), 1 passed and exactly 2 expected

Open nunosilvafullscreen opened this issue 2 years ago • 0 comments

Hello

First of all thanks for the hard work.

I've tried using the sharepoint API but I got an error when trying to connect with the user credentials auth: Too few arguments to function Office365\SharePoint\ClientContext::__construct(), 1 passed and exactly 2 expected

my code is exactly like the documentation: $credentials = new UserCredentials("{userName}", "{password}"); $ctx = (new ClientContext("{siteUrl}"))->withCredentials($credentials);

nunosilvafullscreen avatar Apr 11 '22 13:04 nunosilvafullscreen