in AD user object, what exactly is the use and importance of Name attribute?

In AD, there are 4 names (Name, SAMAccountName, UPN and DN).

(I do know that it is recommended that SAMaccountName+@company.com should be made equal to UPN) BUT I found out that if Name and SAMAccountName are different, it will cause problems when automating using Powershell too.

What exactly is the usage of Name? There don’t seem to be any mention of the Name attribute on the Internet.

What exactly this gradle code will do?

if (project.hasProperty("SIGN_PROPS")         && new File(project.property("SIGN_PROPS").toString()).exists()) {     Properties props = new Properties()     props.load(new FileInputStream(file(project.property("SIGN_PROPS"))))     signingConfigs {         signConfig {             storeFile file(props['keystore'])             storePassword props['keystore.password']             keyAlias props['keystore.alias']             keyPassword props['keystore.alias.password']         }     } }