Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Here's the error we received: "OAuth token not defined for connection. OAuth Authorisation required.

Muhammad Ramzan(Atlassian Certified Master)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 18, 2020

Hi,

 

With new upgrade of Jira service desk, now for email confirugrations we must need to define OAuth2.0.

 

I have configured successfully auth2 from system setting with google. but when i am trying to use auth2 other than password in service desk project , it showing error.

 

Here's the error we received: "OAuth token not defined for connection. OAuth Authorisation required."

 

2020-08-18 11:02:01,277+0000 http-nio-8080-exec-18 ERROR Ramzan 662x250340x1 pc5x1d 46.152.45.18,127.0.0.1 /rest/servicedesk/1/servicedesk/NTEST/incomingemail/oauth/validateandsaveflow/0a95c98c-5ade-4391-93f4-129f897966f8 [internal.rest.emailchannel.EmailChannelResource] Failed to validate and save token: jep.mail.connection.verifier.unknown.error : 'Here's the error we received: "[AUTHENTICATIONFAILED] Invalid credentials (Failure)"'

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
2 votes
Answer accepted
Craig Shannon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 18, 2020

Hi @Muhammad Ramzan(Atlassian Certified Master)

Thanks for reaching out on the community with your question. 

This error will occur when JSD is not able to validate the token which it received when completing the OAuth flow. You may also see an error with more details which may help more before this which should be along the lines of: 

Unable to connect to the server at ... due to the following exception:

However, the error that you are seeing suggests that JSD was unable to connect to the Google server with the token which was received from Google as this error occurs when the connection is validated. JSD tries to establish a connection and if you turn on debug for the package `com.atlassian.jira.internal.mail.processor.feature.channel.connectionverifier` you should see the following log line when successful (this page should help turn on debug): 

Connection to Mail Server established successfully 

Here are some questions that may help narrow down the issue you are having:

  • What scopes have you requested when you configured the OAuth connection in the Jira plugin? For Google you need the scope https://mail.google.com
  • Have you registered the redirect url in your Google configuration?
  • Were you able to complete the OAuth flow when setting up the connection?
  • Are you able to see the failed connection attempts in your Google account?
  • Are you able to setup OAuth2 in Jira for the email account to verify if this is an issue with Google the setup or JSD? 

Your OAuth configuration should look something like this (I was able to test this locally)

Screen Shot 2020-08-19 at 9.27.47 am.png

Thanks,

Craig

Jira Service Desk

Matt Deir
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 21, 2020

Your issue may not be the same one I had, but it exhibited similar symptoms.

I solved this by uninstalling some unsupported plugins - Jira Core, Software and Service Desk back end all appeared to be functioning normally - but the customer facing side of the Service Desk was throwing this error in the browser console when loading the login page:

Uncaught ReferenceError: JIRA is not defined
at HTMLDocument.<anonymous> (batch.js?locale=en-US:365)
at c (batch.js?locale=en-US:49)
at Object.fireWith [as resolveWith] (batch.js?locale=en-US:49)
at ready (batch.js?locale=en-US:49)

After disabling the unsupported plugins the Service Desk loaded correctly for customers, and the Google Mail link authorized correctly and began processing emails correctly.

Muhammad Ramzan(Atlassian Certified Master)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 21, 2020

Thanks @Craig Shannon @ for the right suggestions,  issue was with scope. Although with the scope i provided auth was working but in jsd it was not

 

But after updating the right scope worked like a champ. Thank you

Like Craig Shannon likes this
Muhammad Ramzan(Atlassian Certified Master)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 21, 2020

@Matt Deir  many thanks for sharing your experience,  my issue was with scope

TAGS
AUG Leaders

Atlassian Community Events