microsoftgraph / msgraph-sdk-php

Microsoft Graph Library for PHP.
Other
578 stars 144 forks source link

Question: how to obtain accessToken from graphServiceClient? #1443

Closed alecrt closed 10 months ago

alecrt commented 10 months ago

I need to call Sharepoint REST Api v1 in order to get comments of a ListItem.

How can I get the accessToken from a client instatiated as follow?

$tokenRequestContext = new ClientCredentialContext(
         $tenantId,
         $clientId,
         $clientSecret
      );
$client = new GraphServiceClient($tokenRequestContext);
Ndiritu commented 10 months ago

There's an ongoing discussion about this here so I'll close this.