opsgenie - service desk integration not updating the SD ticket
Asked by Rosa M Fossi:

Hello Community,

I have an existing integration between JIRA Service Desk and OpsGenie (with the correct early access type project) and the webhook is working as intended. When I create a ticket in *project ITAL, with issue type Alarm, and Priority Highest*, it creates an alarm in OpsGenie, and the correct Team receives notifications.

But once this alarm is created in OpsGenie, that's it. No further communication seems to be taking place between the alarm, and the ITAL ticket. I really really want a comment to be added to the ticket, and a transition to take place when the alert is acknowledged.

Here's what I see in OpsGenie after the webhook creates the alert (I do notice that there's no listed Jira Service Desk request listed at the bottom, but I don' t understand why, since JSD created the alert, and it should be linked, no?):![alarm-in-opsgenie.png](/t5/image/serverpage/image-id/114652i5E7D48D5D43DDB53/image-dimensions/694x593?v=v2 "alarm-in-opsgenie.png")

Here's the integration config (just the comment for now.. haven't added the next line since it's not working at all)  
![integration-in-opsgenie.png](/t5/image/serverpage/image-id/114653i0686F1E0E0E1764D/image-dimensions/661x525?v=v2 "integration-in-opsgenie.png")

Last but not least.... As mentioned above, it IS an early access project, but afaik, this type of linking was available before via integration/apis in OpsGenie. I don't believe it's the EA project giving me the issue, so I thought it was worth visiting the community for this Q. Thanks!


Answers:
author: Robert
body: [@Rosa M Fossi](/t5/user/viewprofilepage/user-id/153802) If you check the alert's activity log tab, do you see any activity related to Opsgenie sending actions back to Jira?

It should at a minimum show an attempt and a description of the error if the action failed there.

I also noticed you have changed the default issueKey extraProperty field to IssueKey (capital "I"), can you please change that back to issueKey in the integration's settings and give that a try?

comments: author: Vlasjov Prifti
body: Hi Robert,   

In my case I get an auth error message:   

Could not send \[addComment\] action to JiraServiceDesk \[Name_Of_The_Integration\]. Reason: 401 Unauthorized  

I used my Jira Service Desk credentials to authenticate.   
Should I maybe create an API token ?  

Thank you :)


author: Robert
body: [@Vlasjov Prifti](/t5/user/viewprofilepage/user-id/4115876) Yep! In your case that's likely the culprit. Generate an API token and use that as your password in the integration instead: <https://confluence.atlassian.com/cloud/api-tokens-938839638.html?_ga=2.60758382.239681881.1536772526-1042436459.1460608547>


author: Rosa M Fossi
body: [@Robert](/t5/user/viewprofilepage/user-id/2275658) thanks for the response. *I don't actually see an attempt like Vlasjov has in the log.*

EDIT: I lied... i looked further in the log.

```
system  System

Could not send [addComment] action to JiraServiceDesk [cs_alarm_CRM_JiraServiceDesk]. Reason: 401
```

I did use a token. Not my credentials.

I'm not certain about that capital letter. I didn't realize that was something that I entered. I only created the webhook.


author: Robert
body: [@Rosa M Fossi](/t5/user/viewprofilepage/user-id/153802) That's progress! Can you try removing the trailing slash from your Jira URL? That *could*be the issue if it's causing a malformed URL.

If that doesn't improve things, would you be able to open up a support ticket (<https://support.atlassian.com>) or reach out via the in-product chat bubble? We have a few more tools available that way and can work with you to pin down the root cause.


author: Rosa M Fossi
body: Thanks\~ I just tried that change. But just received that same "Could not send / 401" error. Before I reach out to support, can you eyeball the screenshots below?

On the OpsGenie screen, is that the right user account ID format?

On the jira webhook screen, do I have the right config in the webhook?

![opsgenie-integration-003.png](https://community.atlassian.com/t5/image/serverpage/image-id/115203iBD354D06A54FFDF6/image-dimensions/505x849?v=v2 "opsgenie-integration-003.png")

JIRA webhook![opsgenie-integration-jira-webhook-screen-001.png](https://community.atlassian.com/t5/image/serverpage/image-id/115202i662C6252EDB5D146/image-dimensions/590x469?v=v2 "opsgenie-integration-jira-webhook-screen-001.png")


author: Robert
body: [@Rosa M Fossi](/t5/user/viewprofilepage/user-id/153802) You'll want to use your email address as the username - it looks like you may have some sort of userID there now. Otherwise the rest looks good :)


author: Rosa M Fossi
body: Hmmm\~ I thought Atlassian no longer accepted emails as the user account name. I'll test that. If still no dice, it's time for a ticket to support!

Thanks fro all your assistance [@Robert](/t5/user/viewprofilepage/user-id/2275658)


author: Rosa M Fossi
body: That was it. The email address... how goofy of me! The documentation CLEARLY said email address, but I am so used to filling out userID's in JQL's since the change that I simply read it as "id" in my head.


author: Vlasjov Prifti
body: Having today the exact same problem. Any updates on this ?


Tags: automation

cloud

jira-service-desk-cloud