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.
Settings
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.
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 isXBOX_ 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:
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.
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:Upgrading from a release that read appsettings.json
Earlier releases readappsettings.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. You might see these messages until you finish:
-
--config-envfails with this error. Remove the option, and setXBOX_variables instead. -
While an
appsettings*.jsonfile is beside the executable, commands write this note to stderr. Delete the file. -
PlayFab commands fail with an error that names
XBOX_PLAYFAB__REQUESTHEADERS__0__VALUEif an earlier error message led you to set it. Remove the variable.
