Category

Troubleshoot "Invalid Jira account" issue with Jira Integration

Updated:

Resolving permission issues with the Jira API key involves a systematic approach to ensure that all aspects of authentication, user permissions, and API configuration are correctly set up. Follow these steps to troubleshoot and resolve the issue:

  1. Confirm Jira Deployment Type

    • Jira Cloud Deployment: Ensure your Jira instance is a Cloud deployment. The integration is only supported for Jira Cloud and is not compatible with On-Premise (Server/Data Center) instances.
  2. Validate the Jira URL Format

  • Correct URL Format: Make sure the Jira domain URL follows the correct structure:
    • Correct:
      https://[your-domain].atlassian.net
      Example: https://example.atlassian.net

    • Incorrect: Avoid adding extra paths like /jira or other subdirectories.
      Example of incorrect format: https://example.atlassian.net/jira

  1. Verify the Jira API Key
  • Use the Correct API Key: Confirm that the API key used for authentication is correct.

  • Create or Manage API Tokens:

    1. Navigate to Jira Profile > Manage Account > Security > Create and Manage API Tokens.
    2. Generate a new token or use an existing one.
  • Check Token Permissions: Ensure the API token has permissions for the API endpoints you are accessing.

  • Associate API Key with the Correct Email: The API key must be created using the email ID linked to your Jira account.

Reference:
Explore further instructions about How to manage API token for your Atlassian Account.

  1. Check User Permissions
  • Admin User Permissions: The admin user linked to the API key must have the required permissions in Jira.

  • Steps:

    1. Go to Jira Administration > User Management to verify the user’s permissions.
    2. Ensure the admin user is part of the Jira-administrators or Jira-system-administrators group.
    3. Verify the admin user has the necessary project roles (e.g., Administrator, Developer).
  • Add Missing Permissions: Add the required groups or roles if they are missing.

Reference:
Explore further instructions about Managing Users and Permissions in Jira.

  1. Validate Project Roles and Permissions
  • Project-Level Permissions:

    1. Go to the project in Jira: Project Settings > Permissions.

    2. Verify the user or group has permissions required for API actions.

    3. Confirm the admin user has roles such as:

      • Administrators: Full access.
      • Browse Projects
      • Edit Issues
      • Create Issues
      • Delete Issues
  • Add Missing Permissions: Update the project roles to grant the required permissions.

Reference:
Explore further instructions about Manage Permissions in Jira Cloud.

  1. Review Global Permissions
  • Global Permissions: Some API actions require global permissions.

  • Steps:

    1. Go to Jira Administration > Global Permissions.
    2. Verify the admin user has:
      • Jira System Administrators
      • Jira Administrators
      • Browse Users
      • Create Shared Objects
      • Manage Group Filter Subscriptions (optional)
  • Assign Missing Permissions: Add permissions by updating the user or group settings.

Reference:
Explore further instructions about Manage Global Permissions.

  1. Test with a Different User
  • Higher-Permission User: Test API access with a higher‑privileged user (e.g., an admin) to confirm if the issue is permission-related.
  1. Contact Jira Administrator
  • Seek Assistance: If the issue persists, contact your Jira administrator to verify permission and API access settings.
  1. Example: Testing API Access
  • Step 1: Get Your Base64 Encoded String

    • Combine your Jira email and API token in the format: email:API_TOKEN
    • Encode using Base64:
echo -n "[email protected]:API_TOKEN" | base64 

Replace [email protected] with your Jira email and API_TOKEN with your Jira API token.

Example:

echo -n "[email protected]:abc123" | base64 

Output:

am9obi5kb2VAZXhhbXBsZS5jb206YWJjMTIz

  • Step 2: Run the curl Command
curl -X GET \
-H "Authorization: Basic <BASE64_ENCODED_STRING>" \
"https://<your-domain>.atlassian.net/rest/api/3/issue/<issue-key>" 

Replace:

  • <BASE64_ENCODED_STRING> — Base64 string from Step 1
  • (your-domain) — e.g., mycompany.atlassian.net
  • (issue-key) — e.g., PROJ-123

Example:

curl -X GET \
-H "Authorization: Basic am9obi5kb2VAZXhhbXBsZS5jb206YWJjMTIz" \
"https://mycompany.atlassian.net/rest/api/3/issue/PROJ-123" 
  • Step 3: Interpret the Response

    • Success: Returns JSON with issue details.

    • Error Codes:

      • 401 Unauthorized: Invalid credentials.
      • 404 Not Found: Incorrect issue key or domain.
      • 403 Forbidden: Missing permissions.
  • Step 4: Troubleshooting

    1. 401 Unauthorized

      • Check email and API token.
      • Verify Base64 string.
    2. 404 Not Found

      • Validate the issue key.
      • Verify the Jira domain.
    3. 403 Forbidden

      • Confirm your account has the necessary permissions.

FAQs

  1. Does Jira API access require a paid Jira license?
    Yes. The user generating and using the API token must have an active, licensed account within the Jira Cloud instance.

  2. How long does a Jira API token remain valid?
    API tokens do not expire automatically, but they can be manually revoked. If compromised, they should be deleted immediately.

  3. Can I use OAuth instead of a Jira API token?
    Yes. Jira supports OAuth 2.0 for more complex integrations, but API tokens are simpler and more commonly used for basic automation.

Related Articles

  1. BoldDesk Jira Integration: Configuration & Workflows
  2. Create Jira Issue with BoldDesk Ticket
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied
Access denied
Access denied

No articles or sections found
No articles or sections found