The primary email address is defined in proxyaddresses with uppercase SMTP: declared before the email address, and not the mail address attribute. By this i mean UPN and SIP address must match the Primary email address. These 3 attributes must match and typically the user's email address is used as the master identity. If you have implemented automatic sign in then there are four parameters that need to match each other