# Org

Authenticate, open, and operate on Salesforce orgs

* [`sfp org artifacts query`](#sfp-org-artifacts-query)
* [`sfp org dependency expand`](#sfp-org-dependency-expand)
* [`sfp org dependency explain`](#sfp-org-dependency-explain)
* [`sfp org dependency install`](#sfp-org-dependency-install)
* [`sfp org dependency shrink`](#sfp-org-dependency-shrink)
* [`sfp org dev create`](#sfp-org-dev-create)
* [`sfp org dev grant`](#sfp-org-dev-grant)
* [`sfp org flow activate`](#sfp-org-flow-activate)
* [`sfp org flow cleanup`](#sfp-org-flow-cleanup)
* [`sfp org flow deactivate`](#sfp-org-flow-deactivate)
* [`sfp org list`](#sfp-org-list)
* [`sfp org login`](#sfp-org-login)
* [`sfp org open`](#sfp-org-open)
* [`sfp org profile merge`](#sfp-org-profile-merge)
* [`sfp org profile reconcile`](#sfp-org-profile-reconcile)
* [`sfp org profile retrieve`](#sfp-org-profile-retrieve)
* [`sfp org retrieve by-name`](#sfp-org-retrieve-by-name)
* [`sfp org retrieve metadata`](#sfp-org-retrieve-metadata)
* [`sfp org user deactivate`](#sfp-org-user-deactivate)
* [`sfp org user freeze`](#sfp-org-user-freeze)
* [`sfp org user unfreeze`](#sfp-org-user-unfreeze)

## `sfp org artifacts query`

Fetch details about artifacts installed in a target org

```
USAGE
  $ sfp org artifacts query -o <value> [--json] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -o, --targetusername=<value>  (required) Username or alias of the target org.
      --loglevel=<option>       [default: info] logging level for this command invocation
                                <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Fetch details about artifacts installed in a target org

ALIASES
  $ sfp artifacts query

EXAMPLES
  $ sfp artifacts:query -o <target_org>
```

*See code:* [*src/commands/org/artifacts/query.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org dependency expand`

Expand the dependency list in sfdx-project.json file for each package, fix the gap of dependencies from its dependent packages

```
USAGE
  $ sfp org dependency expand -v <value> [--json] [-o] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -o, --overwrite                     Flag to overwrite existing sfdx-project.json file
  -v, --targetdevhubusername=<value>  (required) Username or alias of the Dev Hub org.
      --loglevel=<option>             [default: info] logging level for this command invocation
                                      <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Expand the dependency list in sfdx-project.json file for each package, fix the gap of dependencies from its dependent
  packages

ALIASES
  $ sfp dependency expand
```

*See code:* [*src/commands/org/dependency/expand.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org dependency explain`

Lists the resolved dependencies for packages in the project

```
USAGE
  $ sfp org dependency explain [--json] [-p <value>] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -p, --package=<value>    Name of the specific package to show dependencies for
      --loglevel=<option>  [default: info] logging level for this command invocation
                           <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Lists the resolved dependencies for packages in the project

ALIASES
  $ sfp dependency explain
```

*See code:* [*src/commands/org/dependency/explain.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org dependency install`

Install all the external dependencies of a given project

```
USAGE
  $ sfp org dependency install -o <value> -v <value> [--json] [-k <value>] [-r <value>] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -k, --installationkeys=<value>      Installation key for key-protected packages (format is packagename:key -->
                                      core:key nCino:key vlocity:key to allow some packages without installation key)
  -o, --targetusername=<value>        (required) Username or alias of the target org.
  -r, --releaseconfig=<value>         Path to the config file which determines which external dependency are being
                                      installed based on packages in release config
  -v, --targetdevhubusername=<value>  (required) Username or alias of the Dev Hub org.
      --loglevel=<option>             [default: info] logging level for this command invocation
                                      <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Install all the external dependencies of a given project

ALIASES
  $ sfp dependency install
```

*See code:* [*src/commands/org/dependency/install.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org dependency shrink`

Shrink the dependency list in sfdx-project.json file for each package, remove duplicate dependencies that already exist in its dependent packages

```
USAGE
  $ sfp org dependency shrink -v <value> [--json] [-o] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -o, --overwrite                     Flag to overwrite existing sfdx-project.json file
  -v, --targetdevhubusername=<value>  (required) Username or alias of the Dev Hub org.
      --loglevel=<option>             [default: info] logging level for this command invocation
                                      <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Shrink the dependency list in sfdx-project.json file for each package, remove duplicate dependencies that already
  exist in its dependent packages

ALIASES
  $ sfp dependency shrink
```

*See code:* [*src/commands/org/dependency/shrink.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org dev create`

Provision a developer with a new admin user in the target org

```
USAGE
  $ sfp org dev create -e <value> -o <value> [--json] [-r] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -e, --email=<value>                 (required) Email address for the new user.
  -o, --requiredUserNameFlag=<value>  (required) Username or alias of the target org.
  -r, --resetInvokedUser              If the user creation fails, reset the password for the invoked user
      --loglevel=<option>             [default: info] logging level for this command invocation
                                      <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Provision a developer with a new admin user in the target org

  Start a user create process for a given email address.

ALIASES
  $ sfp org create user
  $ sfp dev create

EXAMPLES
  $ sfp dev:create -o MyOrg -e mymail@gmail.com
```

*See code:* [*src/commands/org/dev/create.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org dev grant`

Grant a developer a specific access level in an environment

```
USAGE
  $ sfp org dev grant --dev <value> -o <value> [--json] [-a <value> | -d] [-f <value> | -c <value>] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -a, --accesslevel=<value>    The access level to be be granted to the developer
  -c, --inline-config=<value>  Inline JSON configuration (alternative to --devConfig file)
  -d, --useDefault             Use the default access level defined in the configuration,useful for de-elevation
  -f, --devConfig=<value>      [default: config/devconfig.yml] The path to the dev configuration file
  -o, --targetorg=<value>      (required) Username or alias of the target org.
      --dev=<value>            (required) The username of the developer
      --loglevel=<option>      [default: info] logging level for this command invocation
                               <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Grant a developer a specific access level in an environment

ALIASES
  $ sfp dev grant
```

*See code:* [*src/commands/org/dev/grant.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org flow activate`

Activate the flow on a target org

```
USAGE
  $ sfp org flow activate -o <value> [--json] [-f <value>] [-p <value>] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -f, --developername=<value>    The developer name of the flow
  -o, --targetorg=<value>        (required) Username or alias of the target org.
  -p, --namespaceprefix=<value>  Use to specify a specific namespace prefix
      --loglevel=<option>        [default: info] logging level for this command invocation
                                 <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Activate the flow on a target org

ALIASES
  $ sfp flow activate
```

*See code:* [*src/commands/org/flow/activate.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org flow cleanup`

Cleanup inactive flows on a target org

```
USAGE
  $ sfp org flow cleanup -o <value> [--json] [-f <value>] [-p <value>] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -f, --developername=<value>    The developer name of the flow
  -o, --targetorg=<value>        (required) Username or alias of the target org.
  -p, --namespaceprefix=<value>  Use to specify a specific namespace prefix
      --loglevel=<option>        [default: info] logging level for this command invocation
                                 <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Cleanup inactive flows on a target org

ALIASES
  $ sfp flow cleanup
```

*See code:* [*src/commands/org/flow/cleanup.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org flow deactivate`

Deactivate the flow on a target org

```
USAGE
  $ sfp org flow deactivate -o <value> [--json] [-f <value>] [-p <value>] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -f, --developername=<value>    The developer name of the flow
  -o, --targetorg=<value>        (required) Username or alias of the target org.
  -p, --namespaceprefix=<value>  Use to specify a specific namespace prefix
      --loglevel=<option>        [default: info] logging level for this command invocation
                                 <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Deactivate the flow on a target org

ALIASES
  $ sfp flow deactivate
```

*See code:* [*src/commands/org/flow/deactivate.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org list`

List all Salesforce orgs available locally and optionally from server

```
USAGE
  $ sfp org list [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url <value>] [-g
    <value>...] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] [--type
    devhub|scratch|sandbox|other] [--all] [--clean] [--server-only | --local-only] [--include-auth-url]

FLAGS
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -t, --application-token=<value>   Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                    (CLI flags take precedence over env vars).
      --all                         Include expired and deleted scratch orgs
      --clean                       Remove authorizations for inactive orgs
      --include-auth-url            Include sfdxAuthUrl in the output (requires owner role on server)
      --local-only                  Show only local orgs (excludes server orgs even when server flags provided)
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --repository=<value>          The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                    for Azure DevOps
      --server-only                 Show only orgs registered on the server (excludes local orgs)
      --sfp-server-url=<value>      URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                    config:set server-url
      --type=<option>               Filter organizations by type (devhub, scratch, sandbox, other)
                                    <options: devhub|scratch|sandbox|other>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  List all Salesforce orgs available locally and optionally from server

EXAMPLES
  $ sfp org list

  $ sfp org list --all

  $ sfp org list --type devhub

  $ sfp org list --sfp-server-url <server-url> --email admin@example.com

  $ sfp org list --sfp-server-url <server-url> --email admin@example.com --server-only

  $ sfp org list --sfp-server-url <server-url> --email admin@example.com --local-only

  $ sfp org list --clean
```

*See code:* [*src/commands/org/list.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org login`

Authenticate to an org using auth url either from a file or from sfp server,

```
USAGE
  $ sfp org login [--json] [-f <value>] [-u <value>] [--access-token <value> --instance-url <value>] [-o
    <value> --server] [--default-devhub ] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url <value>]
    [-d] [-s] [-w] [-a <value>] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -a, --alias=<value>              Alias for the org.
  -d, --set-default-dev-hub        Set the authenticated org as the default Dev Hub.
  -e, --email=<value>              Email address for authenticated user. Ignored if --application-token is provided. Can
                                   be set via SFP_SERVER_USER env var.
  -f, --url-file=<value>           Path to a file that contains the Salesforce DX authorization URL.
  -o, --username=<value>           The username of the org to be fetched from the server, when server mode is used
  -s, --set-default                Set the authenticated org as the default that all org-related commands run against.
  -t, --application-token=<value>  Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                   (CLI flags take precedence over env vars).
  -u, --url-stdin=<value>          Specify '-' as this flag's value to pipe the Salesforce DX authorization URL through
                                   standard input (stdin).
  -w, --write-file                 Write the results of the org into org_details.json, Please note this is sensitive and
                                   contains access token, so please
                                   ensure it is deleted
      --access-token=<value>       Salesforce access token for direct authentication. Use this with --instance-url to
                                   authenticate using a pre-generated access token instead of an sfdxAuthUrl.
      --default-devhub             Fetch the default DevHub from the server instead of specifying a username
      --instance-url=<value>       Salesforce instance URL (e.g., https://mycompany.my.salesforce.com). Required when
                                   using --access-token.
      --loglevel=<option>          [default: info] logging level for this command invocation
                                   <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --repository=<value>         The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                   for Azure DevOps
      --server                     Fetch authentication URL from the sfp server
      --sfp-server-url=<value>     URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                   config:set server-url

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Authenticate to an org using auth url either from a file or from sfp server,

  he sf authorization URL must have the format "force://<clientId>:<clientSecret>:<refreshToken>@<instanceUrl>". NOTE:
  The SFDX authorization URL uses the "force" protocol, and not "http" or "https". Also, the "instanceUrl" inside the
  SFDX authorization URL doesn't include the protocol ("https://").

  You have two options when creating the authorization file.

  You can create a JSON file that has a top-level property named sfdxAuthUrl whose value is the authorization URL.
  Finally, you can create a normal text file that includes just the URL and nothing else.

  The resulting JSON file contains the URL in the "sfdxAuthUrl" property of the "result" object. You can then reference
  the file when running this command:

  $ sfp org:login:url --url-file authFile.json

  Alternatively, you can pipe the SFDX authorization URL through standard input by using the --url-stdin flag and
  providing the '-' character as the value.

ALIASES
  $ sfp org login url

EXAMPLES
  $ sfp org login --url-file files/authFile.json

  $ sfp org login --access-token <token> --instance-url https://myorg.my.salesforce.com --alias myorg

  $ sfp org login --server --username user@example.com --sfp-server-url <url> --email admin@example.com

  $ sfp org login --server --default-devhub --sfp-server-url <url> --email admin@example.com
```

*See code:* [*src/commands/org/login.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org open`

Open your default scratch org, or another specified org, in a browser.

```
USAGE
  $ sfp org open -o <value> [--json] [--private | -b chrome|edge|firefox] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -b, --browser=<option>        Browser where the org opens. (chrome, edge, firefox)
                                Default is the standard browser.
                                <options: chrome|edge|firefox>
  -o, --targetusername=<value>  (required) Username or alias of the target org.
      --loglevel=<option>       [default: info] logging level for this command invocation
                                <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --private                 Open the org in the default browser using private (incognito) mode.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Open your default scratch org, or another specified org, in a browser.

EXAMPLES
  $ sfp org:open -o myTargetOrg
```

*See code:* [*src/commands/org/open.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org profile merge`

Merge changes made in the profile directly in the org to the profile files in the local project

```
USAGE
  $ sfp org profile merge -o <value> [--json] [-f <value>...] [-n <value>...] [-m <value>...] [-d] [--apiversion
    <value>] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -d, --delete                  set this flag to delete profile files that does not exist in the org.
  -f, --folder=<value>...       comma separated list of folders to scan for profiles. If ommited, the folders in the
                                packageDirectories configuration will be used.
  -m, --metadata=<value>...     comma separated list of metadata for which the permissions will be retrieved.
  -n, --profilelist=<value>...  comma separated list of profiles. If ommited, all the profiles found in the folder(s)
                                will be merged
  -o, --targetorg=<value>       (required) Username or alias of the target org.
      --apiversion=<value>      Override the api version used for api requests made by this command
      --loglevel=<option>       [default: info] logging level for this command invocation
                                <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Merge changes made in the profile directly in the org to the profile files in the local project

ALIASES
  $ sfp profile merge

EXAMPLES
  $ sfp profile:merge -o sandbox

  $ sfp profile:merge -f force-app -n "My Profile" -u sandbox

  $ sfp  profile:merge -f "module1, module2, module3" -n "My Profile1, My profile2"  -u sandbox
```

*See code:* [*src/commands/org/profile/merge.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org profile reconcile`

Reconcile profiles in the local directory only with the attributes that are available in the target org

```
USAGE
  $ sfp org profile reconcile -o <value> [--json] [-f <value>...] [-n <value>...] [-d <value>] [-s] [--apiversion <value>]
    [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -d, --destfolder=<value>      the destination folder for reconciled profiles, if omitted existing profiles will be
                                reconciled and will be rewritten in the current location
  -f, --folder=<value>...       path to the folder which contains the profiles to be reconciled,if project contain
                                multiple package directories, please provide a comma seperated list, if omitted, all the
                                package directories will be checked for profiles
  -n, --profilelist=<value>...  list of profiles to be reconciled. If ommited, all the profiles components will be
                                reconciled.
  -o, --targetorg=<value>       (required) Username or alias of the target org.
  -s, --sourceonly              set this flag to reconcile profiles only against component available in the project
                                only. Configure ignored perissions in sfdx-project.json file in the array
                                plugins->sfpowerkit->ignoredPermissions.
      --apiversion=<value>      Override the api version used for api requests made by this command
      --loglevel=<option>       [default: info] logging level for this command invocation
                                <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Reconcile profiles in the local directory only with the attributes that are available in the target org

ALIASES
  $ sfp profile reconcile

EXAMPLES
  $ sfp profile:reconcile  --folder force-app -d destfolder -s

  $ sfp profile:reconcile  --folder force-app,module2,module3 -o sandbox -d destfolder

  $ sfp profile:reconcile  -o myscratchorg -d destfolder
```

*See code:* [*src/commands/org/profile/reconcile.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org profile retrieve`

Retrieve profiles from the salesforce org with all its associated permissions. Common use case for this command is to migrate profile changes from a integration environment to other higher environments \[overcomes SFDX CLI Profile retrieve issue where it doesnt fetch the full profile unless the entire metadata is present in source], or retrieving profiles from production to lower environments for testing.

```
USAGE
  $ sfp org profile retrieve -o <value> [--json] [-f <value>...] [-n <value>...] [-d] [--apiversion <value>] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -d, --delete                  set this flag to delete profile files that does not exist in the org, when retrieving in
                                bulk
  -f, --folder=<value>...       retrieve only updated versions of profiles found in this directory, If ignored, all
                                profiles will be retrieved.
  -n, --profilelist=<value>...  comma separated list of profiles to be retrieved. Use it for selectively retrieving an
                                existing profile or retrieving a new profile
  -o, --targetorg=<value>       (required) Username or alias of the target org.
      --apiversion=<value>      Override the api version used for api requests made by this command
      --loglevel=<option>       [default: info] logging level for this command invocation
                                <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Retrieve profiles from the salesforce org with all its associated permissions. Common use case for this command is  to
  migrate profile changes from a integration environment to other higher environments [overcomes SFDX CLI Profile
  retrieve issue where it doesnt fetch the full profile unless the entire metadata is present in source], or retrieving
  profiles from production to lower environments for testing.

ALIASES
  $ sfp profile retrieve

EXAMPLES
  $ sfp profile:retrieve -o prod

  $ sfp profile:retrieve -f force-app -n "My Profile" -o prod

  $ sfp profile:retrieve -f "module1, module2, module3" -n "My Profile1, My profile2"  -o prod
```

*See code:* [*src/commands/org/profile/retrieve.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org retrieve by-name`

Retrieve metadata from a Salesforce org by type and name.

```
USAGE
  $ sfp org retrieve by-name -m <value> -n <value> -o <value> [--json] [--repository <value>] [-e <value>] [-t <value>]
    [--sfp-server-url <value>] [-d <value>] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -d, --output-dir=<value>         Directory to write retrieved files to. Defaults to current directory.
  -e, --email=<value>              Email address for authenticated user. Ignored if --application-token is provided. Can
                                   be set via SFP_SERVER_USER env var.
  -m, --metadata-type=<value>      (required) Salesforce metadata type to retrieve (e.g., ApexClass, CustomObject,
                                   LightningComponentBundle).
  -n, --member-name=<value>        (required) Name of the metadata component to retrieve.
  -o, --targetusername=<value>     (required) Username or alias of the target org.
  -t, --application-token=<value>  Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                   (CLI flags take precedence over env vars).
      --loglevel=<option>          [default: info] logging level for this command invocation
                                   <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --repository=<value>         The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                   for Azure DevOps
      --sfp-server-url=<value>     URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                   config:set server-url

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Retrieve metadata from a Salesforce org by type and name.

ALIASES
  $ sfp retrieve by-name
  $ sfp retrieve

EXAMPLES
  $ sfp org retrieve by-name -m ApexClass -n MyController -o myOrg

  $ sfp org retrieve by-name -m CustomObject -n Account -o myOrg --output-dir /tmp/retrieve

  $ sfp org retrieve by-name -m ApexClass -n MyController -o myOrg --json
```

*See code:* [*src/commands/org/retrieve/by-name.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org retrieve metadata`

Discover and retrieve all metadata from a Salesforce org. Describes types, lists components, then retrieves source files in bulk.

```
USAGE
  $ sfp org retrieve metadata -o <value> [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url
    <value>] [--type-filter <value>] [-d <value>] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -d, --output-dir=<value>         Directory to write retrieved files to.
  -e, --email=<value>              Email address for authenticated user. Ignored if --application-token is provided. Can
                                   be set via SFP_SERVER_USER env var.
  -o, --targetusername=<value>     (required) Username or alias of the target org.
  -t, --application-token=<value>  Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                   (CLI flags take precedence over env vars).
      --loglevel=<option>          [default: info] logging level for this command invocation
                                   <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --repository=<value>         The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                   for Azure DevOps
      --sfp-server-url=<value>     URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                   config:set server-url
      --type-filter=<value>        Comma-separated list of metadata types to limit the sync (e.g.,
                                   ApexClass,ApexTrigger).

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Discover and retrieve all metadata from a Salesforce org. Describes types, lists components, then retrieves source
  files in bulk.

EXAMPLES
  $ sfp org retrieve metadata -o myOrg

  $ sfp org retrieve metadata -o myOrg --type-filter ApexClass,ApexTrigger

  $ sfp org retrieve metadata -o myOrg --output-dir /tmp/metadata --json
```

*See code:* [*src/commands/org/retrieve/metadata.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org user deactivate`

Deactivate users for an org.

```
USAGE
  $ sfp org user deactivate -o <value> [--json] [-a <value>] [-e <value>] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -a, --alias=<value>                 Alias for a specific user to deactivate.
  -e, --exclude=<value>               Exclude usernames from deactivation.
  -o, --requiredUserNameFlag=<value>  (required) Username or alias of the target org.
      --loglevel=<option>             [default: info] logging level for this command invocation
                                      <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Deactivate users for an org.

  Set for all users the status inactive.

ALIASES
  $ sfp user deactivate

EXAMPLES
  $ sfp user:deactivate -o MyOrg
```

*See code:* [*src/commands/org/user/deactivate.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org user freeze`

Freeze users for an org.

```
USAGE
  $ sfp org user freeze -p <value> -o <value> [--json] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -o, --targetusername=<value>  (required) Username or alias of the target org.
  -p, --profiles=<value>        (required) A list of profiles to freeze the users. Excludes "System Administrator".
      --loglevel=<option>       [default: info] logging level for this command invocation
                                <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Freeze users for an org.

  Set for all given profiles and login users the status "IsFrozen".

ALIASES
  $ sfp user freeze

EXAMPLES
  $ sfp user:freeze -p "Base Profile" -o MyOrg
```

*See code:* [*src/commands/org/user/freeze.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp org user unfreeze`

Unfreeze users for an org.

```
USAGE
  $ sfp org user unfreeze -p <value> -o <value> [--json] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -o, --targetusername=<value>  (required) Username or alias of the target org.
  -p, --profiles=<value>        (required) A list of profiles to unfreeze the users.
      --loglevel=<option>       [default: info] logging level for this command invocation
                                <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Unfreeze users for an org.

  Set for all given profiles and login users the status "IsFrozen" to false.

ALIASES
  $ sfp user unfreeze

EXAMPLES
  $ sfp user:unfreeze -p "Base Profile" -o MyOrg
```

*See code:* [*src/commands/org/user/unfreeze.ts*](https://source.flxbl.io/flxbl/sfp-pro)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flxbl.io/flxbl/sfp/sfp-community/cli-reference-v51-release-v3/advanced/org.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
