Skip to main content

ory update oauth2-config

ory update oauth2-config

Update Ory Cloud project's OAuth2 service configuration


Updates your Ory Cloud project's OAuth2 service configuration. All values of the OAuth2 service will be overwritten. To update individual settings use the patch command instead.

Compared to the update project command, this command only updates the OAuth2 service configuration and also only returns the OAuth2 service configuration as a result. This command is useful when you want to import an Ory Keto config as well, for example.

The full configuration payload can be found at:

This command expects the contents of the /services/oauth2/config key, so for example:

"namespaces": [
"name": "files",
"id": 2
// ...
ory update oauth2-config <project-id> [flags]


$ ory update oauth2-config ecaaa3cb-0730-4ee8-a6df-9553cdfeef89 \
--file /path/to/config.json \
--file /path/to/config.yml \
--file \
--file base64://<json> \
--format json

"oauth2": {
"pkce": {
"enabled": true
// ...

$ ory update oauth2-config ecaaa3cb-0730-4ee8-a6df-9553cdfeef89 \
--file /path/to/keto-config.yaml \
--format yaml

enabled: true
# ...


  -f, --file strings    Configuration file(s) (file://config.json,, ...) to update the oAuth2 config
--format string Set the output format. One of default, json, yaml, and json-pretty. (default "default")
-h, --help help for oauth2-config

Options inherited from parent commands

  -c, --config string   Path to the Ory Cloud configuration file.
-q, --quiet Be quiet with output printing.
-y, --yes Confirm all dialogs with yes.