In case you want to import back contacts and groups extracted by script from this post, download and use script below. It is quite simple script using Lync 2013 SDK, which was tested with both Lync 2013 & Skype for Business 16 Clients.
In case you migrating your user’s from one Office 365 tenant to another one (T2T Migration) you may find handy ability to quickly extract so called ‘buddy list’ from of the users. It is essentially just list of SIP addresses of user’s contacts and very often it does not have any value if there are just internal contacts. However, in case users have many external peers, loss of the buddy list may be quite painful.
The script below will allow users easily export their ‘buddy lists’.