Profiles for Lync

Copyright 2011, 2012 Greig Sheridan

Sydney, Australia.


Intro


Profiles for Lync is written in Visual Studio 2010 C# using the Lync API SDK. It connects to the Lync Client and drives it by remote control.

Some aspects of Profiles' operation are limited by the way the API exposes various bits of functionality. Other limitations are just my programming ability.

With thanks to Rodney Moore, Morgan Reed and the generous contributors to the Lync API forum.

This version of Profiles for Lync is freeware. You may use it without payment in any environment.


Notes, Tips and Tricks


Handling bad passwords and other failures

Lync doesn't report back to the API when there are problems with the sign-in process. Those errors are dealt with by Lync itself, and it freezes communication with Profiles until any issues with the login credentials are resolved. If you've provided faulty credentials, you'll need to complete the login process through Lync before you'll be able to edit and correct them in Profiles.

If Profiles locks up with bad credentials and you're not able to login to the nominated system through Lync, you'll have to force the connection attempt to release by clicking Tools / File / Cancel Sign-in.

Stealth mode

"Stealth mode" permits you to Sign In to an account but still appear as though you're offline. For this to work, the user account must have a cs-ClientPolicy with "EnableAppearOffline : True".


Version 2.0.0.7 - 2nd October 2012

Change Log

40 Sites

It didn't take me too long to outgrow the 10 accounts/sites from v1, so I've added tabs to provide 30 more, each easily accessible from the keyboard as a Shift, Control or Alt appearance.

When you launch Profiles, or the client's login status changes, the view will update to display the tab and account that you're currently signed-in as (assuming of course it's one of the 40).

TIP: If you're not sure what account you're signed-in as, just press F5. The view will update to show you!

Password Encryption

Passwords are now encrypted by default. The passwords are coded to the machine and user, so aren't portable. Whilst they'll be carried across through the new Export/Import processes, the passwords won't be valid on another machine, so you'll need to re-key them. Sorry, but I figured they're passwords and I should be as strict as I can with them.

Export/Import Configuration

On the File menu are 2 new options to Export and Import the sites as a CSV file.

To import site details into Profiles, simply place up to 40 lines in a text file, with the values separated by commas:

SiteAlias,SipUri,Account,Password,True,InternalURL,ExternalURL

SiteAlias,SipUri,Account,Password,False,,

I don't do any data cleansing/validation in the import process, leaving the user to clean up any "mess" from Setup. Profiles will import EVERY line in your file, and anything beyond the first 40 lines will be discarded. This version will accept blank or plain-text passwords in the text file and will encrypt them the first time you visit Setup and click OK.

Auto Reconnect

If the connection to the Lync client is lost, Profiles will now attempt to re-establish it every 5s.

Minimise on Sign-In

v1 was sometimes a bit inconsistent minimising on sign-in if you had that option selected. I've changed the way this code works - so far so good.


Known Issues in this Release

"Shift" page stays when you release the Shift key

I was unable to correctly handle the Shift-NumPad keyboard shortcut to access sites 11-20, and the outcome is this compromise: Profiles stays on the "Shifted" page when you release the Shift key. To return to the first 10 sites, tap either Control or Alt.

SignIn doesn't happen when toggling from Auto to Manual DNS

If you are signed-in as a user with Automatic DNS settings and then click to change to an account with Manual DNS settings, Profiles will not sign you in. It signs you out and updates the credentials to those of the selected account, but fails the sign-in process. The same applies in reverse.

Workaround: Click the same account number again in Profiles, or click "Sign In" on Lync.

"Lync is attempting to connect to..." / "Try another server"

This box will pop if Lync finds Lync DNS records but the domain suffix of the server doesn't match that of the user's login. This is most typically encountered in environments where the server is installed in a ".local" domain, but the users login with their e-mail account.

I've not been able to suppress this box programatically, so if it pops you'll have to respond to it yourself.

Workaround: Click "Connect" or "Try Another Server" as appropriate. If you're only ever logging into the same Lync deployment (i.e., using different accounts for testing) then setting your Front-End server's FQDN as a Trusted Site in IE will suppress this box. Beware though: if you then try to login to another Lync deployment you'll always find yourself talking to the local Front-End, which will of course reject your foreign credentials.




Version 1.0.0.16 (first public Beta) - 27th November 2011


Known Issues in this Release

SignIn doesn't happen when toggling from Auto to Manual DNS

If you are signed-in as a user with Automatic DNS settings and then click to change to an account with Manual DNS settings, Profiles will not sign you in. It signs you out and updates the credentials to those of the selected account, but fails the sign-in process. The same applies in reverse.

Workaround: Click the same account number again in Profiles, or click "Sign In" on Lync.

The Status reported by Profiles isn't correct

There are some scenarious where Profiles fails to display the correct user status. If you exit Lync, Profiles will stick at "Signing Out". The status also doesn't correctly update during the Signing Out / Signing In process.

Workaround: None.

"Lync is attempting to connect to..." / "Try another server"

This box will pop if Lync finds Lync DNS records but the domain suffix of the server doesn't match that of the user's login. This is most typically encountered in environments where the server is installed in a ".local" domain, but the users login with their e-mail account.

I've not been able to suppress this box programatically, so if it pops you'll have to respond to it yourself.

Workaround: Click "Connect" or "Try Another Server" as appropriate. If you're only ever logging into the same Lync deployment (i.e., using different accounts for testing) then setting your Front-End server's FQDN as a Trusted Site in IE will suppress this box. Beware though: if you then try to login to another Lync deployment you'll always find yourself talking to the local Front-End, which will of course reject your foreign credentials.






- Greig.