Salesforce sign-in¶
Salesforce is the system behind SRM, our Student Relationship Management org, where student and staff records, flows and Apex code live. sfe reads it with sfe sf .... It also reads Copado, the tool that moves a change from one Salesforce org to the next, because Copado is installed inside the production org and is read from there. So one Salesforce sign-in serves both.
Video, about one and a half minutes, with narration and captions.
The video shows sfe's own checks for this sign-in, from a real run. The browser part of a sign-in, where we type our password and approve it, is ours alone, so the video describes it and does not record it.
What it is used for in sfe¶
sfe sf query,sfe sf record,sfe sf describe,sfe sf historyand the othersfe sfcommands read records, fields and the change history of a record.sfe copado where <key>andsfe where <Jira key>say where a change is on its way from DevFull to production.- The shortcuts that look up a Salesforce id, a Copado story such as
US-0030800, or a person by email, use the same login.
What must be signed in¶
| What | Detail |
|---|---|
| The tool | The Salesforce command line, sf. sfe doctor tools checks that it is installed |
| The command | sf org login web --alias <alias> --instance-url <address>. It opens a browser page on the WGU single sign-on (SSO, one company login for many tools) |
| What we type | Our password, the MFA code or approval, in the browser. We type them, never sfe and never an agent |
| Where it is kept | In the Salesforce command line's own storage. sfe only asks it who we are |
The doctor prints these exact lines, one for each org:
sf org login web --alias srm-prod --instance-url https://srm.my.salesforce.com
sf org login web --alias srm-devfull --instance-url https://srm--devfull.sandbox.my.salesforce.com
sf org login web --alias srm-qafull --instance-url https://srm--qafull.sandbox.my.salesforce.com
sf org login web --alias srm-staging --instance-url https://srm--staging.sandbox.my.salesforce.com
We run the one we need. The production login is required. The three sandbox logins are optional.
Environments¶
| sfe name | What it is | Required |
|---|---|---|
prod |
Production (SRM). The live org that students, staff and integrations use. We only read from it | Yes |
qafull |
A full-data sandbox used for QA. The SIT and stage lanes of our services point here | Optional |
devfull |
A full-data sandbox for development | Optional |
staging |
An older sandbox that is not on the main pipeline | Optional |
A sandbox is a practice copy of production, used for testing. A sandbox login only works after we have an invitation from Microsoft Entra, the company sign-in system, for that sandbox. We ask the Salesforce team for it first. Without it, the browser step fails and the doctor keeps showing a yellow triangle for that sandbox, which is fine.
Production is the default. For one command we add -e qafull, or we switch everything with sfe use dev, sfe use qa, sfe use stage or sfe use prod.
What a successful sign-in looks like¶
sfe status has a salesforce row whose login column ends in (Connected), and a copado row that says same login as salesforce:
salesforce yes prod Production (SRM) [PRODUCTION] <our WGU email> (Connected)
copado yes prod via SOQL on Production (SRM) [PRODUCTION] same login as salesforce
sfe doctor salesforce shows a green tick for each org we signed in to, with the same (Connected) text. sfe sf whoami says which org and which user we are, and sfe sf whoami -e qafull checks a sandbox. Both only read.
On a Mac where it is signed in, sfe doctor salesforce looks like this:

And sfe sf whoami, which only reads:

Steps¶
- We open a terminal and run
sfe doctor salesforce. It lists the orgs and prints afix:line for each one that is not signed in. - We copy the
sf org login webline for the org we need, and run it. - The browser opens on the WGU sign-in. We type our password and approve the MFA ourselves.
- When the browser says it is done, we go back to the terminal. The command prints which org we are connected to.
- We run
sfe doctor salesforceagain. The red cross or yellow triangle for that org should now be a green tick.
Troubleshooting¶
| What we see | Likely cause | What to do |
|---|---|---|
not logged in to Production (SRM), or exit code 4 |
The login is missing | Run the sf org login web --alias srm-prod ... line from sfe doctor salesforce, and type the password and code ourselves |
the saved login expired |
The saved session is too old, or Salesforce ended it | Run the same login command again |
A yellow triangle for a sandbox, with sandbox access needs the Entra invite first |
We have no invitation for that sandbox yet | Ask the Salesforce team for the Entra invitation, then run the login line |
| The browser step ends with an access error for a sandbox | The invitation is not in place yet | Same as above. Nothing is wrong with sfe |
sf installed shows a red cross in sfe doctor tools |
The Salesforce command line is not installed | Run sfe setup tools, which asks before it installs anything |
sfe sf whoami shows an org we did not expect |
The default environment is not the one we thought | Look at sfe env, and pass -e for one command |
Next¶
- AWS
- Look into a ticket or incident, which uses this sign-in.
Last reviewed: 2026-12-02