Subscribe via RSS Feed Connect on LinkedIn

Lync 2013: Setting a user picture for an Application or Response Group Contact Object

04/12/2012 2 Comments

clip_image001

I tested this on a while homed on a 2013 pool and with the 2013 client. It doesn’t seem to work with the 2010 client in my testing. It is in no way supported, I just thought it might work, use at your own risk. It also seems to be fairly intermittent as to whether the pictures will appear or not in the client – if anyone has an ideas on this/tries this I’m interested to hear how you get on.

You will need the Lync and Active Directory PowerShell modules available (or a remote session with them available)

Normally in a Lync install Each “Application Endpoint”, or “bot” as we often call them (but also applies to response groups, audio test service etc.) has a contact object with no photo, for example take our (Modality Systems) TimePrompt application. This is how it would normally look

image

Each Bot or Response Group Creates an AD contact object in the Configuration Partition. We can confirm the AD contact object details with Get-CSApplicationEndPoint. You don’t actually need to do this but it helps you understand how it works.

image

These contact objects are not in the AD Default naming context, they are actually held in the configuration partition (similar to the core Lync apps e.g. http://lyncdup.com/2011/07/lync-troubleshooting-audio-test-service-csaudiotestserviceapplication-will-not-start/ ), You can see this in the Identity string where is says “CN=Configuration”

By default Get/Set-ADObject will not find them. To get to them with Set-ADObject we need to change the Search Base

$sb=”CN=Configuration,DC=domain,dc=com”

(substitute domain for your domain and com for your domain suffix, as per Identity in Get-CSApplicationEndPoint)

Now we can Get that AD Object

Get-ADObject -searchbase $sb -Filter ‘displayname -like “TimePrompt*”‘

You should get one result (if not check your display name is matched correctly/is unique enough)

image

Format it into a list to see it better

Get-ADObject -searchbase $sb -Filter ‘displayname -like “TimePrompt*”‘ | FL

image

Now we can upload a photo into a temporary variable and add it to that contact object (ensure your photo is 96×96 and less than 10k).

$photo = [byte[]](Get-Content C:\temp\robot96x96.jpg -Encoding byte)

Then we can Pipe out Get-ADObject to Set-ADObject and add the photo to the thumbnailPhoto attribute

Get-ADObject -searchbase $sb -Filter ‘displayname -like “Timeprompt*”‘ | Set-ADObject -Add @{thumbnailPhoto=$photo}

image

We can verify the thumnailPhoto attribute is now set in ADSI edit by connecting to the Configuration context

image

image

image

Once the Lync address book is updated (Update-CSAddressBook) and the Lync client has sync’d the new address book, you should see the picture on the application or response group (it can take some time to sync out, the wind must be blowing in the right direction).

clip_image001[6]

It doesn’t appear in 2010 client

clip_image002

But does in 2013

clip_image001[8]

clip_image002[5]

Take a second to share this, thanks, TomTwitter13LinkedIn7Facebook10Google+0
Tom Arbuthnot

Tom Arbuthnot

Managing Consultant at Modality Systems
Tom Arbuthnot is a Microsoft Lync Certified Master and MVP. He is currently Managing Consultant at Modality Systems. Tom is actively involved in the global Unified Communications community. He is a founding member of the Microsoft UC User Group London, a contributing writer to Lync Server 2013 Unleashed and a technical reviewer for Trainsignal. Modality Systems is a UC Centre of Excellence – specializing in strategy, infrastructure, user adoption, managed services and software development.
Tom Arbuthnot
Tom Arbuthnot
Filed in: vendor • Tags: , ,

Comments (2)

Trackback URL | Comments RSS Feed

  1. Dino Caputo says:

    Thanks for posting Tom. I too can confirm the unreliable results using of adding photos to application contacts. In our testing the neither the Lync 2010 or 2013 client showed the photo, however, the Lync 2013 Mobile client did show the photo which is very strange. At one point the photo did appear in the Lync 2013 client for a moment but then reverted to showing the default picture. The 2013 mobile client continues to show the picture..

    The Windows App Store version of Lync do not show the picture.

    I’ve even copied the “working” picture to another application endpoint contact and the photo does not display in any use case.. Very strange behavior.

    If anything changes will advise.
    Dino.

Leave a Reply