Scriptrunner: You do not have an authorized access token for the remote resource.

Attempting to run it through the Script Runner console, what could the issue be?

Both JIRA and Confluence are linked to each other with oAuth(not impersonated), and both have green light for connectivity.

 

Full error:

 

com.atlassian.applinks.api.CredentialsRequiredException: You do not have an authorized access token for the remote resource. at com.atlassian.applinks.oauth.auth.ThreeLeggedOAuthRequestFactoryImpl.retrieveConsumerToken(ThreeLeggedOAuthRequestFactoryImpl.java:93) at com.atlassian.applinks.oauth.auth.ThreeLeggedOAuthRequestFactoryImpl.createRequest(ThreeLeggedOAuthRequestFactoryImpl.java:86) at com.atlassian.applinks.core.auth.ApplicationLinkRequestFactoryFactoryImpl$AbsoluteURLRequestFactory.createRequest(ApplicationLinkRequestFactoryFactoryImpl.java:180) at com.atlassian.applinks.api.ApplicationLinkRequestFactory$createRequest.call(Unknown Source) at Script3.run(Script3.groovy:64)

 

3 answers

Hi Christian.

I believe if you want to do a certain type of request, you must have OAuth for both inward and outward connections for JIRA and Confluence.

I recently "demoed" a use case with both Confluence and JIRA and I could only get it to work with that configuration. I was making a request to create a page. Which really makes sense. If you do not impersonate a user how do you make sure that the user has rights to perform the action that you want him to?

I might be wrong, since I haven't been in this rodeo for that long, but in my opinion, you should try your luck with the mirror OAuth config.

Cheers!

DYelamos

I am having this same issue. I am pretty sure I have OAuth for both inward and outward connections. jira-link.PNGconf-link.PNG

Oops, meant to reply to the answer above. But, were you able to resolve this somehow?

using impersonation solved the issue for me.

Not sure what the technical fallout is - but if you need a quick fix.. ;)

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Service Desk

Wy are we still using email for Service Desk workflows?

...attest to the experience of an urgent approval that gets lost in the boss’s inbox and requires that special “Please Approve” email or text message. In an age where we have distributed teams...

113 views 0 2
Read article

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