Error: Authorization failed: Principal has insufficient permissions

Hi All.

I am new to forge and created a forge app. When I’m trying to install it to my dev instance, it gives below error.

PS D:\Forge\Hello-world-forge> forge install
Select the product your app uses.

? Select a product: Jira

Enter your site. For example, your-domain.atlassian.net

? Enter the site URL: testappdev.atlassian.net

Installing your app onto an Atlassian site.
Press Ctrl+C to cancel.


Error: Authorization failed: Principal has insufficient permissions (requestId: 0143f3e7db644b07b6d067dd1bdb1412)

Rerunning the command with --verbose may give more details.

Can someone help me to fix this?

Thanks,
Roshinie

Hi @Roshinie_105953 !
You need to be Jira admin to be able to install a Forge app.
When Jira is created there is a default group which is named jira-admins-[your org name]. If your user is granted this group, then you should be good to install your Forge app.

Hi @alex_sam ,

I am an org admin of the site and was there in ‘org-admins’ group. Following your instructions, I have added myself to the ‘jira-admins-[site name]’ group also.

However, I am still encountering the following error:

Error: Authorization failed: Principal has insufficient permissions (requestId: 81c48636521146be98ecc11369fb20c4)

Hi @Roshinie_105953 ! Then it should work. The only thing I can think of that you are deploying your app under a different user. You can try:

forge whoami

to see if you are using the correct user

Hi @alex_sam,

I tried the suggested option, and you’re correct—it was initially associated with a different Atlassian account. After identifying this, I followed the steps below to log in using the correct account. However, I am still encountering the same permission error.

Steps Executed:

PS D:\Forge\Hello-world-forge> forge logout
:heavy_check_mark: Logged out.
PS D:\Forge\Hello-world-forge> forge login
Log in to your Atlassian account
Press Ctrl+C to cancel.

Next, enter your Atlassian API token. If you don’t have a token, visit this URL to create one:

? Enter your Atlassian API token: [hidden]

√ Logged in as Roshinie_105953.
Now try forge create to start a new app.
PS D:\Forge\Hello-world-forge> forge whoami
Logged in as Roshinie_105953 (myemail@xxxxx.com)
Account ID: xxxxxxxx
PS D:\Forge\Hello-world-forge> forge deploy

Error: Authorization failed: Principal has insufficient permissions (requestId: aeb42e2c27674669a3cd16e256217023)

Rerunning the command with --verbose may give more details.

@Roshinie_105953 since you logged in under a different user, you need either to grant permissions to your user for the app in the atlassian developer console (Developer console) or execute

forge register

Forge register will create a new app which will be associated with your user. It will change the id: parameter in your manifest file. If you still need the old id for the previous app then save this id somewhere.

then deploy your app again and install

Thanks @alex_sam . You’re correct. My app has been developed using a different user. Now, I got it.