STATUS_CTX_LICENSE_EXPIRED (0xC00A0014) – Fix Terminal Server License
This error means your Remote Desktop licensing has run out. You'll get booted off RD sessions until you fix it. We'll walk through three fixes, from checking the grace period to resetting the license server.
What is STATUS_CTX_LICENSE_EXPIRED (0xC00A0014)?
This error pops up when you try to connect to a Windows Server via Remote Desktop and the server can't find a valid license. You might see it right after logging in, or it appears mid-session and kicks you out. It's common on Windows Server 2019 and 2022 when the RD Licensing role is installed but not activated, or the license server isn't configured. The error code is 0xC00A0014, and Windows also calls it STATUS_CTX_LICENSE_EXPIRED. The real cause is simple: the RDS grace period (120 days) ran out, or the license server doesn't have valid CALs.
Don't panic. You've got three options, and you can stop after the first one if it works. Let's go.
Fix 1: Check if the grace period is still active (30 seconds)
Windows Server Remote Desktop Services gives you a 120-day grace period to use RD without a license server. If that hasn't expired yet, you can bypass the error completely.
- Open Command Prompt as Administrator. Right-click Start, select Command Prompt (Admin) or PowerShell (Admin).
- Type this command and press Enter:
qyuest /grace
If you seeqywstnot recognized, move to Step 3 below. Otherwise, look for the grace period status. - Instead, run:
wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting WHERE (TerminalServiceMode="4") GET GracePeriodDaysRemaining, LicenseStatus
You'll see something likeGracePeriodDaysRemaining 87andLicenseStatus 0. If the remaining days are above 0, you don't need a license server yet — the error is just misconfigured. If it's 0 or negative, the period is over and you need Fix 2 or 3. - If the grace period is still active, you can force a restart of the Remote Desktop Services service to clear the error. Run:
net stop TermService && net start TermService
Then try connecting again. If the error persists, reboot the server.
What you should see: After the command, you'll get the remaining days. If it's > 0, the grace period is your friend. If not, move on.
Fix 2: Configure the license server and assign CALs (5 minutes)
If the grace period is gone, you need a license server with valid RDS CALs. This fix assumes you already have a license server installed (usually the same server, but can be a different one).
- Open Server Manager. Click Tools in the top right, then Remote Desktop Services.
- In the RDMS console, click Servers in the left pane. Right-click your RD Session Host server and choose Properties.
- Go to the Licensing tab. Under Licensing mode, pick Per User or Per Device. Match this to your CAL type. If you don't know, pick Per User — it's more flexible for most environments.
- In License server, enter the FQDN of your license server. If it's the same server, use
localhostor127.0.0.1. Click Add. - Click Apply. You should see a green checkmark next to the server.
- Now check the license server itself. Close the properties, go to RD Licensing Manager (under Tools > Terminal Services > RD Licensing Manager). Right-click your server, choose Activate Server, and follow the wizard to activate it online. You'll need a product key if you have volume licensing — otherwise, use the built-in key from your server license.
- After activation, right-click the server again, choose Install Licenses, and install the RDS CALs you purchased. This step is critical — without installed CALs, the error won't go away.
What you should see: After applying, the RD Licensing Manager shows Installed Licenses: X and the status is green. Test a remote connection — the error should be gone. If not, move to Fix 3.
Fix 3: Reset the RDS licensing state (15+ minutes)
Sometimes the license server is configured correctly but the RD Session Host still throws the error because its cached licensing state is corrupted. This fix clears that cache and forces a fresh negotiation. It's advanced and requires a reboot.
- Open Command Prompt as Administrator. Run:
reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\LicensingCore" /f
This removes the cached licensing core data. - Next, delete the certification cache. Run:
reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM" /v Certificate /f
You might get an error saying the key doesn't exist — that's fine, it means it was already missing. - Now delete the grace period registry entry if it's expired. Run:
reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod" /f
This resets the grace period counter to 0, which forces the server to re-check the license server on next boot. - Finally, restart the Remote Desktop Services service and then reboot the server. Run:
net stop TermService && net start TermService
shutdown /r /t 0
The server restarts immediately. - After reboot, open Server Manager and verify the license server is reachable under Remote Desktop Services > Servers. Run
gpupdate /forceto ensure group policy licensing settings apply if you use them.
What you should see: After the reboot, try connecting via RDP. The error should disappear. If you still see it, double-check that your license server is online, activated, and has CALs installed. A common oversight is forgetting to install the licenses after activation — the wizard only activates the server, not the CALs.
Why this still happens and how to avoid it
Most people hit this error because they installed the RD Session Host role but forgot to configure licensing. Windows Server doesn't automatically set up a license server — you have to do it manually. Another scenario: you upgraded from an older server and the licensing configuration didn't carry over. The fix is always the same: either the grace period, a licensed server, or resetting the cache.
If you're running a lab or test environment, you can get a 180-day trial license from Microsoft. For production, buy RDS CALs per user or per device. Don't try to use the built-in 120-day grace period forever — it's not a permanent solution and will bite you later.
Pro tip: If you have multiple RD Session Hosts, use a group policy to point them all to the same license server. That way, you configure it once and it stays consistent across reboots. Set it under Computer Configuration > Policies > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Licensing.
Was this solution helpful?