Citrix License Activation Service
Overview
This document describes how to complete License Server registration with Citrix Cloud using the Key Registration Service (KRS) Trust API. Registration binds a specific License Server instance to your Citrix Cloud customer account so that licensing attestation and reporting can proceed.
The onboarding consists of three customer-facing steps:
| Step | What you do | Where it runs |
|---|---|---|
| Step 1 - Obtain a registration code | Run a PowerShell script that asks the local License Server to generate a short registration code. | On or against the License Server (local API over HTTPS). |
| Step 2 - Verify the registration | Call the KRS Trust API verify endpoint. |
Citrix Cloud KRS Trust API. |
| Step 3 - Confirm the registration | Call the KRS Trust API confirm endpoint. |
Citrix Cloud KRS Trust API. |
Under the hood, when the License Server generates the code in Step 1 it contacts the KRS token endpoint (POST https://trust.citrixnetworkapi.net/root/trust/v1/token) on your behalf. You do not call the token endpoint directly. The License Server does. After a code is issued, the License Server polls Citrix Cloud in the background and transitions to REGISTERED automatically once the registration is approved or confirmed.
Authentication model: As a customer you do not use a Citrix Cloud service key anywhere in this workflow. Step 1 runs against the local License Server. The verify and confirm calls (Steps 2 and 3) are not authenticated with a service key — see each step and the Prerequisites for details.
Prerequisites
Before you begin, ensure the following:
- License Server reachability (local API): Network access from the machine running the script to the License Server over HTTPS on TCP port 8083 (the License Server’s local API port). Any intervening firewall must allow this.
- License Server health: The License Server service is running and healthy.
- Outbound connectivity to Citrix Cloud: The License Server must have working outbound HTTPS connectivity to the Citrix Cloud trust endpoints. Generating the code requires the License Server to contact Citrix Cloud. If outbound connectivity or the proxy is broken, the code request can return HTTP 200 but with no code (inspect the status/result values).
- TLS trust: The License Server trusts the Citrix Cloud certificate chain (up-to-date root CAs), and no SSL-inspecting proxy should be replacing the Cloud certificate.
- PowerShell: Available to run the provided script.
- License Server admin credentials: The script accepts an administrator user name and password for the License Server.
-
KRS API access (Steps 2 & 3): Ability to reach the KRS Trust API
verifyandconfirmendpoints below. A Citrix Cloud service key is not required for these calls.https://trust.citrixnetworkapi.net/root/trust/v1/verify/<CustomerId>https://trust.citrixnetworkapi.net/root/trust/v1/confirm/<CustomerId>
- TODO: From KRS API spec — the authentication method for these calls (note: this is not a service key).
Note:
The sample script disables TLS certificate validation for convenience in controlled/test environments. In production, trust the License Server’s certificate rather than disabling validation.
Step 1 - Obtain a Registration Code on the License Server
Purpose
Ask the local License Server to generate a Citrix Cloud registration code. This short, opaque code is later used to verify and confirm the registration. No interactive console login is required for the API path.
How to run the script
Run the provided PowerShell script with three mandatory parameters:
-
AdminUsername- License Server administrator user name. -
AdminPassword- Password for that account. -
LicServer- host name or IP address of the License Server.
# Obtain a Citrix Cloud registration code from the License Server
# Replace <...> with your values and the script name with the one provided to you.
.\Get-LicRegisterCode.ps1 `
-AdminUsername <admin> `
-AdminPassword <password> `
-LicServer <license-server-host>
<!--NeedCopy-->
What the request looks like (for automation)
If you are building your own automation instead of using the script, the recommended, replicable path is the following request. Send it directly to the License Server local API.
POST https://<LicServer>:8083/sls_unauth/services/sls
Content-Type: application/soap+xml; charset=utf-8
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><WSLCCRegisterRequest><locale>en-US</locale></WSLCCRegisterRequest></soapenv:Body></soapenv:Envelope>
<!--NeedCopy-->
Notes
- Transport: HTTPS (TLS) on TCP port 8083. Replace
<LicServer>with the License Server host name or IP. - The
charset=utf-8portion of theContent-Typeheader is required. -
localeis the message locale (for example,en-US).
What a successful run returns
The License Server responds with HTTP 200 and a SOAP envelope containing a WSLCCRegistrationStatusResponse. Read these fields:
| Field | Meaning |
|---|---|
registrationStatus |
Overall state. A code is present only when this is PENDING. Other values: REGISTERED, UNREGISTERED, UNKNOWN. |
registrationCode |
The short opaque code (typically ~8 characters) to use in Steps 2 and 3. Present only when PENDING. |
registrationURL |
The Citrix Cloud URL associated with the registration. |
retCode |
Result/error code (for example WSL_SUCCESS or an ERROR_WSL_* value). See the reference table below. |
The script prints and returns the code, and also saves it to a text file on the machine (for example, registercode.txt under a ProgramData subfolder).
Important:
Do not treat HTTP 200 as success on its own. Always inspect
registrationStatusandretCode. A registration code exists only whenregistrationStatus = PENDING. Treat the code as an opaque string. Do not assume a fixed length.
Possible outcomes of Step 1
| Outcome | Meaning |
|---|---|
Registration code issued (PENDING) |
Success. The code is printed, returned, and saved. Proceed to Step 2. |
Already registered (REGISTERED) |
No new code issued. The server is already registered with Citrix Cloud. |
Not registered / undeterminable (UNREGISTERED or UNKNOWN) |
No code issued. Check retCode and outbound connectivity, then retry. |
| HTTP 200 but no code | Re-check registrationStatus/retCode; commonly caused by outbound Cloud/proxy/certificate problems. |
| HTTP 404 | Request malformed or rejected (wrong method, missing/incorrect Content-Type, or unsupported body). |
| HTTP 500 | Internal server error. Retry later and check the service or logs if it persists. |
| Error element or empty body | Request not understood or could not be completed. Verify request format and Content-Type, then retry. |
After a code is issued, the License Server begins polling Citrix Cloud in the background at the interval Cloud specifies and completes automatically once the registration is approved. The code is valid only until its expiry. If it expires before verification or confirmation completes, restart Step 1 to obtain a fresh code.
Step 2 - Verify the Registration (KRS Trust API)
Call the KRS Trust API to verify the registration using the code obtained in Step 1.
No service key required. These calls are not authenticated with a Citrix Cloud service key.
Endpoint
POST https://trust.citrixnetworkapi.net/root/trust/v1/verify/<CustomerId>
<!--NeedCopy-->
Replace <CustomerId> with your Citrix Cloud customer ID.
Request headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Accept |
application/json |
Authorization |
Not a Citrix Cloud service key. TODO: from KRS API spec |
| Other required headers | TODO: from KRS API spec |
Request body
TODO: from KRS API spec — exact JSON request body for the verified call (including how the Step 1 registration code and any identifiers are supplied).
Response body
TODO: from KRS API spec — exact JSON response body for the verified call.
Error codes
TODO: from KRS API spec — HTTP status codes and error payloads returned by the verified endpoint, with meaning and recommended action.
Step 3 - Confirm the Registration (KRS Trust API)
Call the KRS Trust API to confirm (complete) the registration.
No service key required. These calls are not authenticated with a Citrix Cloud service key.
Endpoint
POST https://trust.citrixnetworkapi.net/root/trust/v1/confirm/<CustomerId>
<!--NeedCopy-->
Replace <CustomerId> with your Citrix Cloud customer ID.
Request headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Accept |
application/json |
Authorization |
Not a Citrix Cloud service key. TODO: from KRS API spec |
| Other required headers | TODO: from KRS API spec |
Request body
TODO: from KRS API spec — exact JSON request body for the confirmed call.
Response body
TODO: from KRS API spec — exact JSON response body for the confirmed call.
Error codes
TODO: from KRS API spec — HTTP status codes and error payloads returned by the confirmed endpoint, with meaning and recommended action.
Once verification and confirmation succeed, the License Server background polling detects the approval and transitions the instance to REGISTERED. The registration is then complete.
End-to-End Sequence Summary
-
Request a code (Step 1). Run the script (or POST the local API request) against the License Server. The License Server contacts Citrix Cloud, obtains a short registration code plus a verification URL and validity window, and reports
registrationStatus = PENDING. Save the code. -
Verify (Step 2). Call
POST .../root/trust/v1/verify/<CustomerId>with the details from the KRS API spec. -
Confirm (Step 3). Call
POST .../root/trust/v1/confirm/<CustomerId>with the details from the KRS API spec. -
Automatic completion. While the code is
PENDING, the License Server polls Citrix Cloud at the Cloud-specified interval. When the registration is approved or confirmed, the License Server transitions toREGISTEREDon its own and records the customer details. No further customer action is required.
If the code expires before Steps 2/3 complete, repeat Step 1 to obtain a fresh code and try again promptly.
Response & Error Codes Reference
The values below apply to the parts of the flow driven by the License Server (Step 1 and the automatic background completion). Codes for the KRS verify/confirm endpoints are supplied separately (see the TODO placeholders in Steps 2 and 3).
Registration status values
| Status | Meaning | Action |
|---|---|---|
UNREGISTERED |
The License Server is not registered with Citrix Cloud. Registration was never started or was cleared. | Normal starting state. If cloud registration is desired, start Step 1 to request a code. |
PENDING (Confirmation Pending) |
A registration code has been issued and the License Server is waiting for the registration to be verified or confirmed. The server polls Citrix Cloud in the background. | Complete Steps 2 and 3, and enter/approve the code before it expires. Leave the License Server running so it can finish automatically. |
REGISTERED |
Registration is complete. The instance is bound to your customer account and the customer ID is recorded. | None. Registration succeeded. |
UNKNOWN |
The registration state could not be determined (for example, the status could not be read or parsed). | Retry the status query. If it persists, check connectivity to Citrix Cloud and the License Server logs, then re-attempt registration. |
Registration result codes
| Code | Typical HTTP | Meaning | Action |
|---|---|---|---|
WSL_SUCCESS |
200 |
The operation completed without error. | Read registrationStatus to determine whether the flow is PENDING or REGISTERED. |
ERROR_WSL_PROXY_UNRESPONSIVE |
A proxy is configured but Citrix Cloud could not be reached through it. | Verify proxy address/port, credentials, and that it permits outbound HTTPS to Citrix Cloud; fix and retry. | |
ERROR_WSL_CC_CLIENT_EXCEPTION |
An internal client-side error occurred on the License Server during the exchange. | Retry. If it recurs, check License Server host health, service permissions or resources, and logs. Contact Citrix Support with logs if it persists. | |
ERROR_WSL_CC_ENDPOINT_CERTIFICATE |
The TLS handshake with Citrix Cloud failed. The server certificate was not trusted. | Ensure the License Server trusts the Citrix Cloud certificate chain (up-to-date root CAs) and that no SSL-inspecting proxy is replacing the certificate; correct and retry. | |
ERROR_WSL_CC_ENDPOINT_UNRESPONSIVE |
Citrix Cloud could not be contacted (connection failed or timed out), with no proxy involved. | Check internet connectivity, DNS, and firewall egress to the Citrix Cloud endpoints on HTTPS; restore connectivity and retry. | |
ERROR_WSL_CC_ENDPOINT_RETURNED_ERROR |
non-200 |
Citrix Cloud responded with an unexpected result: an error status, an unparseable body, or a missing required field. | Retry after a short wait (often transient). If it persists, capture the License Server logs and contact Citrix Support. |
ERROR_WSL_CC_ACTIVATION_CODE_EXPIRED |
The registration code was not verified/confirmed before its expiry window elapsed and is no longer valid. | Restart Step 1 to obtain a fresh code and complete Steps 2 and 3 promptly, before the shown expiry time. | |
ERROR_WSL_CC_INSTANCE_NOT_UNIQUE |
400 |
Citrix Cloud reports a duplicate/stale entry for this instance: it was cleaned up on the License Server side but not fully deregistered in Citrix Cloud. | Complete deregistration of the stale instance in Citrix Cloud (or contact Citrix Support to clear the duplicate), then retry registration. |
Step 1 local-API HTTP outcomes
| HTTP | Meaning | Action |
|---|---|---|
200 |
The request reached the License Server. Outcome is determined by the response body, not the status code. | Parse the response: check registrationStatus (expect PENDING) and read registrationCode. If PENDING is absent, inspect retCode. |
404 |
Request malformed or rejected (wrong method, missing/incorrect Content-Type, or unsupported body). |
Verify that you are using POST to the exact URL, that Content-Type is application/soap+xml; charset=utf-8, and that the body matches the sample, then retry. |
500 |
The License Server encountered an internal error. | Retry later. If it persists, confirm that the service is running and review its logs. |
Troubleshooting
-
HTTP 200 but no registration code: Re-check
registrationStatusandretCode. This is usually an outbound connectivity, proxy, or certificate problem between the License Server and Citrix Cloud. Verify outbound HTTPS reachability, proxy settings, and TLS trust, then retry Step 1. - Cannot reach the License Server on port 8083: Confirm the License Server service is running and that firewalls permit HTTPS to TCP 8083 from the machine running the script.
-
HTTP 404 from Step 1: Ensure the request uses
POST, the exact URL, theContent-Type: application/soap+xml; charset=utf-8header (includingcharset=utf-8), and the exact SOAP body. -
Certificate / TLS failures (
ERROR_WSL_CC_ENDPOINT_CERTIFICATE): Update root CAs on the License Server and ensure that no SSL-inspecting proxy is intercepting traffic to Citrix Cloud. -
Proxy failures (
ERROR_WSL_PROXY_UNRESPONSIVE): Verify proxy address/port/credentials and that the proxy permits HTTPS to the Citrix Cloud endpoints. -
Code expired (
ERROR_WSL_CC_ACTIVATION_CODE_EXPIRED): Restart Step 1 for a fresh code and complete Steps 2 and 3 promptly. -
Duplicate instance (
ERROR_WSL_CC_INSTANCE_NOT_UNIQUE): Fully deregister the stale instance in Citrix Cloud (or contact Citrix Support to remove the duplicate), then retry. -
Registration seems stuck at
PENDING: Confirm Steps 2 and 3 completed successfully and that the License Server remains to run with outbound connectivity so its background polling can complete. If the code has expired, restart Step 1. -
State reports
UNKNOWN: Retry the status query. If it persists, check Cloud connectivity and the License Server logs, then re-attempt registration. -
Errors from Step 2 or Step 3 (KRS API): TODO: from KRS API spec — add KRS
verify/confirmerror handling guidance once the spec is supplied.
When contacting Citrix Support, include the License Server logs and, where available, the transaction identifier associated with the failed request.