The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to access Jira using PAT(Personal access token) in powershell

Pallavi Deore
February 21, 2024

Hello All,

Is it possible to access Jira with Personal access token using Powershell.

If yes, please share the document or references which can help.

Regards

Pallavi Deore

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Hariharan Iyer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 21, 2024

Hi @Pallavi Deore ,

 

The PAT can be used for any of Jira's REST APIs , and you can use Powershell's Invoke-RestMethod cmdlet to invoke REST APIs.

For a specific example of how to use the token in powershell, check the example on this page - https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/

$Text = ‘user@example.com:api_token_string’
$Bytes = [System.Text.Encoding]::UTF8.GetBytes($Text)
$EncodedText = [Convert]::ToBase64String($Bytes)
$EncodedText

Hope that helps!

DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events