I am implementing Microsoft Azure Active Directory authentication using Microsoft Graph and OAuth2 using this tutorial.
Here is my call which fetches me the displayName, givenName, surName, mail, etc.
$graph = new Graph();
$graph->setAccessToken($accessToken->getToken());
$user = $graph->createRequest('GET', '/me?$select=displayName,givenName,surName,mail,mailboxSettings,userPrincipalName')
->setReturnType(ModelUser::class)
->execute();
$fname = $user->getGivenName();
$mail = $user->getMail();
Now using the same call, how can I fetch profile image of the user? I don't want to make a separate API call, but want to fetch the photo in same call.
How can I get the profile image?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…