If you are wondering why your Lync is not keeping IM conversation history, you can take a look at Lync Options > Personal.
In my case, these two checkboxes were grayed out. I haven’t thoroughly investigate if this restriction is imposed by Lync Administrator in my organization.
Thankfully these two settings can be overriden by modifying your Windows registry. Tested and working.
Open your registry editor (regedit.exe) and navigate to these two keys.
HKEY_CURRENT_USER / SOFTWARE / MICROSOFT / COMMUNICATOR / CallLogAutoArchivingPolicy HKEY_CURRENT_USER / SOFTWARE / MICROSOFT / COMMUNICATOR / ImAutoArchivingPolicy
Double click those keys and change the hex value from 0 to 1. Restart your Lync and Microsoft Outlook.
Update: As expected, GPO reverted back the setting and disabled IM Archiving on my Lync 2013. I raised a ticket to Service Desk and asked them to enable this function and was told by the agent that it is organization policy to disable chat logging. Boo.