New OAuth connections are not added to the connections list
sfdx: 7.103.0-037481c
IC 2.1.7.9
The create new OAuth connection workflow completes successfully, but the new connection is not added to the connection list.
Comments (9)
-
repo owner -
reporter - attached idea.log
-
reporter the connection I am trying to create is hw-new2e2
-
reporter Scott - it just occurred to me that right now, SBoxes are on Summer 21, maybe that’s the prob. I don’t have any Spring 21 orgs I can test with
-
repo owner That may well be the case. I'll tell you what I've found either way, though. I see the
force:auth:web:login
finish successfully:/usr/local/bin/sfdx force:auth:web:login -a hw-new2e2 -r https://test.salesforce.com/ --json
{ "status": 0, "result": { "username": "jeff.may@olooptech.com.fsle2e", "accessToken": "<redacted>", "instanceUrl": "https://nex--hbtfsle2e.my.salesforce.com", "orgId": "00D6s0000004dMuEAI", "loginUrl": "https://test.salesforce.com/", "refreshToken": "<redacted>", "clientId": "PlatformCLI" } }
and then when IC2 gets the latest list of orgs, the newly-authenticated org is included but with another alias:
/usr/local/bin/sfdx force:org:list --skipconnectionstatus --json
... { "username": "jeff.may@olooptech.com.fsle2e", "accessToken": "<redacted>", "instanceUrl": "https://nex--hbtfsle2e.my.salesforce.com", "orgId": "00D6s0000004dMuEAI", "loginUrl": "https://test.salesforce.com/", "clientId": "PlatformCLI", "alias": "hw-e2e", "lastUsed": "2021-06-02T18:43:02.267Z" }, ...
Notice that you've successfully authenticated username
jeff.may@olooptech.com.fsle2e
with aliashw-new2e2
, but that username is associated with aliashw-e2e
in theforce:org:list
response.So whatever is going on here seems to be an issue with the CLI. I wonder if running
sfdx force:org:list
without the--skipconnectionstatus
flag might correct this stale information. You can either do that from the command-line, or you can do it using the Force Refresh Salesforce CLI Connections toolbar button in the connection list (the red refresh button).And I guess I should have started here, but what version of the CLI do you have installed?
-
repo owner FYI, I'm able to reproduce this behavior locally. If I have username
foo@bar.com
authenticated as aliasbaz
already, then I authenticate as that user again but with aliasbaz2
, the username is still associated with aliasbaz
. I'll check with the CLI team and see if this is a known issue. My guess is that a viable workaround would be to remove the existing alias and reauthenticate with that username. -
repo owner Reported via Salesforce CLI public issue tracker:
-
repo owner - changed status to resolved
Jeff, I'm going to resolve this as it does seem to be a problem with the CLI itself. Let's monitor progress via the linked CLI issue tracker bug, but if it comes back around as something specific to IC2, we'll reopen here.
-
repo owner I also removed the attached
idea.log
just in case any of its contents might be considered sensitive (probably not). I was able to extract the relevant portions and have included them in my own response with tokens and such redacted. - Log in to comment
Jeff, can you please enable debug logging for Salesforce DX, reproduce the behavior, and share the resulting
idea.log
either here as an attachment or, if preferred for privacy, via email?