login Commands (Retiring)

Commands to log in to an environment.

On January 31, 2025, Salesforce will retire Salesforce Functions, also known as Salesforce Elastic Services. See Salesforce Functions Retirement for more information.

Important

login functions

Log in to Salesforce Functions.

Description for login functions

This step is required to develop or deploy Salesforce Functions.

Examples for login functions

Log in to Salesforce Functions:

1sf login functions

Flags

--json
Optional

Format output as json.

Type: boolean

login functions jwt

Login using JWT instead of default web-based flow. This will authenticate you with both sf and Salesforce Functions.

Description for login functions jwt

Use this command when executing from a script.

Examples for login functions jwt

Log in using JWT:

1sf login functions jwt --username example@username.org --keyfile file.key --clientid 123456

Log in and specify the org alias and URL, set as default org and default Dev Hub, and format output as JSON:

1sf login functions jwt --username example@username.org --keyfile file.key --clientid 123456 --alias org-alias --set-default --set-default-dev-hub --instance-url https://path/to/instance --json

Flags

--json
Optional

Format output as json.

Type: boolean
-u | --username USERNAME
Required

Authentication username.

Type: option
-f | --keyfile KEYFILE
Required

Path to JWT keyfile.

Type: option
-i | --clientid CLIENTID
Required

OAuth client ID.

Type: option
-l | --instance-url INSTANCE-URL
Optional

The login URL of the instance the org lives on.

Type: option
-a | --alias ALIAS
Optional

Alias for the org.

Type: option
-d | --set-default
Optional

Set the org as the default that all org-related commands run against.

Type: boolean
-v | --set-default-dev-hub
Optional

Set the org as the default Dev Hub for scratch org creation.

Type: boolean