I am using Jira Cloud and trying to create issues via a .NET backend API. I am an Administrator in the Space.
My API token has all the necessary write scopes, including write:issue:jira, write:project:jira, etc.
The ProjectKey is AMP.
However, whenever I make a request, I get the following error:
You do not have permission to create issues in this project
Jira configuration (appsettings.json)
"Jira": {
"BaseUrl": "***",
"Email": "***",
"ApiToken": "***",
"ProjectKey": "***",
"IsCloudVersion": true
}Code example (JiraAppService)
var issueData = new
{
fields = new
{
project = new { key = _projectKey },
summary = summary,
description = description,
issuetype = new { name = issueType },
priority = string.IsNullOrWhiteSpace(priority) ? null : new { name = priority }
}
};
var request = new RestRequest("/rest/api/3/issue", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddJsonBody(issueData);
var response = await _jiraClient.ExecuteAsync(request);
if (!response.IsSuccessful)
{
throw new Exception(response.Content);
}My API token includes the following scopes:
delete:issue-adjustments:jira
delete:issue-link-type:jira
delete:issue-link:jira
write:issue:jira
write:project:jira
write:attachment:jira
write:comment:jira
write:priority-scheme:jira
write:project-role:jira
write:project-category:jira
write:workflow:jira
write:permission:jira
...
(all other write scopes relevant to Jira Cloud)Even though I am a Space Administrator and my API token has all relevant write scopes, I still get this error:
You do not have permission to create issues in this project
Could this be related to the difference between Space settings and Project settings?
What permissions are required at the project level for an API user to create issues?
Why would this error occur even if the user is an admin and the API token has correct scopes?
Welcome to the community.
Based on the error you don't have create permissions.
Check the permission scheme on the space (in case of a company managed project) and see if the role you are granted has the "create permission".
To simply check your permission, login to Jira, go to the space and presse the create button and try to create a new item in the space.
Hi @Adeel nikama and welcome,
please check that Administrator has Create Permission in the related Permission Scheme associated to your space.
Hope this helps,
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.