Based from experience ,below are details on how to fix your Lync for mac 2011 client or the new Skype for mac client when you have your SkypeFB profile in the 365 cloud then for whatever reason want to bring it back on-premises.
Recently, i’ve been in the Microsoft TAP program for SkypeOnline and more interestingly CloudPBX. Today however i wanted to complete some testing back on the server estate on premises, which to reverse this hybrid profile approach i had is a couple of clicks within the 365 tenant to bring my profile back onprem.
Unfortunately though the Lync/Skype for Mac client does not like this change and without manual intervention will never ever log you back into the client.
So the scenario above then the fix below.
Lync 2011 or Skype for Mac 2016 for MAC
Log out and quit Lync/Skype for Mac.
Go to Finder > press Command+Shift+G > type in /users/<MacUsername>/library >
delete the following files:
Caches > com.microsoft.Lync
Internet Plug-Ins > MeetingJoinPlugin.plugin
Keychains > all files beginning with OC__KeyContainer
Logs > Microsoft-Lync-x.log and Microsoft-Lync.log
Preferences > com.microsoft.Lync.plist
Preferences > ByHost > MicrosoftLyncRegistrationDB.xxxx.plist
Go to Finder > press Command+Shift+G > type in /users/<MacUsername>/documents > navigate to Microsoft User Data > delete the following folders: Microsoft Lync Data and Microsoft Lync History.
Open Keychain Access from /Applications/Utilities folder.
Delete all keychains startting with OC__KeyContainer.
In your Login keychain, delete all e-mail address certificates.
Finally, empty the Trash.
Thats it you should be now again fixed and able to log back into the client.