Authentication profiles
Manage multiple API keys with named authentication profilesAuthentication 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:
Using profiles
Switch between profiles using the--profile flag or ASC_PROFILE environment variable:
Switching profiles
Useasc auth switch to change the default profile:
default_key_name field in your config file.
Listing profiles
View your current authentication status and available profiles: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.jsonin your project directory
Credential resolution order
When you run a command, credentials are resolved in this order:--profileflag (highest priority)ASC_PROFILEenvironment variable- Default profile from config (
default_key_name) - Unnamed credentials from config or environment variables
- Keychain (if no profile specified)
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:- Check available profiles:
asc auth status - Verify the profile name matches exactly (case-sensitive)
- 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:Related
Authentication
Learn about authentication methods
Environment variables
Configure with environment variables