Cli: Add a flag to sfdx force:org:list --all --json to show the accessToken unencrypted for every connected environment

Created on 27 Jan 2021  路  8Comments  路  Source: forcedotcom/cli

Is your feature request related to a problem? Please describe.

When I run sfdx force:org:display --json the accessToken is unecrypted. I can just get it and use on my requests with Postman.
But when I run sfdx force:org:list --all --json the accessTokens for every connected org are encrypted.

What are you trying to do
I need to get all the access tokens for all my connected orgs with one command. Currently, I have to keep running sfdx force:org:display for every environment just to get the access token.

Describe the solution you'd like
Add a new flag to this command sfdx force:org:list --all -t --json so it will display the access token unencrypted. Or just don't encrypt the access token.

Describe alternatives you've considered
Maybe there is a way for me to unencrypt it. I saw a .key inside .sfdx. Can I use that? if yes, how would the process be?

Additional context
N/A

feature

All 8 comments

Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.

This issue has been linked to a new work item: W-8801250

Hi @AllanOricil thanks for the input, we're open sourcing those commands here. We'll make the fix there

@AllanOricil we've fixed this in the new plugin-org, which fixes a number of other bugs and performance issues.

If you'd like to try it out early (before it gets bundled into the CLI), you can install it manually: https://github.com/salesforcecli/plugin-org#install

@AllanOricil we've fixed this in the new plugin-org, which fixes a number of other bugs and performance issues.

If you'd like to try it out early (before it gets bundled into the CLI), you can install it manually: https://github.com/salesforcecli/plugin-org#install

@mshanemc I will give it a try. Thanks for that!

@mshanemc it worked! Now I can see the Access Tokens "unencrypted". When will this be available when the user install sfdx? Is it already gonna be installed?

Is this plugin officially released as part of the sfdx? For me the commands worked as expected. I've been using it since February without any issues

Yes, in latest as of 4 days ago (updates go through a latest-rc, then promoted to latest the following week).

Was this page helpful?
0 / 5 - 0 ratings