Is it possible to retrieve the consumer secret through the Metadata API for Salesforce for a connected app. It is listed as a property for the oathConfig but it always returns null?

1 Answer 1


It is a write-only field. It is exposed so that you can set whatever value you want for the secret (e.g. for migration to a new org, or to change a compromised secret). From a design philosophy, it is considered a password, and as such, cannot be retrieved for security reasons.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.