Newer Version Available

This content describes an older version of this product. View Latest

Authorization Information for an Org

You can view information for all orgs that you’ve authorized and the scratch orgs that you’ve created.

To view authorization information about an org, run this command from a terminal (macOS and Linux) or command prompt (Windows).

1sf org display --target-org <username-or-alias>

If you have set a default org, you don’t have to specify the --target-org flag. To display the usernames for all the active orgs that you’ve authorized or created, run org list.

If you’ve set an alias for an org, you can specify it with the --target-org flag. This example uses the my-scratch-org alias.

1sf org display --target-org my-scratch-org
2
3Warning: This command will expose sensitive information that allows for subsequent activity using your current authenticated session.
4Sharing this information is equivalent to logging someone in under the current credential, resulting in unintended access and escalation of privilege.
5For additional information, please review the authorization section of the https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_web_flow.htm
6
7=== Org Description
8
9 KEY             VALUE                                                                                                            
10 ─────────────── ──────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
11 Access Token    <long-string> 
12 Alias           my-scratch-org                                                                                                        
13 Api Version     58.0                                                                                                             
14 Client Id       PlatformCLI                                                                                                      
15 Created By      jdoe@fabdevhub.org                                                                       
16 Created Date    2023-06-09T17:59:18.000+0000                                                                                     
17 Dev Hub Id      jdoe@fabdevhub.org                                                                       
18 Edition         Developer                                                                                                        
19 Expiration Date 2023-06-16                                                                                                       
20 Id              00D8H0000007wprU                                                                                               
21 Instance Url    https://java-connect-41-dev-ed.scratch.my.salesforce.com                                                       
22 Org Name        Your Company                                                                                          
23 Signup Username test-gm9uud@example.com                                                                                    
24 Status          Active                                                                                                           
25 Username        test-gm9uud@example.com

To get more information, such as the Salesforce DX authentication URL, include the --verbose flag. This flag displays the Sfdx Auth Url value only if you authorized the org using org login web and not org login jwt.

To help prevent security breaches, the org display output doesn’t include the org’s client secret or refresh token.

Note