I'm not sure if this helps or not...but basically you find you have a 'valid user' by the pressence of the userID. ie. if they never logged into the network, they'd never have a credential. This is a snippet from my security manager
private static readonly string domainName = System.Environment.UserDomainName;
private static readonly string userName = System.Environment.UserName;
private static readonly string fullUserName = domainName + @"\\" + userName;
private static readonly WindowsPrincipal currentPrincipal =
new WindowsPrincipal(WindowsIdentity.GetCurrent());
/// /// Determines if user belongs to a given Windows user group name.
///
/// Name of the user group to be checked.
/// True if user belongs to the group. Otherwise false.
public bool CheckUserGroup(string groupName)
{
return currentPrincipal.IsInRole(domainName + @"\\" + groupName);
}
This signature left intentionally blank