Skip to content

2.0.0 Release Candidate 5

Pre-release
Pre-release

Choose a tag to compare

@Ndiritu Ndiritu released this 06 Jul 16:50
· 1304 commits to main since this release

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