phpSPO
phpSPO copied to clipboard
Too few arguments to function Office365\SharePoint\ClientContext::__construct(), 1 passed and exactly 2 expected
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);