We have two SF orgs SF1 and SF2. In SF1, we create a connected app, uploaded a digital certificate, and have policy of 'Admin Authorized user'. We added the needed profile. The client is able to connect via JWT token to SF1. Connecting to SF2 with same client id yields the error 'Missing Consumer Key Parameter' The client is using the same private key to sign the token. Also, the user belongs to the same profile in SF2. We are able to connect with Username Password flow to SF2. Will the same connected app not work in a different environment?
1 Answer
Connected Apps in general work in any org (e.g. see the Data Loader, SFDX, etc). However, JWT-based flows need a Connected App per org, as far as I can tell. See for example Authorize an Org Using the JWT-Based Flow.