Reading and updating a user's profile photo is only possible if the user has a mailbox. Additionally, any photos that may have been previously stored using the thumbnailPhoto property (using the Office 365 unified API preview, or the Azure AD Graph, or through AD Connect synchronization) are no longer accessible through the Microsoft Graph photo property of the user resource. For more details You could check official docs here
Microsoft Graph v1.0 retrieves the user's profilePhoto from Exchange
Online, not Azure Active Directory. As such, users that don't have a
mailbox provisioned in Exchange Online will not have a profilePhoto
available
Your Case:
You could try with Microsoft Graph REST API Beta
version request URL in flowing format:
https://graph.microsoft.com/beta/users/UserIdOrPrincipalName/photo/$value
See the screen shot below:
Azure Active Directory Profile Picture:
Post Man Request Example:
Request URL:
https://graph.microsoft.com/beta/users/UserIdOrPrincipalName/photo/$value
Points To Remember:
Make sure you have upload user photo in azure portal profile.
Note:
APIs under the /beta version in Microsoft Graph are subject to change.
Use of these APIs in production applications is not supported
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…