I'm trying to load the user profile (using LoadUserProfile
- http://msdn.microsoft.com/en-us/library/windows/desktop/bb762281%28v=vs.85%29.aspx) but the API fails when the user is a windows domain user.
The application runs with an Administrative user (not System Account, the same code in a service running as System Account works).
The same code works if the user I want to access is a local user.
Is there any limitation for the LoadUserProfile and Windows Domain User? LoadUserProfile returns Access denied. Are there any policies which limit the API?
My code does the following:
- LogonUser
- LoadUserProfile - This fails with access denied.
- ImpersonateLoggedOnUser
I'm not sure if the issue is 100% related with my code, because if I run
runas /user:domain\user cmd.exe I got the same failure: "Access denied"
So it seems that there are policies which control the behavior of Domain users.