In some instances, importing a downloaded ArcGIS Web AppBuilder app or template of an organization to another organization fails, and returns the following error message:
Error: Failed to import the app.This app can only be imported by users of portal://< portal URL>
The error is returned when the portal URL referenced in the config.json file of the imported app or template does not match the portal URL of the new organization used to sign in to the ArcGIS Web AppBuilder app when importing from one organization to another.
To resolve the error, modify the portal URL in the config.json file of the downloaded app or template to reference the portal URL used by the organization to access ArcGIS Web AppBuilder (Developer Edition).
Note: A list of specified portal URLs is available in the signininfo.json file located in the /server directory of the ArcGIS Web AppBuilder installation folder.
Note: Starting at version 2.17, this workflow leads to an Invalid App error after modifying the files and importing the app. To avoid this error, do not unzip the application folder to make the edits. Use software like 7zip to edit the files without unzipping them.