Cannot deploy forge app created by different user: Error: Authorization failed: Principal has insufficient permissions

I created a new Forge app and successfully deployed and installed it. After that, I shared my app with my friend. When he tried to log in to his account and deploy the app using ‘forge deploy,’ we encountered the following error. Below is my ‘manifest.yml’ file

modules:
  jira:issueGlance:
    - key: test-app-2023-hello-world-glance
      resource: main
      resolver:
        function: resolver
      viewportSize: medium
      title: Test-app-2023
      label: Custom UI
  function:
    - key: resolver
      handler: index.handler
resources:
  - key: main
    path: static/hello-world/build
app:
  id: ari:cloud:ecosystem::app/f20ba300-ceb6-41b2-be74-b8aa670a2ae5
2 Likes

@NirodhaWickramarathn,

There are 2 possible solutions:

1. Your friend can “register” as a new app

Your friend runs forge register, then the normal lifecycle can continue and forge deploy should work. The register command is responsible for:

contacts an Atlassian service to register the specified app, sets the owner to the Atlassian accountId that is running the register command, and updates the manifest with a new app ID.

Use this approach if you and your friend are working separately, like a GitHub fork.

2. Make your friend a “contributor”

You use the developer console to add your friend as a contributor on the app. The documentation explains how to manage app contributors. You will remain the app’s owner. Use this option if your intent is to collaborate with your friend on building the app.

2 Likes