Solutions
Device management
Remotely manage, and protect laptops and mobile devices.
Orchestration
Automate tasks across devices, from app installs to scripts.
Software management
Inventory, patch, and manage installed software.
Infrastructure as code
See every change, undo any error, repeat every success.
Extend Fleet
Integrate your favorite tools with Fleet.
More
Device management
Remotely manage, and protect laptops and mobile devices.
Orchestration
Automate tasks across devices, from app installs to scripts.
Software management
Inventory, patch, and manage installed software.
Infrastructure as code
See every change, undo any error, repeat every success.
Extend Fleet
Integrate your favorite tools with Fleet.
Mitch Francese
Mitch Francese
Okta Desktop MFA (Okta Device Access) brings multi-factor authentication to the Windows login screen, lock screen, and privilege elevation prompts. Instead of only protecting web applications, Desktop MFA extends MFA protection to local Windows authentication events.
This guide shows how to deploy Okta Desktop MFA to Windows devices using Fleet.
Desktop MFA closes a security gap by requiring MFA at the Windows login screen. Without it, an attacker with stolen credentials can log in to a Windows device without triggering MFA, even if all your web apps require it.
With Desktop MFA enabled, users authenticate with their Okta credentials and complete MFA at every Windows login, unlock, and privilege elevation event. This ensures consistent authentication security across all access points.
Before deploying Desktop MFA, ensure you meet these requirements:
| Requirement | Details |
|---|---|
| Windows edition | Windows 10/11 Pro, Enterprise, or Education (Home edition not supported) |
| Domain join | Device must be Azure AD-joined or on-premises AD-joined |
| Windows version | Windows 10 version 1709 (Build 16299) or later |
| Administrator access | Installation and policy deployment require local admin privileges |
| Requirement | Details |
|---|---|
| Okta edition | Okta Identity Engine with Okta Device Access |
| Desktop MFA application | Created in Okta Admin Console |
| OAuth credentials | Client ID and Client Secret from Desktop MFA app |
| Okta Verify version | Latest version with Desktop MFA support |
Contact your Okta account representative if you need to purchase Okta Device Access for your organization.
| Requirement | Details |
|---|---|
| Fleet secrets | Three secret variables configured for OAuth credentials |
| Application added | Okta Verify installer uploaded as Fleet software |
| PowerShell scripts | Install and policy scripts deployed via Fleet |
| Policy monitoring | osquery policy for compliance verification |
Desktop MFA requires three Fleet secret variables to securely store OAuth credentials. These secrets keep credentials out of scripts and centralize secret management.
Configure these secrets in your Fleet server:
| Variable name | Example value | Description |
|---|---|---|
OKTA_DESKTOP_MFA_TENANT_URL |
https://your-org.okta.com |
Your Okta organization URL |
OKTA_DESKTOP_MFA_CLIENT_ID |
0oa1a2b3c4d5e6f7g8h9 |
OAuth client ID from Desktop MFA app |
OKTA_DESKTOP_MFA_CLIENT_SECRET |
(84-character string) | OAuth client secret from Desktop MFA app |
Configure the Desktop MFA application in your Okta Admin Console:
Download the Okta Verify installer from the Admin Console at Settings → Downloads. Don't download from the Microsoft Store, as that version lacks MDM integration features.
Install Okta Verify on your Windows hosts using Fleet's software deployment:
The install script reads OAuth credentials from Fleet secrets and installs Okta Verify with Desktop MFA enabled:
# Okta Verify Installation Script
# Installs Okta Verify with Desktop MFA capability enabled
$exeFilePath = "${env:INSTALLER_PATH}"
# Read Fleet secret variables
$oktaOrgUrl = $env:FLEET_SECRET_OKTA_DESKTOP_MFA_TENANT_URL
$oktaClientId = $env:FLEET_SECRET_OKTA_DESKTOP_MFA_CLIENT_ID
$oktaClientSecret = $env:FLEET_SECRET_OKTA_DESKTOP_MFA_CLIENT_SECRET
$exitCode = 0
try {
# Validate required Fleet secrets are set
$missingSecrets = @()
if ([string]::IsNullOrWhiteSpace($oktaOrgUrl)) {
$missingSecrets += "FLEET_SECRET_OKTA_DESKTOP_MFA_TENANT_URL"
}
if ([string]::IsNullOrWhiteSpace($oktaClientId)) {
$missingSecrets += "FLEET_SECRET_OKTA_DESKTOP_MFA_CLIENT_ID"
}
if ([string]::IsNullOrWhiteSpace($oktaClientSecret)) {
$missingSecrets += "FLEET_SECRET_OKTA_DESKTOP_MFA_CLIENT_SECRET"
}
if ($missingSecrets.Count -gt 0) {
Write-Host "ERROR: Required Fleet secrets are not configured:" -ForegroundColor Red
foreach ($secret in $missingSecrets) {
Write-Host " - $secret" -ForegroundColor Red
}
throw "Missing required Fleet secrets: $($missingSecrets -join ', ')"
}
Write-Host "Installing Okta Verify with organization configuration..."
# Build argument list for silent installation
# SKU=ALL enables Desktop MFA capability
$argumentList = @(
"/q",
"SKU=ALL",
"ORGURL=$oktaOrgUrl",
"CLIENTID=$oktaClientId",
"CLIENTSECRET=$oktaClientSecret"
)
# Start installation process
$processOptions = @{
FilePath = "$exeFilePath"
ArgumentList = $argumentList
PassThru = $true
Wait = $true
NoNewWindow = $true
}
$process = Start-Process @processOptions
$exitCode = $process.ExitCode
Write-Host "Install exit code: $exitCode"
if ($exitCode -eq 0) {
Write-Host "Okta Verify installed successfully"
}
} catch {
Write-Host "Error during installation: $_"
$exitCode = 1
} finally {
Exit $exitCode
}The uninstall script removes Okta Verify from Windows devices:
# Okta Verify Uninstallation Script
$exitCode = 0
try {
Write-Host "Uninstalling Okta Verify..."
# Find Okta Verify in installed programs
$uninstallKey = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*"
$uninstallKey64 = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
$oktaVerify = Get-ItemProperty $uninstallKey, $uninstallKey64 -ErrorAction SilentlyContinue |
Where-Object { $_.DisplayName -like "*Okta Verify*" } |
Select-Object -First 1
if ($null -eq $oktaVerify) {
Write-Host "Okta Verify not found in installed programs"
Exit 0
}
$uninstallString = $oktaVerify.UninstallString
if ([string]::IsNullOrEmpty($uninstallString)) {
throw "Uninstall string not found for Okta Verify"
}
# Parse uninstall string
if ($uninstallString -match '^"([^"]+)"(.*)$') {
$uninstallerPath = $matches[1]
$uninstallerArgs = $matches[2].Trim()
} else {
$uninstallerPath = $uninstallString.Split(' ')[0]
$uninstallerArgs = ""
}
# Add silent uninstall argument
if ($uninstallerArgs -notmatch "/silent|/quiet|/S|/s") {
$uninstallerArgs = "/S $uninstallerArgs".Trim()
}
# Run uninstaller
$processOptions = @{
FilePath = $uninstallerPath
PassThru = $true
Wait = $true
NoNewWindow = $true
}
if (-not [string]::IsNullOrEmpty($uninstallerArgs)) {
$processOptions.ArgumentList = $uninstallerArgs
}
$process = Start-Process @processOptions
$exitCode = $process.ExitCode
Write-Host "Uninstall exit code: $exitCode"
} catch {
Write-Host "Error during uninstallation: $_"
$exitCode = 1
} finally {
Exit $exitCode
}After Okta Verify is installed, deploy registry policies to enforce MFA at Windows login. These policies control when and how Desktop MFA is required.
Deploy this script via Fleet to configure registry policies:
# Desktop MFA Policy Configuration Script
# Configures Windows registry policies for MFA enforcement
$RegistryPath1 = "HKLM:\Software\Policies\Okta\"
$RegistryPath2 = "HKLM:\Software\Policies\Okta\Okta Device Access"
# Create registry paths if they don't exist
If (-NOT (Test-Path $RegistryPath1)) {
New-Item -Path $RegistryPath1 -Force | Out-Null
}
If (-NOT (Test-Path $RegistryPath2)) {
New-Item -Path $RegistryPath2 -Force | Out-Null
}
# Configure Desktop MFA policies
New-ItemProperty -Path $RegistryPath2 -Name 'MFARequiredList' -PropertyType MultiString -Value ('*') -Force
New-ItemProperty -Path $RegistryPath2 -Name "MaxLoginsWithoutEnrolledFactors" -PropertyType DWord -Value 0 -Force
New-ItemProperty -Path $RegistryPath2 -Name "MFAGracePeriodInMinutes" -PropertyType DWord -Value 0 -Force
Write-Output "Desktop MFA policies configured successfully"This configuration:
* requires all users to authenticate with MFA0 forces immediate MFA enrollment0 requires MFA at every login with no grace periodPolicy changes take effect within 10 minutes after the script runs.
Fleet can automatically enforce Desktop MFA configuration using policies and automations. The policy checks for both Okta Verify installation and registry configuration. When a host fails the policy, Fleet automation triggers the policy configuration script to remediate.
Create a Fleet policy to monitor Desktop MFA deployment across your Windows hosts:
SELECT 1 FROM programs
WHERE
name LIKE '%Okta Verify%'
AND EXISTS (
SELECT 1
FROM registry
WHERE path = 'HKEY_LOCAL_MACHINE\Software\Policies\Okta\Okta Device Access\MFARequiredList'
);This policy checks two conditions:
programs table)MFARequiredList key exists)The policy returns passing only when both conditions are true.
Now configure Fleet automation to run the policy configuration script when hosts fail the policy:
With this automation configured, Fleet will:
This creates a self-healing enforcement loop. If registry policies are removed or a host is reimaged with Okta Verify but missing policies, Fleet will automatically reconfigure them.
When Desktop MFA is deployed to a Windows host, users see these prompts at their next login or lock screen event:
After enrollment, Desktop MFA is active at every Windows authentication event. Users can no longer bypass MFA by directly accessing their device.
Check these items:
dsregcmd /status and verify domain join status)SKU=ALL parameterHKLM:\Software\Policies\Okta\Okta Device AccessCheck these items:
OKTA_DESKTOP_MFA_TENANT_URL, OKTA_DESKTOP_MFA_CLIENT_ID, OKTA_DESKTOP_MFA_CLIENT_SECRETVerify the registry key exists:
HKEY_LOCAL_MACHINE\Software\Policies\Okta\Okta Device AccessMFARequiredList key exists with value *If the key is missing, re-run the policy configuration script.
For more information about Okta Desktop MFA configuration and troubleshooting, see the official Okta Desktop MFA documentation.
To learn more about Fleet's software deployment and script execution capabilities, see the Fleet documentation.