Connecting (Ubuntu) Pidgin to (Microsoft) Lync

All I wanted to do was upload a profile picture to my lync account as requested by my manager and our CEO.

Lync,  for those of you who haven't waded in this particular septic tank, is Microsoft's groupware chat client.  Which is not available in it's native-client form for Linux.  Which means that most LAMP developers have probably never been burdened with it because we use clients like Hangouts or Pidgin for our networking communication needs.  Because they work.

And in the best of Microsoft's tom-fuckery historical practices of not playing well with others, Lync is based on a proprietary protocol because, you know, cross-platform seamless communication is sooo 1994.

I've been a happy employee of this company now for 20 months.  Unfortunately the company uses Microsoft Office as it's groupware backbone.  When they created and hired the development team, oh, about 20 months ago, we brought with us IT-based challenges because we prefer desktop operating systems that don't make you fight tooth-and-nail to get any task done.  We use OS X and Ubuntu and CentOS as our native desktop operating systems.

I've not ever used their Lync office chat because, when I started, I wasn't able to figure-out how to access the server using my Linux chat client even with the company's MS guru as my wingman.  So, I've never used Lync, logged-in to lync and, as a result, we of the development team use Google Hangouts as our primary communications client.  As a matter of fact, the last time I logged into the Office-365 web portal was well over a year ago and that was only to forward (and delete) all my company email over to my personal Gmail account.

The recent "requests" of the CEO and my manager to upload my Lync profile pic could no longer be avoided so I needed to sit-down and figure this stuff out before they do something completely counter-productive to me, like make me install and use a Windows-8 box.

My first attempt at accessing lync was going to be through the Office-365 web-app.

Microsoft's own Office-365 web portal does not have a direct-link to the lync chat app (Yay!  Groupware!)  so there's not a known-way to access lync configuration via the office-365 portal that I could intuit.

However, if you click on your profile picture in Office-365, you can upload a pic for your account.  Which I did.  And it's amazing!  (The picture - not Office-365.)  But I am so not worried!  Because, at this point I am going to assume that Office-365 would propagate my profile pic over to lync because integrated groupware ... right?

The next step was to see if I could use Office-365 to access Lync chat and, hopefully, confirm the propagation of, or add/change my profile pic.  Since there's no direct link to Lync, getting there is a bit obfuscated...

You can use the Office-365 search tool to search for a user, then click the user's picture to proc a pop-up that displays information about the user:  

Sorry, Andy...

Sorry, Andy...

Next, you can then click on a link-icon that will pop-up a vanilla browser window, Office-365's version of a chat-client for Lync, said window that has no lync-controls or lync-configuration options (like upload a picture or manage your settings), that will start a chat session with the user:

The Amazing Office-365 IM Window for Lync!

The Amazing Office-365 IM Window for Lync!

Couple notes about usability and the generic lync chat window:

1.  There's no chat history - once you close the session it's apparently gone -- re-opening the window starts a new, blank session.  Chats aren't saved or at least when I searched for my chat session in office-365, it was 404. 

As a side note, I've found chat history to be incredibly useful since the majority of my chats are technical and, you know, I may actually want to reference information exchanged at some later point.

2.  You can re-size the window and inadvertently hide the chat-type window.  The window won't scale nor will it proc a scroll-bar to allow you to scroll down to the text-entry control.

The sample chat session I started, according to Andy, will appear in the user's lync chat and, apparently, a generic window that also opens for them if they're also logged into Office-365.

However, the profile pic you upload to MS Office-365 will not be displayed in the other user's lync window/interface - so your effort for updating your Office-365 profile pic will be for naught. I can only conclude that the the only way to upload your Lync profile picture is via the native desktop client.

[edit]

The next day after I went through all this, Andy informed me that my pic has (finally) shown-up in his native Lync client.  So, updating your profile pic via Office-365 will, eventually, propagate over to your Lync settings.

If you're logged into Office-365 and someone chats you, then you'll see an alert thingy in the the browser window - which lets you know someone is chatting you if you've got that tab open/on-top.  The bad news is that there's no system alert/notification on the desktop.  So alerts will get lost if you rely on the web-browser.

Using a couple other websites, and the amazing Andy for Lync configuration parameters, I finally stumbled upon the right configuration combination to get your pidgin client working with the lync server.

First, you need to install the packages for pidgin-sipe:

sudo apt-get install autotools-dev pkg-config libglib2.0-dev libgtk2.0-dev libpurple-dev libtool intltool comerr-dev

install pidgin (if you've not already) and pidgin-sipe:

sudo apt-get install pidgin pidgin-sipe

Restart the pidgin client and click on the menu command: Accounts -> Manage Accounts to proc the account dialog box.  Click on the add button to add a new account.

You're going to want to configure two panels/tabs in the new account dialog box:

 

Under the Basic tab:

Protocol:  Office Communicator
Username:  Your targetcw email address  (e.g.: mshallop@targetcw.com)
Login:  leave blank!
Password:  your password
Check the "Remember Password" box
I have "mshallop" in the "Local Alias" text box.

 

Under the Advanced Tab:

Server[:Port]:  Leave blank.  I know.  Just leave it blank.
Connection Type:  Auto
User Agent:  CCAPI/4.0.7577.0 OC/4.0.7577.0 (Microsoft Lync 2010)
Authentication Scheme:  TLS-DKS

 

Leave everything else on this tab blank or unchecked.

You should be able to connect to the lync server at this point.  Congratulations!  New chat alerts will proc on your Ubuntu desktop and, using Andy as an example, I see different chat data about him depending on if he's chatting to me via his gmail or lync account.

This, at least, will get us linux users online with the company's lync users for the first time ever, so freakin-yay!!!

 

Footnote:

When I sign-out (clicked the log-out option) of the Office-365 web portal, I received this error - and I receive it every time I sign out and have since I've been an employee:

Sorry, but we're having trouble signing you out

Try closing and reopening your browser. If that does not work, try clearing the cookies from your browser and signing in again. If this message was displayed after attempting to sign out of an app, close and restart the app.

You have signed out of these sites:

We couldn't sign you out of these sites:

BOX-PROD-EDGE (501392)
SharePoint Online (500046)
Outlook Live (260563)

Of course when I hit the back-button, I am presented with the login page so, apparently, I was logged-out.  

As a web-dev, I  don't understand why, after more than a year, I still see this message or what the point of displaying this message even means to the average Microsoft-using user.