phpSPO icon indicating copy to clipboard operation
phpSPO copied to clipboard

Authentication

Open jlicini opened this issue 3 years ago • 3 comments

  1. What is the differnce between:
  • app principals (client credentials) auth (refer Granting access using SharePoint App-Only for a details)
  • user credentials auth
  1. 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

jlicini avatar Sep 15 '21 10:09 jlicini

Try including the site itself in the url for your site: https//mydomainname.sharepoint.com/sites/foobar

meltir avatar Sep 22 '21 14:09 meltir

https//mydomainname.sharepoint.com => https://mydomainname.sharepoint.com

Dadinos avatar Nov 09 '21 13:11 Dadinos

@vgrem This can be closed.

cweiske avatar Oct 04 '22 13:10 cweiske