SharePoint Online User Photo Sync

Introduction

Hi friends, in this post let us see how the user’s photo are synced with SharePoint User Profile service from Azure AD, Exchange online and from on-premise AD.

SharePoint Online Users with Exchange Online

Some organization will have all their services in cloud like Active Directory, CMS system, Email etc. When the users have both SharePoint and Email in online, the photo of the user is fetched from the exchange online profile and stored in the User Profile Library with 3 different sizes as small, medium, and large thumbnail photos. The synchronization between the exchange profile photo and the SharePoint UPS photo is auto.

Note: The picture is synced with Exchange Online only one time every 24 hours. The photo synced is common to all the M365 Services.

office 365 profile
The diagram illustrates how the photo sync works for users with Exchange Online. It is taken from the Microsoft site.

SharePoint Online Users without Exchange Online

What if the organization have only purchased SharePoint Online and maintaining the email from their on-premise setup? how the photos are synced in SharePoint UPS? the answer is a Big Noooo. There is no direct synchronization built, users have to upload their photos directly in their UPS page or they can use their delve profile page to upload the photos.

sharepoint online only users
This illustrates the photo sync without exchange online. The diagram is taken from the Microsoft site.

SharePoint Online User with AAD synced with On-Premise AD

Some organization may sync their local AD to Azure AD and import all the user information including photo to Azure AD. But the concern it is not synced automatically with SharePoint UPS. But if you are accessing SharePoint pages, you may see your initials or photo. This is because the photos are fetched from the Azure AD using the MSGraph API. Once the pictures are updated in Azure AD, it is updated in Delve and may be shown in SharePoint pages too, but when you try to get the User Photo URL from SharePoint UPS, it might return empty or the placehoder image URL.

In order to sync the profile pictures from Azure AD or from any other source repo, you can use the below solution provided by PnP team to update the photo in SharePoint UPS, which still works for both SharePoint On-premise and also for SharePoint Online.

Core.ProfilePictureUploader

The solution takes care of creating all the thumbnails and also map the picture to the user properties. The downside of this solution is that it cannot be used by the business users or Site administrators. It has to be done by the SharePoint administrators who has the higher priviledge and also knows how to execute the command line tools.

Note: Soon there will be a new release to the PnPWebparts samples on user profile photo sync from Azure AD to SharePoint UPS using SPFx web part which can be used by the business users or site administrator with no-code experience.

Reference articles

Happy Coding…

5 thoughts on “SharePoint Online User Photo Sync

  1. Pingback: SPFx – SharePoint Online User Profile Photo Sync | Knowledge Share

  2. Pingback: SharePoint PnP Dev SPFx JS SIG Call – October 22nd, 2020 – Screenshot Summary - Warner Digital

  3. I blog frequently and I truly appreciate your information. The article has truly peaked my interest. I am going to book mark your blog and keep checking for new details about once a week. I opted in for your Feed too.

    Like

Leave a comment