Authorize an org using an existing Salesforce access token.
Description for org login access-token
By default, the command runs interactively and asks you for the access token. If you previously authorized the org, the command prompts whether you want to overwrite the local file. Specify –no-prompt to not be prompted.
If you pipe the access token to the command (so stdin isn’t an interactive terminal), the command reads the token from stdin and doesn’t prompt to overwrite an existing file.
To use the command in a CI/CD script, set the SF_ACCESS_TOKEN environment variable to the access token. Then run the command with the –no-prompt parameter.
Aliases for org login access-token
force:auth:accesstoken:store
auth:accesstoken:store
Flags
Flag Name (Long)
Flag Name (Short)
Description
‑‑alias
‑a
Type: Value
Alias for the org.
‑‑flags‑dir
N/A
Type: Value
Import flag values from a directory.
‑‑instance‑url
‑r
Type: Value Required
URL of the instance that the org lives on.
If you specify an –instance-url value, this value overrides the sfdcLoginUrl value in your sfdx-project.json file.
To specify a My Domain URL, use the format “https://<MyDomainName>.my.salesforce.com”.
To specify a sandbox, set –instance-url to “https://<MyDomainName>–<SandboxName>.sandbox.my.salesforce.com”.
‑‑json
N/A
Type: Boolean
Format output as json.
‑‑no‑prompt
‑p
Type: Boolean
Don’t prompt for confirmation.
‑‑set‑default
‑s
Type: Boolean
Set the authenticated org as the default that all org-related commands run against.