Validate proper userPrincipalName

S

STeve

Hi guys,

I was wondering if you guys had written any sample code (ie. regular
expressions) which would validate the userPrincipalName or
sAMAccountName used in Active Directory. Are there any invalid
characters (@,#,|,<, etc) or any invalid formats (a....) which cannot
be used within an Active Directory userPrincipalName or
sAMAccountName.

For example,
valid userPrincipalName: john.smith
invalid userPrincipalName: john.

valid userPrincipalName: a*@
invalid userPrincipalName: a*

Any help is appreciated.

Thanks in advance,
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top