sfdxurl Commands

Authorize an org using sfdxurl.

auth:sfdxurl:store

Authorize an org using an SFDX auth URL.

Help for auth:sfdxurl:store

Authorize a Salesforce org using an SFDX auth URL stored within a file. The URL must have the format "force://<refreshToken>@<instanceUrl>" or "force://<clientId>:<clientSecret>:<refreshToken>@<instanceUrl>".

You have three options when creating the auth file. The easiest option is to redirect the output of the `sfdx force:org:display --verbose --json` command into a file.

For example, using an org you have already authorized:

1$ sfdx force:org:display -u <DevHub> --verbose --json > authFile.json
1$ sfdx auth:sfdxurl:store -f authFile.json

The resulting JSON file contains the URL in the sfdxAuthUrl property inside of a results object.

You can also create a JSON file that has a top-level property named sfdxAuthUrl whose value is the auth URL.

Finally, you can create a normal text file that includes just the URL and nothing else.

Examples for auth:sfdxurl:store

sfdx auth:sfdxurl:store -f <path to sfdxAuthUrl file>

sfdx auth:sfdxurl:store -f <path to sfdxAuthUrl file> -s -a MyDefaultOrg

Command Syntax

sfdx auth:sfdxurl:store
[--json]
[--loglevel LOGLEVEL]
-f SFDXURLFILE
[-d]
[-s]
[-a SETALIAS]

Parameters

--json
Optional

Format output as JSON.

Type: boolean
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: enum
Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
Default value: warn
-f | --sfdxurlfile SFDXURLFILE
Required

Path to a file containing the sfdx url.

Type: filepath
-d | --setdefaultdevhubusername
Optional

Set the authenticated org as the default dev hub org for scratch org creation.

Type: boolean
-s | --setdefaultusername
Optional

Set the authenticated org as the default username that all commands run against.

Type: boolean
-a | --setalias SETALIAS
Optional

Set an alias for the authenticated org.

Type: string

Aliases for auth:sfdxurl:store

1force:auth:sfdxurl:store