Trying to use LogonUser() function under a service running as Local System. Has been successful in trying to authenticate users. However, when a user is in the the Protected Users group, the function fails.
HANDLE hToken = NULL;
BOOL bSuccess = LogonUser(username, domain, password, LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &hToken);
if (hToken != NULL) CloseHandle(hToken);
Calling GetLastError()
results in an error code of 1327. If the user is removed from the Protected Users group, then the API call succeeds.
Reading up on some of the documentation for the Protected Users group, it looks like I need to use a different method than LogonUser(). The Protected Users group is a builtin Windows security group that is more restrictive than regular domain users for security reasons. Anybody know a Windows API that would work for authentication of a user in the Protected Users group?