Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exchange Online Basic Auth Deprecation – In Progress #615

Open
nestyxx opened this issue Jan 30, 2023 · 1 comment
Open

Exchange Online Basic Auth Deprecation – In Progress #615

nestyxx opened this issue Jan 30, 2023 · 1 comment

Comments

@nestyxx
Copy link

nestyxx commented Jan 30, 2023

Hello jamesiarmes.

I'm currently in a hurry on several projects that were still using basic authentication to interact with Exchange calendars. Unfortunately, Microsoft 365 has just disabled the function and I am desperately looking for a solution to identify myself otherwise (example Oauth2).

Today we use the following code:

$client = new Client($host, $username, $password, $version);

Despite several tests following all the "msgraph-sdk-php" documentation to generate a token, I couldn't identify myself. The goal is to use the existing code but only change the authentication method.

$client = new Client("outlook.office365.com", Client::VERSION_2016);
$client->authWithOauth2("your-access-token");
// $client->authWithUserAndPass($username, $password);

If anyone has an idea of how to proceed, I remain interested.
Thanks in advance for your feedback.
Alexandre

@nestyxx
Copy link
Author

nestyxx commented Jan 30, 2023

I finally managed to generate an "accessToken" but despite that, I can no longer read the desired calendar.

$client = new Client("outlook.office365.com", Client::VERSION_2016);
$client->authWithOauth2($accessToken);
$client->authWithUserAndPass($username, $password);
$client->setTimezone($timezone);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant