phpSPO
phpSPO copied to clipboard
Authentication
- What is the differnce between:
- app principals (client credentials) auth (refer Granting access using SharePoint App-Only for a details)
- user credentials auth
- Why when I use :
use Office365\Runtime\Auth\UserCredentials;
use Office365\SharePoint\ClientContext;
$credentials = new UserCredentials("myuser", "mypsw");
$ctx = (new ClientContext("https//mydomainname.sharepoint.com"))->withCredentials($credentials);
I have this problem Authentication failed: An error occurred while obtaining a token, check your URL or credentials
Try including the site itself in the url for your site: https//mydomainname.sharepoint.com/sites/foobar
https//mydomainname.sharepoint.com => https://mydomainname.sharepoint.com
@vgrem This can be closed.