Question: can samaccountname and upn be different?
Answer: The UserPrincipalName (UPN) in Active Directory is separate from the samAccountName and while they may contain similar values, they are completely separate attributes. ... These two fields combine together to create the userPrincipalName attribute in Active Directory, they are not stored separately.