The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use jira server rest api with okta sso?

Daniele Silvestre de Souza
March 17, 2025

We have jira configured through Okta SSO as Identity provider (IDP).

This works well for accessing JIRA tool thru OKTA sign-in. However, We need to access JIRA REST API to perform some admin operations in a external automation code. I cannot use Basic Auth because I do not have a jira username/password (we have SSO through Okta).

  • I am using jira server 9.17.
  • If I call the v3 api  (sample: rest/api/3/serverInfo) using Personal Access Token, I get a url redirect to okta as response.
  • When I call the endpoint  rest/api/2/serverInf , it works even if I don't pass any authorization.
  • If call other end point for example rest/api/2/application-properties using a  personal Access token of a admin user I get 401 with the message "Client must be authenticated to access this resource."

What is the process to call JIRA APIs through Okta SSO?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Daniele Silvestre de Souza
March 17, 2025

Seems that if I send the request for version 2 it works. 

Daniele Silvestre de Souza
March 18, 2025

Also need to flag allow api call, and not sure why but I needed to generate a new token.

1 vote
Florian Bonniec
Community Champion
March 17, 2025

Hi @Daniele Silvestre de Souza 

 

You can create a Personal Access Token and use it to authenticate.

Using Personal Access Tokens | Atlassian Support | Atlassian Documentation

Regards

Daniele Silvestre de Souza
March 17, 2025

Hi Florian,

I'v already done it and does not work, I get as answer a redirect url for okta.


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="decorator" content="none" />
<script
src="/s/ik737z/9170005/1cum173/4.3.11/_/download/resources/com.atlassian.plugins.authentication.atlassian-authentication-plugin:save-fragment/js.cookie.js">
</script>
<script>
if(window.location.hash) {var expirationDate = new Date(); expirationDate.setTime(expirationDate.getTime() + 60000 * 5); Cookies.set('atlassian-authentication-plugin-url-fragment_4f19fda7-8ab8-4e6e-b408-92d52ba88a91', window.location.hash.substr(1), {expires : expirationDate, path : '', secure: true, SameSite: 'None' });}window.location.assign("link to okta');
</script>
</head>

<body></body>

</html>

 

Endpoint: rest/api/3/serverInfo