Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,360,220
Community Members
 
Community Events
168
Community Groups

Error after setup of API token-based authentication

Hi,

I have followed the instructions on how to setup the API token-based authentication. Updates were made in the Integration and My Settings.

However, I keep on getting the error....

Plugin "Jira_Cloud_REST" returned an error: Invalid user or password or insufficient permissions for the integration user (HTTP code 401). Please check the Jira User value in the Integration and/or User Settings has been configured correctly.

Could someone please help? All our TestRail users using the 'Push' link are completely annoyed as the integration to Jira is not working and have to create the defect manually.

I need a solution urgently for this newly introduced authentication that does not work on us at the moment.

4 answers

1 accepted

0 votes
Answer accepted

I was able to fix this by....

1. check if the user have another account.

2. delete the extra account

3. ask the user to logout

4. revoke the api token

5. regenerate the token

6. ask the user to re-login and check the integration between TestRail and Jira

 

Hope this help others.

How do I check if I have another account created

See if the user registered on a different name. It could be a user registered with his/her second or middle name. Or it could be the user used his/her initials when he registered.

Like AK likes this

 

you need to do one last thing to make it work. If you have multiple teammates working on Testrail, you should have each of them configure their own credentials by going to their user's settings under your name in the top right corner of my settings, in the settings tab. If you do not enter their own authentication credentials the integration will still work for them but the issue is if they push from Testaril to Jira this will be attributed to the user account associated with the fallback credentials. Once it's done the configuration is complete and you can start to use it without any issues.

Thanks 

Testrail.png

Hi AK,

In our case it is the account in TestRail. We use the TestRail to manage our test execution. In TestRail admin page, go to Users & Roles. Then search for that user who's having API issue. What I did was to delete the other user account -- e.g., couple of our users registered with 2 account.

After that, I asked them to revoke the previously setup API token in Jira. And then generate a new token to be copied in TestRail.

 

Hope this helps. 

Like AK likes this
Hendri I'm New Here Mar 30, 2022

Hi, Zaldy 

are you have solve about your problem of integration testrail with jira ? because I got the same problem like you.

 

can you help me ?

 

Thank you

Like Pradeep Srinivasan likes this

I got a solution on this link
https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/ 
shared by @Pradeep Srinivasan 

  1. Revoke all the current tokens on Jira 
  2. Create new token on Jira 
  3. On Testrail navigate to Administration>>>Integration>>>User variable.
  4. Click on edit on Jira email row.
  5. Append the email with the email that created the new token.
  6. Edit the Jira token row and replace it with the new token on step two.
  7. Click on save button.

At least this worked from my side.

From JIRA > Account Settings > API Tokens:  Screenshot of it being accessed:

 

Capture.PNG

you need to do one last thing to make it work. If you have multiple teammates working on Testrail, you should have each of them configure their own credentials by going to their user's settings under your name in the top right corner of my settings, in the settings tab. If you do not enter their own authentication credentials the integration will still work for them but the issue is if they push from Testaril to Jira this will be attributed to the user account associated with the fallback credentials. Once it's done the configuration is complete and you can start to use it without any issues.

Thanks Testrail.png

This solution works. Thank you! 

To generate the API token, follow the steps mentioned here https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/

I've attempted both of the steps above, the API is showing as being accessed within JIRA but I get either a 403 error or 404 from Test Rail depending on the project. I have full permissions on the projects, however I am using JIRA Service Management. I setup a trial version on JIRA and Testrail to follow from the beginning and having the same issue. 

 

Is Test Rail integration not compatible with JIRA Service Management:

 

Testrail Version - 7.2.5.1000

Would appreciate some guidance into the above, it's frustrating to not be able to connect these two.

Like Pradeep Srinivasan likes this

Hi Katy Wynne

How you create the token? 

Like # people like this

From JIRA > Account Settings > API Tokens:  Screenshot of it being accessed:

 

Capture.PNG

Like # people like this

Have you being able to fix it? I'm having the same 404 error. 

Like Pradeep Srinivasan likes this

Suggest an answer

Log in or Sign up to answer