SQL Server Service Accounts Max Character Length
Within SQL Server, the datatype for the name column in sys.database_principles is sysname, which is essentially nvarchar(128). However, the sAMAccountName attribute in Active Directory specifies the login name must be 20 or fewer characters. 

A similar question was posted within the forums on SQLServerCentral:


  https://www.sqlservercentral.com/forums/topic/max-length-of-ad-names-for-security