Forums

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

How to authenticate with JIRA Server (on prem) in Python.

Sharon_George
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!
March 29, 2020

Hi all,

I am using the Jira python library and authenticating with an on premise Jira server.
logins to our Jira instance are being done via SSO.

The code is as follows:

options = {'server': 'https://Internal-JIRA-URL.com'}
self.jira = JIRA(options, basic_auth=(username, password))

I checked the credentials and url are correct, but still getting error 401.

I read that basic auth' was lately deprecated, with the api token solution for JIRA Cloud.

Was it also deprecated for JIRA Server (on prem)? If so, how can I fix this code?

 

 

Thanks in advance,

Sharon.

 

1 answer

0 votes
Mohamed Benziane
Community Champion
April 1, 2020

Hello @Sharon_George 

 

Can you try this :

from jira import JIRA

jira = JIRA(basic_auth=(
'username', 'password'), options={'server''jiraURL'})

Hope this helps 

Suggest an answer

Log in or Sign up to answer