packagist microsoft/microsoft-graph 2.0.0-RC5
2.0.0 Release Candidate 5

latest releases: dev-kiota/v1.0/pipelinebuild/164424, v2.14.0, dev-main...
2 years ago

This release contains model bug fixes and the following improvements:

  • Authentication Provider that handles token fetching and refresh behind the scenes for you:
use Microsoft\Kiota\Authentication\Oauth\AuthorizationCodeContext;
use Microsoft\Kiota\Authentication\PhpLeagueAuthenticationProvider;

$tokenRequestContext = new AuthorizationCodeContext(
    'tenantId',
    'clientId',
    'clientSecret',
    'authCode',
    'redirectUri'
);
$scopes = ['User.Read', 'Mail.Read'];
$authProvider = new PhpLeagueAuthenticationProvider($tokenRequestContext, $scopes);
  • A fluent API design:
$messages = $graphServiceClient->usersById(USER_ID)->messages()->get()->wait();

More details in the Upgrade Guide and README

Don't miss a new microsoft-graph release

NewReleases is sending notifications on new releases.