Adding external contacts to the #Lync addressbook

There are some scenarios where it would be nice to be able to add external contacts to the Lync addresse so that they are searchable for everyone in the organization. Or at least external in the sence that the contact has a sip domain that isn’t supported in the Lync topology.

One such scenario could be an integration with an internal Cisco Telepresence solution.

The way to solve this is to add a contact object to AD that has the msRTCSIP-PrimaryUserAddress attribute populated, and the contact should be added to the address book on the next synchronization pass. I’ve made a script to create this kind of object:

Note that displayName is not required, but if you don’t add it the contact will only display the sipadress in the Lync client. I guess it’s also possible to append other AD attributes to the user such as telephoneNumber.

I got a question about telephoneNumber as well, so I’ve added it as an optional parameter in the script.
Download latest version here – Contains both versions and an example .csv

Hi Tom, We have made contacts like this, for all of our video endpoints, and it Works great. To make it easier for our users, I wanted to ad a picture of a videoconferencing system to the contact’s thumbnailphoto attribute, just like we do with all of our lync/Outlook users. However, I’m unable to make the picture show, when seaching from Lync.

Hi Tom,
Gr8 article, but how about the conferencing scenario, if the phone number is listed in GAL , and the name is displayed for peer to peer PSTN call, but if the same guy joins the dial-in conference the name is not displayed but it shows Guest. is this expected behavior?

This works great for Lync clients, but the contact or an existing Exchange resource that includes the msRTCSIP-PrimaryUser attribute doesn’t show up in the address book on a Lync Room System. Is there another attribute we need to set for it to show up there? We have Lync Room System resource accounts that are Lync enabled show up in those contact lists.

Ok thanks. Hoping some others on the thread may have some experience. So far, I’ve not had any success. I can see active Lync accounts associated with resource mailboxes (AD account enabled) in there, but not the contacts. Trying to figure out which bit makes it show up.

I hope you don’t mind, but I have extended your script in order to add a few different fields and provide some error feedback when importing a large number of contacts via a CSV. I have added different fields into our contacts that are of use to us, however, I don’t think Lync/SfB uses them as a method of search – I’m not sure if you can add additional fields for address book searches.

We are integrating multiple Lync/SfB system via PEXIP so that user can dial their VC system across multiple research and education establishments. Still, this is what I have:

$contacts = Import-Csv -path $csv # the header parameter is only required if there is NO header oin the CSV -header “OrganisationName”,”SystemName”,”Domain”,”School”,”VideoSystemAddress”,”PersonalOrShared”,”Notes”

try {
foreach ($contact in $contacts) {
# Concatinates the ‘SystemName’ and ‘Domain’ form the CSV to form a Comman Name for a contact (CN)
$cn = $contact.SystemName + “@” + $contact.Domain

#Note – for each field that may be black, its we need an IF statement otherwise the import will fail.
#Add notes – usefull for IP address or somesuch
if ($contact.notes -ne “”) {$SIPContact.Put(“notes”, $contact.notes)}

$contacts = Import-Csv -path $csv # the header parameter is only required if there is NO header oin the CSV -header “OrganisationName”,”SystemName”,”Domain”,”School”,”VideoSystemAddress”,”PersonalOrShared”,”Notes”

try {
foreach ($contact in $contacts) {
# Concatinates the ‘SystemName’ and ‘Domain’ form the CSV to form a Comman Name for a contact (CN)
$cn = $contact.SystemName + “@” + $contact.Domain

Has anyone tried this with O365? We are importing into AD, and DIrSync see the change, but make no updates to the Tenants? Are there addition filed that need to be added as a minimum for on-line contacts (O365 is not my bag)?

I think this is something you will have to do manually. There is an example CSV in Toms zip, but depending on what information you want to import, will depend on the headings you have in the CSV.
I would assume that this info does NOT exist in active directory already, that’s the point of the script. I personally used multiple data sources, including TMS, and our custom booking system, then manually modified the file to ensure that the data was in the correct format. For this is used Excel.

FWIW, I this is supported in O365 or Hybrid models, which is a shame. You can, of course, create new “fake” AD users, but this might not be considered ideal. If anyone know any different, please let me know.