Skip to main content

Authentication profiles

Manage multiple API keys with named authentication profiles
Authentication profiles allow you to manage multiple App Store Connect API keys and switch between them easily.

Overview

Profiles are stored in the configuration file (~/.asc/config.json or .asc/config.json) and can reference credentials from the keychain or config file.

Creating profiles

Use the --name flag with asc auth login to create a named profile:
This stores the credentials in the keychain (or config file as fallback) with the name “PersonalApp”.

Using profiles

Switch between profiles using the --profile flag or ASC_PROFILE environment variable:

Switching profiles

Use asc auth switch to change the default profile:
This updates the default_key_name field in your config file.

Listing profiles

View your current authentication status and available profiles:
Example output:

Config file structure

Profiles are stored in ~/.asc/config.json:
Private keys are stored in the keychain when available. The config file only stores references (key ID, issuer ID, and path).

Local vs global config

The CLI supports both global and local (project-specific) configuration:
  • Global config: ~/.asc/config.json (used by default)
  • Local config: .asc/config.json in your project directory
Local configs take precedence over global configs. This is useful for project-specific API keys:
Now all commands run from this directory will use the project-specific key by default.

Credential resolution order

When you run a command, credentials are resolved in this order:
  1. --profile flag (highest priority)
  2. ASC_PROFILE environment variable
  3. Default profile from config (default_key_name)
  4. Unnamed credentials from config or environment variables
  5. Keychain (if no profile specified)
Use ASC_STRICT_AUTH=true to fail when credentials are found in multiple sources. This helps prevent accidental credential mixing.

Profile management commands

Create a new profile

Switch to a different profile

View current profile and status

Remove a profile

Remove all profiles

Example workflows

Multiple client projects

CI/CD with profile selection

Testing with staging vs production keys

Troubleshooting

Profile not found

If you see “profile not found” errors:
  1. Check available profiles: asc auth status
  2. Verify the profile name matches exactly (case-sensitive)
  3. Ensure the config file exists: cat ~/.asc/config.json

Multiple credential sources

If credentials are found in multiple places:

Keychain access denied

On macOS, if you encounter keychain access errors:

Authentication

Learn about authentication methods

Environment variables

Configure with environment variables