Article ID: 2497721 - Last Review: March 20, 2012 - Revision: 16.0

Users cannot view or update their display picture in Lync 2010 when they connect to Lync Online in Office 365

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.

On This Page

Expand all | Collapse all

SYMPTOMS

When you connect to Microsoft Lync Online in Microsoft Office 365, you may experience the following issues:
  • Issue 1: Users cannot view or update their display picture in Microsoft Lync 2010.

    Collapse this imageExpand this image

  • Issue 2: Federated contacts or Windows Live users may be unable to display the photo because of the method that is used to store the photo.

CAUSE

Issue 1 may occur if one of the following conditions is true:
  • The user is synchronized from an on-premises Active Directory Domain Services (AD DS) server, and the thumbnailPhoto attribute is not populated.
  • The URL of the picture is inaccessible, or access is denied.
  • The picture is larger than 100 kilobytes (KB).
Issue 2 occurs if the photo is populated by using the method that is described in the "Method 1: Populate the 'thumbnailPhoto' attribute in AD DS" section.

RESOLUTION

To resolve Issue 1, use one of the following methods, as appropriate for your situation.

Method 1: Populate the "thumbnailPhoto" attribute in AD DS

If you are running the Microsoft Online Services Directory Synchronization tool, run a Windows PowerShell script to populate the thumbnailPhoto attribute in the on-premises Active Directory schema. To do this, follow these steps:
  1. Start Notepad, and then paste the following Windows PowerShell script into Notepad:

    $SAMName=Read-Host "Enter a username"
    
    $root = [ADSI]'GC://dc=contoso,dc=local'
    $searcher = new-object System.DirectoryServices.DirectorySearcher($root)
    $searcher.filter = "(&(objectClass=user)(sAMAccountName=$SAMName))"
    $user = $searcher.findall()
    $userdn = $user[0].path
    $userdn = $userdn.trim("GC")
    $userdn = "LDAP" + $userdn
    
    function Select-FileDialog
    {
    param([string]$Title,[string]$Directory,[string]$Filter="All Files (*.*)|*.*")
    [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
    $objForm = New-Object System.Windows.Forms.OpenFileDialog
    $objForm.InitialDirectory = $Directory
    $objForm.Filter = $Filter
    $objForm.Title = $Title
    $objForm.ShowHelp = $true
    $Show = $objForm.ShowDialog()
    If ($Show -eq "OK")
    {
    Return $objForm.FileName
    }
    Else 
    {
    Write-Error "Operation canceled by user."
    }
    }
    
    $photo = Select-FileDialog -Title "Select a photo" -Directory "%userprofile%" -Filter "JPG Images (*.jpg)|*.jpg|PNG Images (*.png)|*.png"
    
    $user = [ADSI]($userdn)
    [byte[]]$file = Get-Content $photo -Encoding Byte
    
    # clear previous image if exist 
    $user.Properties["thumbnailPhoto"].Clear()
    
    # write the image to the user's thumbnailPhoto attribute by converting the byte[] to Base64String 
    $result = $user.Properties["thumbnailPhoto"].Add([System.Convert]::ToBase64String($file))
    
    # commit the changes to AD 
    $user.CommitChanges()
    
    if ($result -eq "0")
    {
    Write-Host "Photo successfully uploaded."
    } 
    else
    {
    Write-Error "Photo was not uploaded."
    }
  2. On line 2 of the script, edit the GC location to reflect the local Active Directory schema. In this example, we use the Contoso.local domain. Therefore, line 2 is as follows:
    $root = [ADSI]'GC://dc=contoso,dc=local'
  3. On the File menu, click Save. In the Save As Type box, click All Files (*.*).
  4. In the File name box, type UploadADPhoto.ps1, and then click Save.
  5. Start Windows PowerShell, and then move to the location where you saved the script.
  6. Run the script, type the alias of the user, and then press Enter. A File-Open dialog box prompts you for the image file in either a JPG or PNG format.
  7. Click Open. The results are displayed on the screen.
  8. If the picture was successfully uploaded, do one of the following:
  9. Wait approximately 12 to 24 hours for all changes to take effect.
Note If the photo was published by using this method, external contacts such as Windows Live Hotmail users or other federated organizations cannot display the photo. The photo cannot be displayed because the file cannot be accessed from external locations.

Method 2: Use a public URL for the image

If you are not running the Microsoft Online Services Directory Synchronization tool, use a public URL for the image, and make sure that the image is smaller than 100 kilobytes (KB). For example, use a URL such as the following:
http://office365.microsoft.com/uploadedImages/Office_365_Content/Home/logo-office-365.png (http://office365.microsoft.com/uploadedImages/Office_365_Content/Home/logo-office-365.png)

Method 3: Add a picture through the Office 365 portal

If you are not running the Microsoft Online Services Directory Synchronization tool, you can add a picture to your Office 365 account in the Office 365 portal. To do this, follow these steps:
  1. Sign in to the Office 365 portal, and then in the upper-right corner of the Office 365 portal, click My Profile.
  2. On the My Profile page, click the default profile picture. A file upload tool is displayed, and this tool lets you upload a picture. 
If the upload operation is successful, the picture should replicate to Exchange Online, to Lync Online, and to SharePoint Online.

Collapse this imageExpand this image
Microsoft Online Portal profile picture

Resolution for Issue 2

To resolve Issue 2, use Method 2 or Method 3 to publish the contact photos.

If external contacts report that they cannot view contact photos, make sure that the photos are not published by using Method 1. In this case, the photos are unavailable to external contacts because the photos are stored in the local AD DS. Therefore, the photos cannot be displayed to external contacts. 

APPLIES TO
  • Microsoft Office 365 for enterprises
  • Microsoft Office 365 for small businesses
Keywords: 
vkbportal231 bposs o365 vkbportal237 vkbportal107 vkbportal230 KB2497721