Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

"You don't have permission to create issue in this project" when trying to create issue

Haziq Izzat March 22, 2022 edited

Hello, I'm trying to create issue with Jira Cloud Rest API, but I'm not sure why I got this error. Even though I'm an admin on that project. I'm really confuse right now. Last time it success to create the issue, but today it didn't success.

 

{
        fields: {
            project: {
                key'WT'
            },
            summary'I\'m not sure.',
            description: {
                type'doc',
                version1,
                content: [
                    {
                        type'paragraph',
                        content: [
                            {
                                text'Test create issue.',
                                type'text'
                            }
                        ]
                    }
                ]
            },
            issuetype: {
                name'Task'
            }
        }
    }

Screenshot 2022-03-23 122139.png

2 answers

1 vote
Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 23, 2022

Being an admin seems to be a MAJOR MISCONCEPTION with new users. Jira uses the permission scheme assigned to the project to determine what a user can do in the project. A security model where just being an admin gives you rights to everything is a BAD MODEL and would never pass a valid security audit. If you're a JIra admin you can look at the permission scheme assigned to the project and see what roles can create issues. 

Haziq Izzat March 23, 2022

I'm using default permissions scheme.

2022-03-24_07-19.png

Haziq Izzat March 23, 2022 edited

Here is my Permissions Scheme, but I can create from Postman lol. I don't know its because of my Code is wrong or something else.


Screenshot 2022-03-24 145849.png

Haziq Izzat March 24, 2022

I just fixed the problem, there's something problem with my code which make that error appear lol. 🤦🏼‍♂️

Like Ricardo Lima likes this
Raihan Choudhury
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 12, 2022

@Haziq Izzat  Could you please update the working code. I am also facing the same issue

Like Tauwa likes this
Tauwa
Contributor
April 14, 2022

@Haziq Izzat yes please update the code. Facing the same issue too

Kasper Shwahla
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 21, 2022

Was anyone able to resolve the issue? I am having the same problem.

Haziq Izzat July 21, 2022 edited

I can't remember what I had change to the code, I think I missing scope for Auth, try to compare these scope with yours.

 

read:application-role:jira, read:issue-meta:jira, read:issue-security-level:jira, read:issue.vote:jira, read:issue.changelog:jira, read:avatar:jira, read:issue:jira, read:status:jira, read:user:jira, read:field-configuration:jira, read:issue-event:jira, write:issue:jira, write:comment:jira, write:comment.property:jira, write:attachment:jira

Like Ricardo Lima likes this
Kasper Shwahla
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 22, 2022

Thank you @Haziq Izzat . Were you trying to access the Jira API through an Atlassian app? I am trying to access it through an outside integration platform. Would changing the scopes still apply? 

Haziq Izzat July 25, 2022

@Kasper Shwahla Did you mean by "outside integration platform" is your own application?... if yes, I'm doing the same thing

Subodh Kumar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 10, 2023 edited

@Haziq Izzat Were you able to solve this problem? I am facing the same issue when I try to create an issue through my Python script.

I am constantly facing the below error, (I tried through Postman as well, got the same error)

jira.exceptions.JIRAError: JiraError HTTP 404 url: https://subodh.atlassian.net/rest/api/2/project/TTS
text: No project could be found with key 'TTS'.

response headers = {'Date': 'Sun, 11 Jun 2023 05:19:13 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Server': 'AtlassianEdge', 'Timing-Allow-Origin': '*', 'X-Arequestid': '9743337f28d7b797a480103ce89ab02d', 'X-Seraph-Loginreason': 'AUTHENTICATED_FAILED', 'Cache-Control': 'no-cache, no-store, no-transform', 'Content-Encoding': 'gzip', 'X-Content-Type-Options': 'nosniff', 'X-Xss-Protection': '1; mode=block', 'Atl-Traceid': '90699ad459c4c7c1', 'Report-To': '{"endpoints": [{"url": "https://dz8aopenkvv6s.cloudfront.net"}], "group": "endpoint-1", "include_subdomains": true, "max_age": 600}', 'Nel': '{"failure_fraction": 0.001, "include_subdomains": true, "max_age": 600, "report_to": "endpoint-1"}', 'Strict-Transport-Security': 'max-age=63072000; includeSubDomains; preload', 'Transfer-Encoding': 'chunked'}
response text = {"errorMessages":["No project could be found with key 'TTS'."],"errors":{}}

 

Here is my implementation:

 

try:
jira = JIRA('https://subodh.atlassian.net', basic_auth=('ksu11111@gmail.com', '1234566'))
except RequestException as e:
print('Response from jira: ' + str(jira))


# Create the JIRA issue
new_issue = jira.create_issue(project=project_key,
summary=summary,
description=description,
issuetype={'name': issue_type},
assignee={'name': assignee})

 

However when I log in to Jira and try creating an issue manually in TTS project. I am able to create it without any issues.

Also, when I hit the URL 'subodh.atlassian.net/rest/api/2/project/TTS' in the browser, I get details of the TTS project back.

Like moritada iseki likes this
Subodh Kumar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 12, 2023 edited

I am able to solve this issue, the problem is that you have to use the API token in basic auth instead of password. Here is the procedure for the benefit of everyone.

 

Create your token here: https://id.atlassian.com/manage-profile/security/api-tokens

 

Jira_Issue.png

Here is the body of the post-call:

 

{
    "fields": {
        "summary""This is the summary of the ticket",
        "issuetype": {
            "name""Task"
        },
        "project": {
            "key""TTS"
        },
        "description": {
            "type""doc",
            "version"1,
            "content": [
                {
                    "type""paragraph",
                    "content": [
                        {
                            "text""Description - Ticket for the TTS ",
                            "type""text"
                        }
                    ]
                }
            ]
        }
    }
}

 

You can refer to this video also, its very helpful: https://www.youtube.com/watch?v=pcNqjBlhipU&feature=youtu.be&ab_channel=HongLyTech

Like 4 people like this
Ayush Patil
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 16, 2024 edited

Issue: I was facing a similar issue with jira, through postman I was able to create the issue. But when using the same creds through python, it raised this exception 

You do not have Permission to create issues in the Project

 

Fix: Something is wrong with your payload or your code and is most likely isn't an issue with access to that specific project

I was able to succesfully create the issue after fixing some issues with my code

Like Robert likes this
0 votes
Siphokazi Tshiza
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 12, 2025

Administrator needs to give you permissions 

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events