You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I am basically copying the examples from the README and this is my code
<?php
require_once 'vendor/autoload.php';
use Office365\Runtime\Auth\ClientCredential;
use Office365\SharePoint\ClientContext;
$credentials = new ClientCredential("{client_id}", "{client_secret}");
$client = (new ClientContext("https://{site}.sharepoint.com/"))->withCredentials($credentials);
$items = $client->getWeb()
->getLists()
->getByTitle("{list-title}")
->getItems()
->get()
->executeQuery();
/** @var ListItem $item */
foreach($items as $item) {
print "Task: {$item->getProperty('Title')}\r\n";
}
I am a bit of a novice. I had tried previously to use the example code using the site / username / password example and was hitting an error thrown within SamlTokenProvider so I thought I'd try the client_id/ secret method - the code for which we see above.
Hi I am basically copying the examples from the README and this is my code
I am a bit of a novice. I had tried previously to use the example code using the site / username / password example and was hitting an error thrown within
SamlTokenProvider
so I thought I'd try the client_id/ secret method - the code for which we see above.When I used an invalid secret I got the message
Fatal error: Uncaught Exception: AADSTS7000215: Invalid client secret provided.
which to me is very encouraging. When I provide the correct secret I get this message:
I am perplexed - is this an issue with this package, me or the config of my Sharepoint infrastructure (using by the way Office 365 - all cloud based).
The text was updated successfully, but these errors were encountered: