Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×I am using Jira Software 8.15 and I have create a PAT (Personal Access Token) and I am trying to authenticate using jira-python's basic_auth.
When I use the token I just created I get the following error:
Authentication Failure - Reason : AUTHENTICATED_FAILED
and when I look at the security logs:
<user> tried to login but they do not have USE permission or weren't found. Deleting remember me cookie
However!!
When I use username and password it all works as expected.
So, my question is is there any configuration that I need to change in order to make those PATs usable or is it the case that I can only use username:password to authenticate with Jira Server?
I believe I found the answer I was looking for here
host = "YOUR_JIRA_URL" pat = "YOUR_PERSONAL_ACCESS_TOKEN" headers = JIRA.DEFAULT_OPTIONS["headers"].copy() headers["Authorization"] = f"Bearer {pat}" jira=JIRA(server=host, options={"headers": headers})
Hi @Ventsislav
With cookies you use username:password, what syntax do you use with PAT?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using jira-python and more specifically:
JIRA(
basic_auth=(
validated_data['email'],
validated_data['token']
),
options={
'server': url,
'agile_rest_path': 'agile',
},
max_retries=0,
)
it works just fine with jira cloud, but when it comes to jira server it's not happy with the token - it only accepts password.
However, I managed to overcome this by installing this app
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.