Forums

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

Authorization with Python

nitjin01
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!
April 29, 2020

Hi,

I want to access my organization's JIRA database using python. I read many blogs about it but could not find proper solution. I am not able to pass the authentication step. 

 

Following is the url from where I can access the JIRA content through browser.

https://<organizationname>cloud.atlassian.net/jira/your-work.

 

and I have the following constraints

1) I don't have JIRA admin rights and I just want to access my own conten

2) For signing in my organization is using SSO of Microsoft.

 

It would be great if someone can guide me on this.

 

Thanks in advance,

Nitin

1 answer

1 accepted

0 votes
Answer accepted
Mohamed Benziane
Community Champion
April 29, 2020 edited

Hello @nitjin01 

Welcome to the community.

You can use the jira module for python and try this:

from jira import JIRA

jira_cloud = JIRA(basic_auth=("username", "api_token"), options={'server''https://url.atlassian.net/'})

Here the documentation to create an api token 

https://confluence.atlassian.com/cloud/api-tokens-938839638.html

nitjin01
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!
April 29, 2020

Thanks a lot Mohamed_Benziane. :)

It worked for me.

 

I was doing the following, which was not working for me.

jira = JIRA(jira_server, auth=(username, token))

Mohamed Benziane
Community Champion
April 29, 2020

Hi,

I'm glad i could help you. Feel free to mark my answer as accepter to solve this question.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events