Doug Deitterick's Blog

Information about Microsoft Lync, OCS, and Exchange UM.

Issue Completely Disabling Photos in Lync 2013

Issue Completely Disabling Photos in Lync 2013

  • Comments 12
  • Likes

I had a customer request recently to be able to completely disable photos for some users in Lync 2013.  They didn't want photos to show up anywhere in the Lync 2013 client for these users.  It sounded like an easy enough request, however, it turned out not to be.  Photos in this environment would be coming from AD, stored in the thumbnailPhoto attribute.  When user's logged in, photos would display as expected:

In order to disable photos in the client, you will need to edit the client policy.  You can run:

Set-CsClientPolicy -Identity <policy> -DisplayPhoto NoPhoto

If you sign out and back in to the Lync client, you will notice that photos no longer display:

Simple enough, right?  Unfortunately, there's one small wrinkle.  If you view a user's contact card:

or open an IM window with a user:

You'll notice that their photo is displayed.  This is a different experience than the Lync 2010 client where photos are disabled in the contact card and IM window after setting the DisplayPhoto parameter to NoPhoto in the client policy:

There is another parameter in the client policy that can control photos, MaxPhotoSizeKB.  From the Set-CsClientPolicy TechNet article:

Indicates the maximum size (in kilobytes) for photos displayed in Lync. Setting the MaxPhotoSize to 0 prevents any photos from being displayed in Lync.

The default value is 30 kilobytes.

Unfortunately, you can't set this parameter to 0:

PS C:\Users\Administrator.TEST> Set-CsClientPolicy -Identity <policy> -MaxPhotoSizeKB 0
Set-CsClientPolicy : MaxPhotoSizeKB must be greater than or equal to 1.
At line:1 char:1
+ Set-CsClientPolicy -Identity Global -MaxPhotoSizeKB 0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (Global:String) [Set-CsClientPolicy], PropertyArgumentOutOfRangeException
    + FullyQualifiedErrorId : InvalidUpdate,Microsoft.Rtc.Management.Internal.SetClientPolicyCmdlet

You can set the value to 1, which means that photos over 1KB in size shouldn't be displayed in the Lync 2013 client.  You can verify that the policy took effect by checking the in-band provisioning settings in the client .UccApilog file:

- <provisionGroupList  xmlns="http://schemas.microsoft.com/2006/09/sip/provisiongrouplist-notification">
       <provisionGroup  name="publicProviders"/>
    +  <provisionGroup  name="userSetting">
    +  <provisionGroup  name="ServerConfiguration">
    +  <provisionGroup  name="locationPolicy">
    +  <provisionGroup  name="persistentChatConfiguration">
    +  <provisionGroup  name="mediaConfiguration">
    +  <provisionGroup  name="meetingPolicy">
    +  <provisionGroup  name="privacyPublicationGrammar">
    +  <provisionGroup  name="presencePolicyV2">
    +  <provisionGroup  name="ucPolicy">
    +  <provisionGroup  name="publicationGrammar">
    -  <provisionGroup  name="endpointConfiguration">
        -  <propertyEntryList>
               <property  name="ShowRecentContacts">true</property>
               <property  name="ShowManagePrivacyRelationships">false</property>
               <property  name="MaxPhotoSizeKB">1</property>
               <property  name="DisableMusicOnHold">true</property>
               <property  name="PhotoUsage">NoPhoto</property>
               <property  name="AbsUsage">WebSearchOnly</property>
               <property  name="HotdeskingTimeout">300</property>
               <property  name="EnableContactSync">true</property>
               <property  name="ShowSharepointPhotoEditLink">false</property>
               <property  name="EnableVOIPCallDefault">false</property>
               <property  name="MaximumDGsAllowedInContactList">10</property>
               <property  name="P2PAppSharingEncryption">0</property>
               <property  name="EnableHighPerformanceP2PAppSharing">false</property>
               <property  name="EnableHighPerformanceConferencingAppSharing">false</property>
               <property  name="TracingLevel">Light</property>
        - </propertyEntryList>
    - </provisionGroup>
 </provisionGroupList>

Checking the size of the photo, you can see that it is larger than 1 KB:

You can also view the size of the photo using Fiddler:


Note
: You may need to click on the image above in order to read the text.

Unfortunately the Lync 2013 client will still display photos in the contact card and IM window.  Currently there's no way to completely disable photos from showing in the Lync 2013 client.

Comments
  • Could you set a rule in IIS and/or your load balancer to drop requests to "/abs/handler/*.photo" ?

  • @flinchbot

    Possibly, however the goal was to be able to disable pictures completely for some users and not for others. Also keep in mind that the internal client can make an LDAP call to AD to get a contact's picture. Plus any changes to IIS could get wiped out when you run an Enable-CsComputer on the Front End Server.

  • I faced similar request once and indeed there's no way to disable the photos from being displayed in the contact card and IM window, i think this should be added in kind of CU or to the lync future version.

    Thank you for posting :)

  • Thanks Doug, the MaxPhotoSizeKB setting is clever, I hadn't thought about that one.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment