From an historical point of view, various single services such as Exchange and SharePoint Online have been integrated into Office 365, or as it´s named now, Microsoft 365. The platform shows user profile pictures, and syncs that between the services, depending on the service (licenses). Since this can be a little bit confusing, we now have a good article explaining the user profile sync.
User profile picture sync is a important topic for every organization using Microsoft 365. In the end, you want to see users picture in people pickers, in Teams chats and calls, in Exchange, Delve, and so on. We have written some articles about that topic as well in the past, see SharePoint Online UserProfiles and the story about synchronizing with Azure Active Directory-Part 1, Part 2, How user profile synchronization works in Office 365 services and How the UserProfile in Azure Active Directory and how a Mailbox in Exchange Online looks like (using Microsoft Graph). We also have developed a solution for syncing user profile pictures from on premises systems to Microsoft 365. If you are interested in that, pls. contact us.
Back to my hint: Our colleague Yannick Reekmans tweeted today about the request to have profile pictures for guest users as well and included a link to a good article at Information about profile picture synchronization in Microsoft 365. So here´s the user profile picture story. All pictures below are from the support.microsoft.com article.
With Exchange Online
If a user has an Exchange Online mailbox, the user profile picture is automatically synced to SharePoint Online, as the following picture shows. The sync happens, when the user profile picture is requested in SharePoint Online. SPO gets the picture form EXO and creates 3 thumbnail sizes and stores that in the My Site Host site collection.
In Exchange, admins can set the user´s profile picture as described at Set-UserPhoto.
With SharePoint Online only
The users updates his profile picture directly in SPO by clicking on the user information in the top right corner, in My Office profile (Delve) as here.
SPO creates the thumbnail photos and updates the User Profile in it´s database. So, SPO always accesses it´s own user profiles.
In SPO, admins can set the user´s profile picture only with code. As mentioned, we have a small tool running through a directory and setting the user profile in SPO.
Sure, there are multiple ways to update user profile photos. The articles explains a little bit of the background to accomplish that task.