oauth2-azure
oauth2-azure copied to clipboard
TypeError in getRootMicrosoftGraphUri
Hi there!
$openIdConfiguration = $this->getOpenIdConfiguration($tenant, $version);
return 'https://' . $openIdConfiguration['msgraph_host'];
After an unsuccessful attempt to get the configuration, getOpenIdConfiguration returns an empty string. As a result, the next line triggers a TypeError. It's not an exception, so it isn't caught by other error handlers.
The statement is correct (is in use here every day) - so it is worth checking your $tenant and $version
Possible return types of getOpenIdConfiguration is array|string (string in case of BadResponseException)
in case of string statement $openIdConfiguration['msgraph_host'] is not correct