Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

TestRail integration with Jira returning an error

I managed to set up TestRail to integrate with Jira for defect creation. And it is working fine. But with by having these variables in the Defects tab of Project setup (screenshot below)
password=123Myp@ssword (don’t worry this is not my real password)

My question is… how could I set it up in such a way that when a user creates a defect, e.g. by clicking the “Push” link in the test result pop-up window, the defect will record the user’s own user name and not the admin’s user name.

I tried using %jira_use% and %jira_password% variables but I keep getting the “Plugin Jira_REST returned error HTTP code 401” error message.

Can someone point me to the right steps to do this properly?
Is there something I need to do at Jira side to make it work?


Hi there,

Thanks for the post! In order to set up the push function to create the defect with the actual user’s name, you will need to set it up with user variables as you mentioned in the post. Once you’ve created the %jira_user% and %jira_password% variables each user will need to go into their personal TestRail settings to set up their own Jira credentials for TestRail to use to authenticate and create the new issue. You can find detailed instruction on how to set this up here:

If your users are seeing 401 errors once they have entered their Jira login details at Profile > My Settings > Settings (tab), it’s possible they are using a user name instead of email address (which Jira is phasing out) or they don’t have the necessary permissions in Jira to create an issue in the specified project. Also, if you use SSO or an alternate authentication method to access Jira, you may also need to use an API token in place of the password in TestRail. If needed, you can create an API token here:

I hope that helps! If you are still running into the 401 errors don’t hesitate to reach out to the support team at and we’ll be happy to provide further assistance.

Hi Jacob,

Thank you for your response.

I followed the instructions by the number but I’m still getting the same error message. It does work when backup is populated in User Variable setup. Which is not what I want to happen.

In TestRail My Settings, I tried both jira user name and user email but no luck there.

I’ll do further testing and see what will work for me.