oauth2-azure icon indicating copy to clipboard operation
oauth2-azure copied to clipboard

TypeError in getRootMicrosoftGraphUri

Open Loki3000 opened this issue 1 year ago • 2 comments

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.

Loki3000 avatar Sep 21 '24 05:09 Loki3000

The statement is correct (is in use here every day) - so it is worth checking your $tenant and $version

decomplexity avatar Sep 21 '24 07:09 decomplexity

Possible return types of getOpenIdConfiguration is array|string (string in case of BadResponseException) in case of string statement $openIdConfiguration['msgraph_host'] is not correct

Loki3000 avatar Sep 21 '24 07:09 Loki3000