The Lync/SfB Client is getting the sign-in address from the proxyAddresses or msRTCSIP-PrimaryUserAddress (requires Lync/SfB ad schema extensions) attributes.
How to Populate the proxyaddresses attribute
With this approach, we simply populate the proxyAddresses attribute with the corresponding sip/email address with a SIP: prefix. The example below is assuming that your email/sip address is the same as the UPN on your users.
#Import Active Directory Module
#Loop through all users with 365lab.net as UPN domain
#Construct SIP address based on UPN
#Populate the msRTCSIP-PrimaruUserAddress attribute with the constructed SIP Address
Verify that your users have got the proper address with the attribute editor, as below: