Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
XBOX Docs are now on docs.xbox.com! This page is kept as an archive and is no longer being updated. Visit our documentation on docs.xbox.com for the latest information and updates.
The XBOX CLI needs no configuration file. Its settings come from defaults built into the executable, which you can override for a shell with environment variables or for a single command with options.
Configuration sources and precedence
Settings come from three sources, and later sources override earlier ones:
- Built-in defaults, compiled into the executable. See Settings.
- Environment variables. See Environment variables.
- Command-line options. See CLI option overrides.
A new release brings its own defaults, so there's no settings file to carry forward.
The seller, PlayFab title, XBOX title, and sandbox aren't settings; see Context for where a command gets them.
Settings
| Key | Environment variable | Option | Built-in default |
|---|---|---|---|
AzureAd:ClientId |
XBOX_AZUREAD__CLIENTID |
--client-id |
The CLI's own Microsoft Entra ID application |
AzureAd:TenantId |
XBOX_AZUREAD__TENANTID |
--tenant-id |
common |
AzureAd:Scopes |
XBOX_AZUREAD__SCOPES |
--scopes |
Built in |
PlayFab:BaseUrlTemplate |
XBOX_PLAYFAB__BASEURLTEMPLATE |
None | Built in |
PlayFab:StudioBaseUrl |
XBOX_PLAYFAB__STUDIOBASEURL |
None | Built in |
PlayFab:MaxRequestBodyBytes |
XBOX_PLAYFAB__MAXREQUESTBODYBYTES |
None | 1048576 (1 MiB) |
PlayFab:MaxResponseBytes |
XBOX_PLAYFAB__MAXRESPONSEBYTES |
None | 4194304 (4 MiB) |
XboxPartner:BaseUrl |
XBOX_XBOXPARTNER__BASEURL |
--base-url, on the commands that accept it |
Built in |
XboxPartner:TimeoutSeconds |
XBOX_XBOXPARTNER__TIMEOUTSECONDS |
None | 120 |
XblPCSandbox:Path |
XBOX_XBLPCSANDBOX__PATH |
None | Not set |
AuditLog:Enabled |
XBOX_AUDITLOG__ENABLED |
None | false |
Telemetry:Enabled |
XBOX_TELEMETRY__ENABLED |
--disable-telemetry sets false |
true |
AzureAd:*configure user sign-in; see Authentication.PlayFab:StudioBaseUrlis the PlayFab endpoint for studio APIs (/Studio/*), such as thoseplayfab service-principalcalls.XboxPartner:TimeoutSecondsis the request timeout in seconds for commands such asgame, and must be a positive number.XblPCSandbox:Pathis theXblPCSandbox.exethat thepc sandboxcommands run. When it isn't set, the CLI looks in its own directory and then onPATH.AuditLog:Enabledturns on the audit log.Telemetry:*are described in Telemetry.
When PlayFab:BaseUrlTemplate, PlayFab:StudioBaseUrl, or XboxPartner:BaseUrl isn't the
built-in default, every command that sends a token to that endpoint first writes a warning to
stderr.
Environment variables
A setting's variable is XBOX_ and its key, with __ (two underscores) in place of each :,
so Telemetry:Enabled is XBOX_TELEMETRY__ENABLED. Write names in capitals. A variable applies
to the shell that sets it and every command that shell starts. In bash or zsh:
export XBOX_XBOXPARTNER__TIMEOUTSECONDS=300
xbox game list
In PowerShell:
$env:XBOX_XBOXPARTNER__TIMEOUTSECONDS = "300"
xbox game list
Every setting in Settings has a variable. The CLI also reads these:
| Environment variable | Purpose |
|---|---|
XBOX_PLAYFAB_TITLE_ID, XBOX_SELLER_ID, XBOX_SANDBOX_ID, XBOX_TITLE_ID |
Context values; see Context |
XBOX_PROFILE |
The profile saved values come from, when --profile isn't passed |
XBOX_TELEMETRY_OPTOUT |
Turns telemetry off when set to 1, true, or yes |
XBOX_AUTHENTICATION__MODE and other XBOX_AUTHENTICATION__ variables |
Service-principal sign-in |
XBOX_AUTHENTICATION__ settings are read only from environment variables, never from built-in
defaults or options. See
Automation (service principal) authentication.
CLI option overrides
Options override every other source, for one command.
| Option | Configuration key or behavior |
|---|---|
--client-id |
AzureAd:ClientId for user sign-in; refused in service-principal modes |
--tenant-id |
AzureAd:TenantId for user sign-in; refused in service-principal modes |
--scopes |
AzureAd:Scopes |
--base-url |
XboxPartner:BaseUrl, on the commands that accept it, such as game and seller |
--disable-telemetry |
Sets Telemetry:Enabled=false for this command |
See Commands for the other global options.
Telemetry configuration
Official releases collect limited anonymous telemetry unless you turn it off. To turn it off for one command:
xbox --disable-telemetry auth status
To turn it off for a shell, in bash or zsh:
export XBOX_TELEMETRY_OPTOUT=1
In PowerShell:
$env:XBOX_TELEMETRY_OPTOUT = "1"
See Telemetry for what's collected.
Upgrading from a release that read appsettings.json
Earlier releases read appsettings.json from beside the executable. If you changed a value in
it, set its XBOX_ variable instead: for example, "AzureAd": { "ClientId": "..." } becomes
XBOX_AZUREAD__CLIENTID. The CLI no longer reads the file, so you can delete it.