1

I get an error while trying to create a package version with this command

sfdx force:package:version:create -p MySalesforcePackage -d force-app -k MyPassWord --wait 10 -v DevHub

This is the arror. It was created as an Unmanaged Package

ERROR:  MyConnectedAppApiName: Installing an app (MyConnectedAppApiName) that has been deleted.

This is the connected App inside the folder force-app/main/defult/connectedApps

<?xml version="1.0" encoding="UTF-8"?>
<ConnectedApp xmlns="http://soap.sforce.com/2006/04/metadata">
<contactEmail>fabrizio@mysite.com</contactEmail>
<description>Connected App</description>
<label>My App</label>
<oauthConfig>
    <callbackUrl>https://myappsite.com/salesforce/setup</callbackUrl>
    <scopes>Full</scopes>
    <scopes>RefreshToken</scopes>
</oauthConfig>
</ConnectedApp>
4

So i found out what the problem is Connected Apps are not available in Unmanaged Packages, they are available in managed Packages.

  • Thank you for the confirmation. – Aayush K Feb 27 at 21:18
  • Thanks, Is it possible to add connected app in unlocked package. I am getting same error when creating unlocked package. – lambad May 8 at 6:41
  • An unlocked package without a namespace is similar to the old style of unmanaged package. So you will have the same problem @lambad – FabriR May 23 at 16:40
1

To reconfirm after spending way too many hours researching: No

Page 40 from "Package and Distribute Your Apps" spring 19 Connected Apps • Connected apps can be added to managed packages, only. Connected apps are not supported for unmanaged packages.

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.