How do I diagnose OAuth problems?

I've been trying unsuccessfully to make an application authenticate with JIRA through 2-legged OAuth.  Nothing I do seems to work - any request I make is bounced back with an error from JIRA:

{"errorMessages":["You are not authenticated. Authentication required to perform this operation."],"errors":{}}

So here's my question - how do I figure out WHY it is failing?  I'm not even seeing anything in the logs related to these attempts, so I can't figure out what JIRA doesn't like about my requests.  Any ideas?



2 answers

Hi Jason,

A suggestion would be to install the AppLinks Diagnostics Plugin in both applications you are linking and then run its tests to verify what is the message being returned.

In the results there will be links to pages which will help you to troubleshoot each error returned.


Thanks Pietro - unfortunately, that plugin only seems to help with Atlassian applications. I apologize for not being clear earlier... I have an internally developed application from which I wish to push updates to issues through JIRA's REST interface. It works fine with basic authentication - but I'd prefer to use OAuth.

In this case there are a few questions that will helps us to diagnose this: - Are these applications sharing the same user base? - Do you see any message in the atlassian-jira.log file (located under <<JIRA_HOME>>/log)? Try to search for any error message in, and where this may be documented - Here is a KB that may help you to resolve the problem

- Are these applications sharing the same user base? Yes - there is a single user (me). - Do you see any message in the atlassian-jira.log file (located under <<JIRA_HOME>>/log)? No - there is nothing in the logs. I even went into the and added an appender to capture DEBUG level oauth messages. Unfortunately, while it does show every gadget request, there is NOTHING captured when I make a request through my application - not even a rejection message. If it weren't for the fact that I'm getting a response, I'd think the request had never gone through at all. - Here is a KB that may help you to resolve the problem Unfortunately, this article doesn't apply. I'm not linking with another Atlassian app, and even if I was the URLs are correct. I'm not running behind a proxy, and I'm seeing no problems with the application link we already have with our Confluence instance. Any other ideas? I'm really stuck since I can't see what part of my OAuth request is causing problems...

AppFusions may be able to help you. We have a lot of experience with OAuth and OAuth2 with JIRA (the latter via a provider we've created for some of our integrations and any Atlassian app).

Troubleshooting through this thread is too complicated, since as you know, it's not straightforward/easy. Email if you'd like some focused assist. 

Hi Justin - thanks for responding. However, a few hours before your response came in I figured out what I needed to do to get it working (I documented on the thread I referenced in the original question). Too bad - you probably could have saved me several days of fumbling! On the other hand, there's no teacher like experience... Thanks, Jason

Good to hear - yes, seems like you'd been beating on that for a bit. Glad you got resolved!

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,760 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot