I modified IsUserPrincipalNameFormat to just check for the presence of the @ symbol in the username. The regex was too complex and was failing when the username started with a symbol.
Added logic to handle LocalSystem account.
Added logging to help diagnose failures to connect to a domain.
I modified IsUserPrincipalNameFormat to just check for the presence of the @ symbol in the username. The regex was too complex and was failing when the username started with a symbol.
Added logic to handle LocalSystem account.
Added logging to help diagnose failures to connect to a domain.