Unquoted array indexes in oauth.php
in oauth.php
$provider = new GenericProvider([
'clientId' => Constants::CLIENT_ID,
'clientSecret' => Constants::CLIENT_SECRET,
'redirectUri' => Constants::REDIRECT_URI,
'urlAuthorize' => Constants::AUTHORITY_URL . Constants::AUTHORIZE_ENDPOINT,
'urlAccessToken' => Constants::AUTHORITY_URL . Constants::TOKEN_ENDPOINT,
'urlResourceOwnerDetails' => '',
'scopes' => Constants::SCOPES
]);
note how the array indexes need to be quoted. After installing the sample, quotes around clientId, clientSecret, etc... are missing
Same here:
// Get an access token using the authorization code grant
$accessToken = $provider->getAccessToken('authorization_code', [
'code' => $_GET['code']
]);
Quotes around index 'code' are missing.
Not sure I'm following. The quotes are there in the source files, are you saying they disappear? I just cloned it to my machine and opened it with VS Code:

I followed a quickstart for PHP here https://developer.microsoft.com/en-us/graph/quick-start, logged in to my Microsorft account and downloaded the REST sample.
REST sample zip in annexe.
The oauth.php file is in the app folder. That particular file is missing the mentioned quotes.
Hope this helps. php-connect-rest-sample.zip
Oh ok, I see. I reproduce it going through the QS too. Our quick start app either has a bad copy or is doing something to the file before delivering it to you. I'll investigate. Thanks for reporting this!
@FirstWarden thanks for reporting this. The copy we had on our download server for the quick-start did indeed have a bad copy of the file. We've uploaded a new copy so this should be fixed.