Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to connect to On-premise Jira server and export the CSV file for issues using Python script

Edited
siddusamshi
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!
Sep 28, 2023

I am new to Python in connecting the Jira server which is hosted on-premise, I want to connect and export the CSV file for our project issues. I have written the below code and executed on command line but it is not working. Can anyone please help me in resolving this?

from jira import JIRA
import requests

jira = JIRA(basic_auth=('user@mail.com', 'password123'), options={'server': 'https://jiraaccount.domain.com'})
issue = jira.issue('ID-544')
print(issue.fields.project.key)
print(issue.fields.issuetype.name)

----------------This code throws the below error---------------- 

<!-- HTTPError403 -->
<div class="aui-page-panel" ><div class="aui-page-panel-inner">
<main role="main" id="main" class="aui-page-panel-content" >
<div class="aui-page-header" ><div class="aui-page-header-inner">
<div class="aui-page-header-main" >
<h1>Forbidden (403)</h1>
</div>
</div></div>
<div class="aui-message aui-message-warning warning">
<p>Encountered a <code>&quot;403 - Forbidden&quot;</code> error while loading this page.</p>
<p>Basic Authentication Failure - Reason : AUTHENTICATION_DENIED</p>

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 29, 2023

Hello @siddusamshi 

Welcome to the Atlassian community.

The error suggest that the credentials you provided are not valid for logging in to the specified Jira server.

If you open the Jira server URL in a browser and enter those same credentials, is the login successful?

siddusamshi
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!
Oct 03, 2023

Hello Trudy Claspill,

Thank you for the response!

We're using SAML SSO Microsoft Logging into the Jira Application, and I'm able to login into the Jira Application using our Microsoft Credentials, and we are using Personal Access Token in the code to access Jira app.

Only I am not able to access using the code, even using PTA in the code.

Thank you again!

Suggest an answer

Log in or Sign up to answer