It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Basic Auth JIRA's Rest API ( with SSO enabled)

Alexander Diller Oct 31, 2014

I try to access the JIRA Rest API with basic auth.

 

But apperently it always wants an OAuth authentication and it seems like that it also requires the SSO cookies.

I would just like to make some localhost calls to my JIRA instance and basic auth would be the easiet way to do it.

 

I tried "?os_authType=basic" already, but none of my valid login credentials work ( Admin, dedicated auth user, .. )

If I do the same request in the same browser without basic, I can access it ( because of SSO )

 

Currently I just get an 401 sad

 

Am I misunderstanding something here ? - Do I have to use SSO ? - and if so, how would I do it?

I could get already the session token via the crowd rest api. What would I do next?

 

OAuth seems too complex for this simple approach ( I mean it's a php script on the same, local server )

 

Thanks for any help wink

2 answers

1 accepted

2 votes
Answer accepted
Jobin Kuruvilla [Go2Group] Community Leader Oct 31, 2014

You can still use basic auth with the REST API, do not have to use OAuth just because you have SSO enabled. Just make sure you can do all the operations you are doing in the REST API by logging into JIRA using that same user.

An admin might not have all access in JIRA. For eg: creating issues might be restricted to a certain groups of users only.

Robin Green Feb 11, 2016

The problem is, I use Okta SSO which is genuine SSO - one (Okta) page for login to all apps, so I cannot change my JIRA password because I don't know what it is, and therefore I can't use Basic Auth on JIRA because I don't know what my password is. Can you help me?

Ram Murthy Dec 14, 2016

Robin, I'm also facing the same issue as you described earlier.. Any suggestions on this please.. Also please post here if you have any alternative references to this item.

-Ram

Harshal Darade May 18, 2017

Hello Guys, any suggestions on this. have you figured this out ?

1 vote
Alexander Diller Nov 01, 2014

Oh damn.
Turns out I hadn't the proper permissions ( Global permission ) and the password wasn't escaped properly.

Thanks for the assist wink

 

/solved

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in United States

Unofficial downtown meetup week of June 3 or 4?

Hello everyone!  It's been a while since Houston's had a Atlassian Community Event (formerly Atlassian User Group meeting) so I wanted to gauge interest in an unofficial downtown meetup after wo...

23 views 0 0
View post

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you