Kirk Liemohn is a Principal Software Engineer at ThreeWill. He has over 20 years of software development experience with most of that time spent in software consulting.
Background of User Photo Sync Behavior in Office 365
In O365 there are a plethora of ways to view and configure user profile images. If these images were stored in a single location, this would not be a problem. But, it turns out that they are not and that the rules for how these images are synchronized across the various data stores is a little complicated. So, the purpose of this post is to shed some light on how this works today.
There are several ways that users can view their profile image or somebody else’s profile image:
- From SharePoint
- My Site
- People Search Result
- People Search Result Contact Hover
- People Picker Field (configured to show the profile image)
- From Outlook Online
- Contact Card
- Thumbnail on Existing Email
- Thumbnail on Draft Email
- From Outlook Client
- From Lync Client
- From Yammer
There are also several ways a user’s photo can be changed:
- SharePoint My Site
- Outlook Client
- Outlook Online
- Lync Client
- Set-UserPhoto (powershell script)
- DirSync (if synchronizing AD thumbnail images)
The first 5 above are done by the user themselves, whereas Set-UserPhoto would be run by an administrator and DirSync is a background process.
What is odd, and the reason I feel compelled to discuss this, is that a user’s profile image is not necessarily synchronized everywhere you see it.
In general the issues are:
- Yammer is separate. Profile image synchronization between Yammer and SharePoint/Outlook/Lync does not exist (unless maybe Yammer can do a sync from AD – I didn’t look into that). Yammer should move towards one identity in the summer of 2014, I understand. At that point, the story should be better.
- If you make a change in Outlook or Lync, it may not show up in SharePoint. But this part can get confusing, so let’s continue…
Let’s talk details…
When a user changes his/her profile image from SharePoint Online, it is immediately available in Outlook and Lync. Here are the caveats for when images are changed form the SharePoint profile page (My Site):
- Images can be cached by browses, so SharePoint search results could show a cached image (and I have observed this), but it appears that the people picker URL has a timestamp so it may not be subject to any browser caching.
- The Outlook client can cache images, so you may need to exit Outlook and restart it to see an updated image, but I have seen this change quickly as well.
- Outlook Online may cache the image, but doesn’t seem to for very long (several seconds is the longest I have seen).
- Lync seems to notice the image change very quickly, with the exception that the Lync image does not show up when a user is offline with Lync. Once the user logs into Lync, the image should show up quickly to others observing that user via Lync.
- If you have changed your profile image within the last 72 hours, the change that you made in SharePoint may persist for Outlook and Lync, but it may not persist for SharePoint. Yes, believe it or not, it synchronizes to other applications, but doesn’t necessarily “stick” for SharePoint. To make it stick, simply edit your profile image again from SharePoint and hit cancel. Not exactly how I would design a user interface, but it does the trick.
When a user’s profile image is changed from a Outlook, Lync, Set-UserPhoto, or DirSync, it shows quickly in Outlook or Lync with all of the caveats above. However, the rules for when the image shows up in SharePoint are a little confusing:
- This is the odd-ball in the group. The image will show in the People Search Result Contact Hover immediately. This is not the hover card for search results that shows on the right side of the page. This is a rectangular hover panel that sometimes shows up when you hover on the person’s image in search results. This hover panel is identical to what is seen in Outlook Online, and it clearly comes directly from Outlook Online (which already has the updated image).
- The image will never show up until the user whose profile image was changed visits his/her My Site (or any page that shows the large thumbnail image) after the profile image has been changed. This is a big deal from my viewpoint. If a user doesn’t go to their profile page (My Site), profile image changes won’t sync to SharePoint.
And then there’s one more rule:
If the user has updated his/her profile image within the last 72 hours, SharePoint will not show the update until the 72 hours has passed. The reasoning behind the 72 hour delay (according to O365 support) is the extra processing power required to create the 3 sizes of profile images in SharePoint. If a user makes multiple changes in Outlook Online with a 72 hour period, only the first and last will get pushed to SharePoint.
A way to bypass this rule is to edit the profile image from the SharePoint My Site and then hit cancel.
If you read that rule closely enough, you’ll realize that in some cases when you change your profile image in SharePoint, it will update immediately in Outlook and Lync, but it won’t do so in SharePoint until you try to edit it again (and you can hit cancel) or you wait 72 hours.
What say you?
Do your results match mine? We have seen this in 3 different Office 365 tenants; 2 that use DirSync and one that does not. However, with SharePoint Online we have learned that mileage may vary, so I’d like to hear from others. This has been a painful experience trying to understand how this works. I hope I have clarified this for a few of you.
Microsoft has some internal documentation on this, but nothing available to the public at the time of this writing. They seem to indicate that if you have at least visited your My Site once in the past (to get it created), that profile image changes outside of SharePoint should show up in SharePoint even if you don’t visit your My Site. This is not what we are seeing, though.
If you want to try the Set-UserPhoto approach, first you need to download the SharePoint Online Management Shell. With it you need to connect to Exchange then you can call Set-UserPhoto. See also Introduction to the SharePoint Online Management Shell.