- CLI flags (
--domain example.com) - Environment variables (
BATON_DOMAIN=example.com) - Config files (YAML)
Standard flags (all connectors)
Every connector automatically has these flags via the SDK.Output and logging
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--file | -f | string | sync.c1z | Output file path |
--log-level | string | info | debug, info, warn, error | |
--log-format | string | auto | json or console (auto-detects TTY) |
Daemon mode (service)
| Flag | Type | Description |
|---|---|---|
--client-id | string | ConductorOne OAuth client ID (enables daemon mode) |
--client-secret | string | ConductorOne OAuth client secret |
--skip-full-sync | bool | Disable full sync in daemon mode |
Provisioning operations
| Flag | Type | Description |
|---|---|---|
--provisioning | bool | Enable provisioning mode |
--grant-entitlement | string | Entitlement ID to grant |
--grant-principal | string | Resource ID receiving grant |
--grant-principal-type | string | Resource type of principal |
--revoke-grant | string | Grant ID to revoke |
Account management
| Flag | Type | Description |
|---|---|---|
--create-account-login | string | Login for new account |
--create-account-email | string | Email for new account |
--create-account-profile | string | JSON profile data |
--delete-resource | string | Resource ID to delete |
--delete-resource-type | string | Resource type to delete |
--rotate-credentials | string | Resource ID for rotation |
--rotate-credentials-type | string | Resource type for rotation |
Targeted sync
| Flag | Type | Description |
|---|---|---|
--sync-resources | []string | Specific resource IDs to sync |
--sync-resource-types | []string | Resource types to sync |
--skip-entitlements-and-grants | bool | Skip E&G during sync |
--skip-grants | bool | Skip only grants |
Opentelemetry (operators)
| Flag | Type | Description |
|---|---|---|
--otel-collector-endpoint | string | OTEL collector URL |
--otel-tracing-disabled | bool | Disable tracing |
--otel-logging-disabled | bool | Disable OTEL logging |
Environment variables
All flags map to environment variables with theBATON_ prefix:
- Prefix:
BATON_ - Dashes become underscores:
--base-dn->BATON_BASE_DN - Case insensitive:
BATON_DOMAIN=baton_domain
Config file format
Connectors can read YAML config files:- Path specified via
--configflag ./baton.yaml~/.baton/config.yaml
Field types
When building a connector, you define fields using these types:StringField
--domain example.okta.com
Env: BATON_DOMAIN=example.okta.com
BoolField
--ldaps or --ldaps=true
Env: BATON_LDAPS=true
IntField
--port 636
Env: BATON_PORT=636
StringSliceField
--skip-groups "Group1" --skip-groups "Group2"
Env: BATON_SKIP_GROUPS="Group1,Group2"
SelectField (enum)
--auth-type oauth
Field options
Required fields
required flag "api-key" not set
Secret fields
- Not printed in debug logs
- Masked as
***in GUI - Stored securely in config
Default values
Hidden fields
Shorthand flags
Validation rules
String validation
Integer validation
Field relationships
Required together
Both must be provided or neither:Mutually exclusive
Only one can be provided:At least one required
Dependent fields
Configuration precedence
When the same setting is specified multiple ways:Quick reference
Common patterns
| Use Case | Flags |
|---|---|
| Debug sync | --log-level debug |
| Custom output | -f /path/to/output.c1z |
| Daemon mode | --client-id ID --client-secret SECRET |
| Targeted sync | --sync-resource-types user,group |
| Test provisioning | -p --grant-entitlement ENT --grant-principal PRIN |