3

I've created a managed package and included a connected app into it. Say its name is 'MyConnectedApp'.

My target org already contains a local connected app, also called 'MyConnectedApp'. So when I try to install my package to the target org I get the error:

(MyConnectedApp) duplicate value found: <unknown> duplicates value on record with id: <unknown>, Details: MyConnectedApp: duplicate value found: <unknown> duplicates value on record with id: <unknown> 

Any other component of the package (Objects, fields, classes etc...) does have a namespace prefix, why Connected apps don't?

  • Connected App need not be part of a package for a user to allow access to it and therefore primarily it is not packaged in a managed package but if in your case if you need to package it in a managed package as a creator of managed package you can do so. Check this link out [developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/… salesforce does it for its trailhead apps etc and so can you. – Mitesh Jan 27 at 11:19
2

Connected Apps are different than other packaged assets. Any User can run a Connected App and then it will appear in the list of Connected Apps and it can be managed by an Admin. So the short answer is that Connected Apps are a global resource available to any Org. They don't have a namespace because they are not local to the Package. They live in the dev Org. I don't recommend packaging them, or at least I am unsure why you would need to do that.

| improve this answer | |
  • 1
    Historically, packaging a Connected App was the only way to get it in to subscriber orgs. This hasn't been true for years now, though. – sfdcfox Jan 27 at 15:43
  • This app is actually a canvas app (I'm quite confused in terms). It is shown up in a VF page using <apex:canvasApp>. I also supposed that consumer secret and key should remain the same with every installed copy, right? – Maximus Jan 27 at 17:47
  • You can expose your connected app as a canvas app. Canvas apps are available as apps that your org’s Salesforce admin install or as personal apps that users install across orgs: help.salesforce.com/… – Bill Appleton Jan 27 at 23:07
  • Yes, I know I can expose a connected app as a canvas app. But here is the thing: I developed a package containig a vf-page that shows the canvas app. This canvas app uses a Signed Request access method to communicate with the app-host. I see the user flow like: 1) Install the package, 2) visit the VF page 3) Work with the app in that VF page. But if the app is NOT in the package how is that supposed to work? – Maximus Jan 28 at 3:22
  • You might need a new question as this topic has drifted. But does the VF page direct the user to log in to the connected app? The connected app is in your dev org and doesn't need to be in a package. – Bill Appleton Jan 28 at 14:58

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.