I am getting the below error when I deploy connected app using ANT. Do you guys have any idea, why this error occurs and whats the solution to migrate via ANT.

Error: The consumer key is already taken

Thanks, Syed

1 Answer 1


According to the ConnectedApp Metadata API documentation, each connected app must have a unique consumerKey value.

One way to deploy your connected app is to remove the consumerKey from the .connectedApp xml file. When this component deploys in the new org, a new consumerKey will be automatically generated.

Another option is to create the connected app in one org (your target org, if possible) and access it from other orgs using its connected app details.

  • Is there documentation on how to access one org's connectedApp in another org so the secret key doesn't change?
    – paulie4
    Feb 19, 2018 at 19:16
  • Any update on this how to share connected app in different development orgs? May 17, 2018 at 22:08
  • <consumerKey></consumerKey> works fine.
    – shyam
    Jun 7, 2023 at 5:47

You must log in to answer this question.

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