How to configure Active Directory to allow scheduler tasks to retrieve AD data when set to 'run whether logged on or not

ben liao 0 Reputation points
2023-07-27T06:53:35.2733333+00:00

As the title suggests, I have a C# executable that needs to connect to Active Directory to retrieve data. When I run the program using the command line, I can successfully obtain data from Active Directory. However, when I set up a scheduled task, the connection fails.

1690440577970

1690440690383

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-07-27T12:39:13.2233333+00:00

    May need to add the user Log on as a batch job rights.

    https://learn.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/log-on-as-a-batch-job

    --please don't forget to upvote and Accept as answer if the reply is helpful--


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.