Summit 7 Team Blogs

Lync for Mac Fails to Login to Lync Online (BPOS or O365) - Updated

The latest update of Lync for Mac brings a number of improvements and parity to the Mac side of things. If you use Lync for Mac with BPOS or O365, you enjoy almost the exact same functionality as your Windows brethren.

The past two mornings I found myself troubleshooting an issue with Lync for Mac. Lync would fail to login with an error about an unknown user or bad password. I knew the password was right because, well, frankly, I never typed it in again and I knew it wasn't Password Reset Day. Usually when you experience oddities like this on the Mac it's because of a screwed up keychain situation.

Keychains are files on the Mac that function like a password and certificate vault. They are built in to OS X and quite substantial to your computing health. When you use BPOS or O365 with the Microsoft Single-Sign On client, it installs several keychain files to your system. When you login to the environment with the Single Sign-On client, it unlocks these files.

Lync uses the keychain file "OC_KeyContainer", which will be linked to your user account. The file is physically stored in ~/Library/Keychains/OC_KeyContainer__<yourOnlineID>". Typically you don't want to mess with this file at all, so don't bother.

Occasionally, something happens that causes this keychain to refuse to work properly. If this happens, you get the aforementioned login error. Correcting this is fairly easy, but if it keeps happening then you might check for other symptoms of your system's health… or, hey, Microsoft could have another bug to patch.

To resolve the issue, quit Lync entirely (cmd-Q). Also, quit the Microsoft Single-Sign On client completely (cmd-Q there too). Launch Keychain Access (/Applications/Utilities/Keychain Access) and find the keychain named the above.

KeychainAccess OC KeyContainer

Right-click on the keychain and choose "Delete Keychain." You'll get an extra box asking if you want to delete the keychain files and references or just the references. Choose to delete just the references… ya know, just in case.

Now, go to Terminal and change directory over to the Keychains directory: "cd ~/Library/Keychains". You'll want to move that file out of the directory because Lync is going to replace it, or so you hope. Type "mv OC_KeyContainer__<yourIDHere> ~/Desktop". This will move the keychain file out to the desktop.

Next, start the Microsoft Online Services Sign-In client and let it sign in. After that completes, rerun Lync for Mac and allow it to sign in to Lync Online. If you're keeping Keychain Access open, you should see it pick up a new copy of the OC_KeyContainer__<blah>" file and set it up in your Keychain Access window.

If this continues to happen to you or if this doesn't resolve the issue for you, please let me know in the comments below. I'm still trying to determine how this happens exactly, but at least I know what to do about it now.

Update: I have since experienced another crash that was brought on by restoring my user home directory from a backup. As it turns out, there are a few files in the ByHost Preferences directory that can damage your ability to launch Lync. If you're experiencing this issue, it's a little different than what I was writing about earlier in this article. In this case, Lync just bombs immediately after you launch it.

To resolve this issue, use Finder to navigate over to "~/Library/Preferences/ByHost" and find the two files with the word "Lync" in the title. Move or delete both of them and then relaunch Lync. You'll have to reconfigure your account credentials.

About Jason Miller