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,365,571
Community Members
 
Community Events
168
Community Groups

Could not send [createIssue] action to Jira [JiraSoftware]. Reason: 401 Unauthorized

Dear all,

I have setup Jira Software integration within Opsgenie in order that when an alert is created in opsgenie then it also create an Issue in a jira project

I have provide all information with issue type, URL, project key, user and password

But doing so I all type gets the error in activity log :

Could not send [createIssue] action to Jira [JiraSoftware]. Reason: 401 Unauthorized

If I create the issue directly in Jira with same user and password define in the integration, then I can create the issue which means that the provided user/passw has proper perimission.

What is missing here any idea ?

regards

1 answer

0 votes
Nick H Atlassian Team May 10, 2021

Hi @serge calderara ,

This community article should help troubleshoot the error: https://community.atlassian.com/t5/Opsgenie-articles/Opsgenie-Alerts-Not-Creating-Jira-Jira-Service-Management-Issues/ba-p/1563628

A 401 is typically an authorization issue so you will want to use a Jira API token (and only the token) in the password field of the integration.

Hope this helps! Let us know if you run into any other questions or issues after trying this. 

HI @Nick H , usually for automation process, we use an internal account dedicated to that which is  user: jira_automation  ( with admin rights ) and its password

Then all automation process gets executed by this account

Now when you talk about API token, from where should I create this API token in order that it is linked to this automation internal account ?

regards

Nick H Atlassian Team May 10, 2021

There should be an API token link in that community post I shared above, but here it is as well: https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/

Users can create API tokens by navigating within Jira or JSM to:

Profile >> Manage your account >> Security >> API Tokens >> Create and manage API tokens >> Create API token >> then copy/paste new API Token into the integration's password field.

hello @Nick H got it, I am able to create the issue in Jira while the alert arrive in opsgenie.

But then what is wierd is that it mapped the Jira issue inside an extra property named IssueKey.

Any idea how to get the issue key appears as a link to the alert as shown below : 

Tm1Vz27HpN.png

To add a link back to the issue, you'd want to add something like:

https://accountname.atlassian.net/browse/{{key}}

into an alert field of the Create Alert action(s):

commjira1.jpg

Example:

commjira2.jpg

hello @Nick H , I have try to do same as you mentionned but the Issue Link is not appearing on my side

8WBGJUl630.pngu9pfDK1BYb.png

Any idea what I am missing ?

I apologize. I thought you were asking how to a link back to the issue when a Jira issue creates an Opsgenie alert.

At this time it's not possible to link back to the Jira issue when an Opsgenie alert creates the Jira issue.

We have a feature request for this I can add you to.

In the meantime, you'd have to link the issue manually here:

commjira4.jpg

hello @Nick H , as the link back cannot be create in opsgenie when opsgenie create a jira issue when an alert is created, then is there a way to do it in oposite whay in the sense that :

When opgenie create the Alert, it then create automatically the issue in Jira and the Issue in Jira can have a field which contains the Alert url ?

Possible in that direction ?

regards

serge

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events