How to check a particular user has log on as service right programmatically
For an application I what to check whether a particular user has log on as a service right? How to do this programmatically? I checked in the Internet and could not find out some good resource Thanks Upul Do you have a token for that account? If so you can call GetTokenInformation with TokenInformationClass == TokenPrivileges . That will return the list of privileges associated with the token and whether or not they have been activated. If the account isn't logged in and thus you can't get their token, it becomes much harder. You can't query for the privileges allowed for the account let alone