# What are the different types of Windows Authentication in Leapwork Remote Agent?

Leapwork offers 3 options to connect to a windows machine/VM which hosts the Leapwork Agent service.

It is the mechanism that allows you to log-in to the windows machine in a secured and hassle-free way. As part of this, Leapwork provides users with 3 different ways to cater to windows authentication under **the Remote Agent** category. They are:

- Windows login  
- Windows login - Auto  
- Password

Below description defines them:

1. **Windows login:** It is used to authenticate connections to the agent with a Windows username and password. Users can get the username of the machine hosting the Leapwork Agent service by navigating to the command prompt and type " _whoami_" and use the same username and provide respective password of the user in the password field. If using this option, we need to add Login building block in our flows, in order to simulate the logging-in process on the VM/machine hosting Leapwork Agent service.

2. **Windows login-Auto:** It is used to automatically login to the windows machine hosting the Leapwork Agent service with the defined username and password on respective agent connection, configured in the settings section of Leapwork. The user doesn't require the Login building block in the flow if this option is chosen as the user will be auto-logged-in to the agent machine with the credential defined in the Agent connection settings.

3. **Password:** It is used to login to Windows using a simple password(i.e. the agent password set during the installation).

The connectivity functionality defined above, works even with machines that have just been started or rebooted, without any prior user sessions, from Windows 7 SP1 and onwards. This makes it very easy to automate tasks on virtual machines and automate testing of complex, data-driven single-sign-on (SSO) scenarios.

**Note**: The functionality is based on a Windows “credentials provider” which does not circumvent any security measures in Windows. It simply lets Leapwork interact directly with the login/logout security feature built-in to Windows.

Note - In case, you **do not want** a windows user to be an administrator user (as that user has too many permissions) while connecting to an agent, then we have to assign specific permissions to that user which is named "Allow log on locally" permissions. Moreover, in windows server products by default, only “Administrators” have "Allow log on locally" permissions. So, we can follow the below steps to add a Leapwork test user in this category to proceed further.

1. Open the **Local Group Policy Editor**:
   - Simultaneously press the **Windows** + **R** keys on your keyboard.  
   - At the **Run** window, type **gpedit.** **msc**& press **Enter**.

2. Inside the **Local Group Policy Editor**, in the left pane navigate to:
   **Local Computer Policy > Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment.**

3. Look at the right pane and right-click on **Allow log on locally** and select Properties.

4. On the newly opened window, click on **Add User or Group** button.

5. Add the required user and then click **“OK”** and then **“Apply”**

6. Close the **Local Group Policy Editor** and restart your computer.
