What could be causing a 401 error when trying to synchronize data between Jira and Zendesk?

This topic was automatically generated from Slack. You can find the original thread here.

Hi, there! I have a workflow that synchronizes some data between Jira and Zendesk, This morning, it stopped working ({"message":"Client must be authenticated to access this resource.","status-code":401}). I tried to connect again, with no success. Any ideas?

I’ve found this: https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-basic-auth-and-co[…]ga=2.139254321.363208783.1557187081-1066642471.1556199146.

Maybe this is the reason.

Does reconnecting your JIRA account help?

Or even after reconnecting do you have this issue?

, I tried to reconnect a few times. And the behavior is weird.

A call to the search API works fine:
**const** url = https://crewhu.atlassian.net/rest/api/3/search?jql=${encodeURIComponent(jql)}``

But a call to the update API fails:
**const** result = **await** axios($, {
method: "PUT",
url: url,
headers: { Authorization: Bearer ${this.jira.$auth.oauth_access_token} },
data: {
"fields": {
[cfZendeskTicketStatuses]: {"version":1,"type":"doc",
"content": [{"type":"paragraph","content":[{"type":"text","text":statuses}]}] }
}
}
});

WIth the message "Client must be authenticated to access this resource.".

And I did not change anything in my user permissions in Jira… Just crazy…

Is there a way within the JIRA to view your current account scopes?

Maybe that’ll give a clue to help narrow this down

I am not sure if we are in the same page, but when I remove and reauthorize, this is what happens:

And this, from inside Jira:

Thanks that’s helpful to see all scopes available.

And which action are you trying to take in JIRA specifically with your workflow?

PUT https://crewhu.atlassian.net/rest/api/3/issue/11932, that means update an issue.

Sure enough, you can see editing issues is permitted.

I have to believe this is some kind of scopes respecting issue on JIRAs end

If your other calls are passing with the same auth tokens, then it must be some kind of authorization error in the API.

Makes sense. The crazy thing is that it was working yesterday…

Yup agreed, if the code didn’t change then it’s something outside of the workflow that’s wrong.

Since you reconnected your account and we can see the scope is included, then it must be a bug in JIRA.

Hopefully they agree :crossed_fingers:

Yes, I will contact them. Thanks!

Hey, , just an update in this matter:

  1. I opened a ticket with Jira, waiting on them
  2. As a workaroung, I created an API Token in Jira, and connected to it with Basic Authorization <user>:<API Token>, it is now working. However, I cannot take advantage of Pipedream Connected Accounts feature, which is not so nice. As a suggestion, what about having a Basic Authentication for Jira as well as OAuth?
    Thanks for your help!

Glad to hear you found a workaround.

I don’t think we’d publish a separate yet same name app just for a different auth method.

But I think the idea of different auth methods per app is interesting.