Deploying the NPS agent

The NPS agent extends the Network Policy Server (NPS) service to enforce UserLock access policies and MFA during RADIUS authentication (VPN, Wi-Fi, etc.).

Published May 31, 2024

Overview

The UserLock NPS agent is a DLL registered in the Network Policy Server (NPS) service.
It is triggered when a user authenticates through RADIUS and during session start or end events (RADIUS accounting).

This integration allows UserLock to apply access policies and multi-factor authentication (MFA) for users connecting via VPN or Wi-Fi.

Note
  • NPS supports multiple administrative DLLs. The UserLock agent can coexist with others without conflict.

  • The registry supports multiple DLL locations (REG_MULTI_SZ value type).

  • NPS loads DLLs in the order they appear in the registry.

  • See Microsoft documentation on NPS

Step 1. Install the agent

You can install the NPS agent automatically from the UserLock console or manually on your NPS server.

Option A – Install from the console

💡️ The simplest way is to deploy the NPS agent directly from the UserLock console.

See: Install from the console

Option B – Install manually

If you cannot deploy the NPS agent from the console, you can install it manually on your NPS server.

  1. Copy and registrer the module

    1. Copy the corresponding DLL file from the UserLock installation folder %windir%\System32\ on the server (for example, C:\Program Files\UserLock IIS Agent).

    2. Open an elevated Command Prompt (Run as Administrator).

    3. Run the registration command matching your IIS server architecture:

      Server architecture

      File to copy

      Command to register

      32-bit

      ULIasAgent.dll

      regsvr32 C:\Windows\System32\ULIasAgent.dll

      64-bit

      ULIasAgent_x64.dll
      (rename to ULIasAgent.dll)

      regsvr32 C:\Windows\System32\ULIasAgent.dll

  2. Register communication settings

    Create the following registry key to allow the IIS agent to communicate with the UserLock servers:

    • Registry path:
      HKEY_LOCAL_MACHINE\SOFTWARE\ISDecisions\UserLock\IAS

    • Keys:

      Value name

      Type

      Description

      UserLockServer

      REG_SZ

      Name of the Primary UserLock server

      UserLockServerBackup

      REG_SZ

      Name of the Backup UserLock server

Step 2. Restart services

After the NPS Agent is installed/uninstalled (through the console, or manually), its status in the Environment ▸ Machines page will be Installing/Uninstalling.

To make it effective:

  1. Stop the Routing and Remote Access (RemoteAccess) service.

    Note: will close all VPN connections.

  2. Stop the Network Policy Server (IAS) service.

  3. Start the Routing and Remote Access (RemoteAccess) service.

  4. Start the Network Policy Server (IAS) service.

Here are PowerShell commands to do that:

powershell
# Stop the "Routing and Remote Access" (RemoteAccess) service:
Stop-Service RemoteAccess

# Note: will close all VPN connections.
# Stop the "Network Policy Server" (IAS) service:
Stop-Service IAS

# Start the "Routing and Remote Access" (RemoteAccess) service:
Start-Service RemoteAccess

# Start the "Network Policy Server" (IAS) service:
Start-Service IAS

Uninstall the agent

Option A – Uninstall from the console

  1. Uninstall the agent directly from the UserLock console.

  2. The agent status will appear as Uninstalling . Restart the services as described in the Step 2 section to complete the process.

Option B – Uninstall manually

  1. Unregister the DLL:
    regsvr32 /u C:\Windows\System32\ULIasAgent.dll

  2. The agent will be disabled but still loaded in memory.

  3. Restart the services as described in the Step 2 section to complete the process.

Known limitations and additional settings

Duplicate Wi-Fi sessions

Some Wi-Fi Access Points (WAP) do not fully comply with RADIUS standards and may not send disconnection notifications.

As a result, the same session (same user account, same device, possibly the same Wi-Fi Access Point) may appear multiple times in UserLock.

To prevent these duplicates, the NPS agent provides two optional DWORD (32-bit) registry settings in: HKEY_LOCAL_MACHINE\SOFTWARE\ISDecisions\UserLock\IA

Setting

Description

AutoResetPrevious
SessionSameData

When enabled (1), closes a previous session if the same user, device, and Wi-Fi Access Point (WAP) reconnect.
Default: 1 - (ON)

AutoResetPrevious
SessionSameDataAndWap

When enabled (1), also closes previous sessions even if the user connects through a different Wi-Fi Access Point.
Default: 0 - (OFF)

Behavior combinations

The behavior depends on how both keys are configured.
Mixing the values of these two options lets you control how UserLock handles reconnecting users on the same or different Wi-Fi Access Points.

AutoReset
PreviousSession
SameData

AutoReset
PreviousSession
SameData
AndWap

Same user, device, and WAP

Same user and device, different WAP

1

1

✅ Automatically closed

⚠️ Remains active

1

0

✅ Automatically closed

✅ Automatically closed

0

0

⚠️ Remains active

⚠️ Remains active

Note
  • ✅ Automatically closed means UserLock automatically ends any existing session matching the new RADIUS connection, preventing duplicates.

  • ⚠️ Remains active means the previous session stays open, which can result in duplicate sessions.