title: Is there a Maximum Length for userPrincipalName in Active Directory?
body: <p>I am writing an application that is linked to Active Directory, and I need to store the userPrincipalName in a database table, but I do not know how big the field would need to be.</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/ms680857(VS.85).aspx" rel="noreferrer">On MSDN</a>, no Length is given, and neither in <a href="http://www.faqs.org/rfcs/rfc822.html" rel="noreferrer">RFC 822</a>. Now, before I revert to the DOMAIN\Username that has a defined Length (<a href="http://msdn.microsoft.com/en-us/library/ms679635(VS.85).aspx" rel="noreferrer">sAMAccountName</a> is less than 20 chars, NETBIOS Domain Name is max. 15 chars), I wonder if anyone knows what the limit is either by standard, or by the implementation within both Windows 2003 and Windows 2008 domains.</p>