Windows logon
This page is the short, tested path to MFA at the Windows logon screen of one server: install the OkYouIn agent, let it register, and sign in at the console and over Remote Desktop. Rolling the agent out to many hosts (GPO, SCCM, Intune), the settings, offline behaviour, break-glass codes, exclusions and the kill switch are covered in Windows logon agent.
Verified on
Section titled “Verified on”| Platform | Agent | Modes | What was verified |
|---|---|---|---|
| Windows Server 2022 Standard (10.0.20348), domain member | 0.5.5 | MFA only | Console sign-in, unlock, RDP with and without NLA, RDP reconnect, “must change password” at sign-in; push wait with the number shown on the logon screen; e-mail code with Approve / Deny links; Web Push with the code field next to the wait (link approve and deny, offline code, wrong code, timeout, Cancel) at 100 / 125 / 150 % display scaling; exclusions; offline grace and break-glass codes; kill switch; RDP Restricted Admin and Remote Credential Guard refused; MSI upgrades; moving a host to another application |
The first factor is always MFA only: Windows checks the password itself, and the agent asks OkYouIn for the second factor after it.
What works
Section titled “What works”- Protected sign-ins: console, Remote Desktop, and unlock / reconnect.
- Methods: push (Web Push, Telegram), e-mail code with Approve / Deny links, TOTP. The agent renders every prompt itself on the logon screen.
- Requirements: Windows Server 2016 or later, or Windows 10 or later, x64.
- Not protected by any credential provider: network logons (SMB, WinRM / PowerShell
remoting, WMI, RPC tools,
runas /netonly, services, scheduled tasks), UAC and other credential prompts, RDP auto-reconnect.
Before you start
Section titled “Before you start”- A way back in. Take a VM snapshot, or make sure you can reach the server’s console, before the first install. Recovery is done from there if a sign-in breaks.
- Public URL. The agent reaches OkYouIn at the public URL set in Settings ▸ General;
it must be an
https://address. - The application. In Access ▸ Applications ▸ Add application choose Windows logon. One application is one group of hosts with the same settings.
- Default safety net. A new Windows logon application excludes the built-in local Administrator at the console, and lets users who passed MFA on that host in the last 72 hours in while OkYouIn is unreachable. Keep both for the pilot.
Install
Section titled “Install”-
Open the Connect tab of the application. It shows the agent package (Download MSI, version and SHA-256), the enrollment token and, for a self-signed OkYouIn certificate, the TLS key pin.
-
Download and check the MSI on the server (PowerShell,
curl.exeof Windows Server 2019 / Windows 10 1803 or later). The MSI is served by OkYouIn itself, no login needed:Terminal window curl.exe -fsS -o "$env:TEMP\okyouin-windows-agent-0.5.6-x64.msi" "https://mfa.example.com/api/v1/agent/downloads/okyouin-windows-agent-0.5.6-x64.msi"(Get-FileHash "$env:TEMP\okyouin-windows-agent-0.5.6-x64.msi" -Algorithm SHA256).Hash -eq "<SHA-256 FROM THE CONNECT TAB>" # must print TrueWith a self-signed OkYouIn certificate add
-k --pinnedpubkey sha256//<TLS-PIN>to thecurl.exeline: the pin is then the trust. -
Install silently from an elevated prompt:
Terminal window msiexec /i okyouin-windows-agent-0.5.6-x64.msi /qn /norestart /l*v okyouin-install.log OKYOUIN_URL="https://mfa.example.com" ENROLLMENT_TOKEN="<ENROLLMENT-TOKEN>" TLS_PIN="<TLS-PIN>"Leave out
TLS_PINwhen the server trusts OkYouIn’s certificate (publicly trusted, or a CA the computers trust). Exit code0means done,3010done with a reboot pending (the agent works before the reboot),1603failed and rolled back — the log says why. -
Watch the host register. It appears on the application’s Hosts tab within a minute: Active at once, or Pending when Approve new hosts automatically is off — then click Approve.
-
Generate break-glass codes for the host on the Hosts tab (Generate break-glass codes). The 10 one-time codes are shown once: print them or store them offline. They work only while OkYouIn is unreachable, and never skip the Windows password.
-
Test. Keep your current session open. Sign in once at the console and once over a new Remote Desktop session: after the Windows password the OkYouIn tile asks for the second factor. Then lock and unlock.
Verify
Section titled “Verify”-
Hosts tab (or Access ▸ Windows hosts for every host): status, last seen, agent version, config version, and any Unresolved exclusions — accounts the host could not find.
-
Logging ▸ Windows sign-in log: every answer OkYouIn gave the agent, and the decisions the host took on its own (offline, excluded, break-glass code).
-
On the host: Event Viewer, source
OkYouInAgent(1002 registered, 1003 registration refused, 1009 not protecting yet). For a full report, as administrator:Terminal window & "C:\Program Files\OkYouIn\Agent\okyouin-agent.exe" --diagnose --out C:\Temp\okyouin-diagnostics.txt
Behind an RD Gateway
Section titled “Behind an RD Gateway”If users reach the server through an RD Gateway that is itself protected by OkYouIn, they get two MFA prompts — one at the gateway, one at the host. Protect the gateway (Windows RD Gateway) or the hosts, not both. Behind a gateway, the host sees the gateway as the client address.
Upgrade and uninstall
Section titled “Upgrade and uninstall”- Upgrade: install the newer MSI over the running agent; no properties needed, the registration is kept.
- Uninstall:
msiexec /xremoves the agent with its settings, host credential and cache. Then delete the host on the Hosts tab.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Check |
|---|---|
| The host never appears on the Hosts tab | The URL, token and pin in the install line; Event 1003 on the host. A well-formed but wrong token still installs, and the host retries the registration while protecting nothing. |
Registration refused, HOST_ALREADY_REGISTERED | The machine was registered before (reinstall). Delete the old host on the Hosts tab; the agent registers again within minutes. |
| TLS error events, pin mismatch | A certificate renewed with a new key needs the new pin. A TLS-inspecting proxy between host and OkYouIn also breaks the pin: exclude the OkYouIn URL from inspection. |
| Users cannot sign in at all | Use the excluded local Administrator at the console, a break-glass code (only while OkYouIn is unreachable), or the kill switch — see Windows logon agent. |
| Smart card / Windows Hello missing | Other sign-in options are hidden on protected sign-ins by default (Hide other sign-in options). |