Forums

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

Create a User via the API

Luiz SSO PUBLIC January 23, 2023

Hi, I'm creating a script to create a customer through the JSD API
I'm having a hard time creating the custumer, when the API returns I'm getting the following error "insufficient permission to perform requested action, JIRA Administrators global permission is required." But I already gave all permissions and the error persists.

image.png

image.png

1 answer

1 vote
Mikael Sandberg
Community Champion
January 23, 2023

Hi @Luiz SSO PUBLIC,

Welcome to Atlassian Community!

The user that you are using the the authentication when sending the end point has to be part of one of the groups that you have given global Jira permissions to. Your header in the call needs to include 'Authorization: Bearer <access_token>' or 'Authorization: Basic <user_email:api_token>'

Luiz SSO PUBLIC January 23, 2023

Hi, now I'm getting this return, but I'm wanting to create a new client "customer"image.png

Mikael Sandberg
Community Champion
January 23, 2023

That means that the authentication isn't working. Try using 'Authorization: Basic <user_email:api_token>' instead of Bearer to see if that works. 

Luiz SSO PUBLIC January 23, 2023

Basic authentication with passwords is deprecated. For more information, see

image.png

Mikael Sandberg
Community Champion
January 23, 2023

You should use an API token instead of a password. If you do not have a token already, go to https://id.atlassian.com/manage-profile/profile-and-visibility and from there go to security and generate one. It is recommended that you base64 it once you have gotten it to work.

Luiz SSO PUBLIC January 23, 2023

I generated a token in the profile, even in these images I'm using the token. Bearer 5aT4JXQq8gQEr7SLyT6VFD1E

Luiz SSO PUBLIC January 24, 2023

I managed to solve the problem, I'm using "Insomnia" with this I was creating cookies, I had to delete the cookies generated with this it worked perfectly.

Like Mikael Sandberg likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events