I have a question regarding including a Connected App in a managed package, when this app is installed on multiple orgs does the Connected App keep the Original consumerKey? or is a new one generated per environment?

When i try do push my package to a scratch org i need to remove the consumerKey tag from the meta so this would suggest it needs to be unique, however iv have been doing some reading as well as asking phindand there seems to be conflicting answers on this.

1 Answer 1


You'll want to check out Package Connected Apps in Second-Generation Managed Packaging for more information. In summary, though, you need to create a 1GP, create the Connected App in the Packaging Org, then you can use it correctly in your 2GP. If you don't have a 1GP, you'll need to do that, first. This should allow you to push/pull correctly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .