> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/connectors/ticketing-systems/connect-to-jira.md).

# Connect to Jira

You can connect Harness to Jira using a Harness Jira connector. This [connector](/harness-ai/new-to-harness-platform/overview.md#connectors) allows you to create and update Jira issues, and to use Jira issues in Approval steps.

Looking for How-tos? Go to [Create Jira Issues in CD Stages](/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/ticketing-systems/create-jira-issues-in-cd-stages.md), [Update Jira Issues in CD Stages](/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/ticketing-systems/update-jira-issues-in-cd-stages.md), and [Adding Jira Approval Stages and Steps](/harness-ai/use-harness-platform/approvals/adding-jira-approval-stages.md).

#### Limitations <a href="#limitations" id="limitations"></a>

* Your Jira REST API account must have permissions to create and edit issues in the relevant Jira projects. The **Administer Jira** permission includes all relevant permissions (as does the **Administrator** or **Member** permission on [Jira next-gen](https://confluence.atlassian.com/jirasoftwarecloud/overview-of-permissions-in-next-gen-projects-959283605.html)).\
  For details, go to Atlassian's documentation on [Operation Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/?utm_source=%2Fcloud%2Fjira%2Fplatform%2Frest%2F\&utm_medium=302#permissions), [Issues](https://developer.atlassian.com/cloud/jira/platform/rest/v3/?utm_source=%2Fcloud%2Fjira%2Fplatform%2Frest%2F\&utm_medium=302#api-group-Issues), and [Managing Project Permissions](https://confluence.atlassian.com/adminjiracloud/managing-project-permissions-776636362.html#Managingprojectpermissions-Projectpermissionsoverview).
* When you set up the Jira Connector, **Username** requires the **full email address** you use to log into Jira.

#### Add a Jira Connector <a href="#add-a-jira-connector" id="add-a-jira-connector"></a>

You can add a Jira Connector at the Project, Org, or Account level. We'll cover Projects here. The process is the same for Org and Account.

You can also add the Jira Connector when setting up the Jira Create, Jira Approval, or Jira Update steps. We'll cover adding it to the Project's Connectors here.

To add a Jira connector to your Harness project:

1. In **Project Setup**, click **Connectors**.
2. Click **New Connector**, and then click **Jira**. The Jira Connector settings appear.
3. In **Name**, enter a name for this connection. You will use this name to select this connection in Jira steps.
4. Click **Continue**.
5. In **Jira URL**, enter the base URL by which your users access your Jira applications. For example: `https://mycompany.atlassian.net`.

   In Jira, the base URL is set to the same URL that Web browsers use to view your Jira instance. For details, go to [Configuring the Base URL](https://confluence.atlassian.com/adminjiraserver071/configuring-the-base-url-802593107.html) from Atlassian. If you are using on-premises Jira server with HTTPS redirects enabled, use the HTTPS URL to ensure the [JIRA client follows redirects](https://confluence.atlassian.com/adminjiraserver/running-jira-applications-over-ssl-or-https-938847764.html).
6. In Authentication, you can select one of the following:
   * **Username and API Key**: Enter your credentials. For username, use the **full email address** you use to log into Jira. To obtain your **API Key**: You need to create a scoped API token in Jira with the following scopes:

     * `read:jira-user` - Allows Harness to read user information.
     * `read:jira-work` - Allows Harness to read Jira issues and related data.
     * `write:jira-work` - Allows Harness to create and update Jira issues.
     * `manage:jira-project` - Allows Harness to read project-level settings and metadata during connection validation.
     * `manage:jira-configuration` - Allows Harness to read Jira configuration required for authentication and connection testing.

     To learn how to create a scoped API token, check out [Scoped API Tokens in Confluence Cloud](https://support.atlassian.com/confluence/kb/scoped-api-tokens-in-confluence-cloud/). Once you create the scoped API token, add it as a [Harness Text Secret](/harness-ai/use-harness-platform/secrets/add-use-text-secrets.md).

     ```yaml
     connector:
       name: scopedJiraApiToken
       identifier: scopedJiraApiTokenID
       description: "scoped API token-based Harness connector for Jira"
       accountIdentifier: YOUR_ACCOUNT_IDENTIFIER
       orgIdentifier: YOUR_ORG_IDENTIFIER 
       projectIdentifier: YOUR_PROJECT_IDENTIFIER
       type: Jira
       spec:
         jiraUrl: https://api.atlassian.com/ex/jira/{cloud_id} # Replace {cloud_id} with your actual Cloud ID from Jira
         auth:
           type: UsernamePassword
           spec:
             username: YOUR_EMAIL_ADDRESS_FOR_JIRA_LOGIN
             passwordRef: YOUR_TEXT_SECRET_CONTAINING_SCOPED_API_TOKEN
         ignoreTestConnection: false
     ```

     To ensure you have the correct Cloud ID, please refer to [Atlassian's detailed guide on finding your Cloud ID](https://support.atlassian.com/jira/kb/retrieve-my-atlassian-sites-cloud-id/).
   * **Personal Access Token**: Add your Personal Access Token (PAT) to Harness as an [encrypted text](/harness-ai/use-harness-platform/secrets/add-use-text-secrets.md) and select the same in the Jira connector.

     <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>IMPORTANT</strong></p><p>This feature requires Harness Delegate version 78707.</p></div>

     ```yaml
     connector:
        name: jiraPat
        identifier: jiraPat
        description: ""
        orgIdentifier: default
        projectIdentifier: myproject
        type: Jira
        spec:
          jiraUrl: https://jira.dev.example.io/
          delegateSelectors:
            - test
          auth:
            type: PersonalAccessToken
            spec:
              patRef: pat
     ```

     <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>IMPORTANT</strong></p><p>Jira only supports Personal Access Tokens in its Server version. For the exact version, refer <a href="https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html">Using Personal Access Tokens</a>.</p></div>
7. Click **Continue**.
8. Select the Harness Delegate(s) to use when making a connection to Jira using this Connector.
9. Click **Save and Continue**.

   Harness tests the connection.
10. Click **Finish**.

    The Jira Connector is listed in Connectors.

#### See also <a href="#see-also" id="see-also"></a>

* [Create Jira Issues in CD Stages](/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/ticketing-systems/create-jira-issues-in-cd-stages.md)
* [Update Jira Issues in CD Stages](/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/ticketing-systems/update-jira-issues-in-cd-stages.md)
* [Adding Jira Approval Stages and Steps](/harness-ai/use-harness-platform/approvals/adding-jira-approval-stages.md)
* [Adding Jira Approval Stages](/harness-ai/use-harness-platform/approvals/adding-jira-approval-stages.md)
