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).

sf 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.

sf org display --target-org my-scratch-org

Warning: This command will expose sensitive information that allows for subsequent activity using your current authenticated session.
Sharing this information is equivalent to logging someone in under the current credential, resulting in unintended access and escalation of privilege.
For 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

=== Org Description

 KEY             VALUE                                                                                                            
 ─────────────── ──────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
 Access Token    <long-string> 
 Alias           my-scratch-org                                                                                                        
 Api Version     58.0                                                                                                             
 Client Id       PlatformCLI                                                                                                      
 Created By      jdoe@fabdevhub.org                                                                       
 Created Date    2023-06-09T17:59:18.000+0000                                                                                     
 Dev Hub Id      jdoe@fabdevhub.org                                                                       
 Edition         Developer                                                                                                        
 Expiration Date 2023-06-16                                                                                                       
 Id              00D8H0000007wprU                                                                                               
 Instance Url    https://java-connect-41-dev-ed.scratch.my.salesforce.com                                                       
 Org Name        Your Company                                                                                          
 Signup Username test-gm9uud@example.com                                                                                    
 Status          Active                                                                                                           
 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