Microsoft Power Platform Power Automate Connector does not work with Jira Data Center

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Microsoft's Power Platform's Power Automate Jira Connectors only work with Jira Cloud — not Jira Data Center.

MS Power Automate Jira Connector's documentation, as of Sep 15 2022, reads:


Known Issues and Limitations

  • For authentication, you need to use an API token. To get a token, go to this link.
  • Basic authentication with passwords is deprecated. For more information, see jira API documentation.
  • JIRA Server behind a firewall or with REST API disabled is not supported.


The "behind a firewall" means "on-premise" in this context (with or without an actual Firewall active).


HTTP Actions workaround

Customers have reported they were able to connect and work with Jira Data Center REST API through "HTTP Actions":

This would allow a custom Header of "Authorization: Bearer <Jira-PAT-goes-here>" and the use of Jira's REST API.


Environment

Any version of Jira Datacenter.

For Power Automate, Atlassian can't keep track of it's releases but this is a known limitation as of mid September 2022.


Diagnosis

Personal Access Tokens (PAT) are available on Jira Data Center since 8.14.0.

Even with a valid PAT, the Connector's configuration fails with an "Unauthorized (401)" error.

Error displayed on the Connector's config screen after submitting the form above:

Test connection failed. Details: Please check your credentials and try again. <html> <head> <title>Unauthorized (401)</title> 

This is followed by a long string of text with HTML tags and, near the end, it reads:

Basic Authentication Failure - Reason : AUTHENTICATED_FAILED


Cause

Jira Cloud's API Tokens and Jira Data Center Personal Access Tokens are handled differently by each product (Cloud and Data Center). MS Power Automate Connector is coded to work in the way Jira Cloud API Token works, and when supplying a Jira Data Center's PAT it fails with the "Basic Authentication Failure" error above.


Jira Cloud's API Token is handled by Jira Cloud as a BASIC Authorization, just with the API Token instead of the base64-hashed user:password.

From Jira Cloud's "Basic auth for REST APIs" article:

Supply basic auth headers

You can construct and send basic auth headers. To do this you perform the following steps:

  1. Generate an API token for Jira using your Atlassian Account.
  2. Build a string of the form useremail:api_token.
  3. BASE64 encode the string.
  4. Supply an Authorization header with content Basic  followed by the encoded string. For example, the string fred:fred encodes to ZnJlZDpmcmVk in base64, so you would make the request as follows:

    curl -D- \
       -X GET \
       -H "Authorization: Basic ZnJlZDpmcmVk" \
       -H "Content-Type: application/json" \
       "https://your-domain.atlassian.net/rest/api/2/issue/QA-31";


Jira Data Center's PAT, on the other hand, is handled by Jira Data Center (version 8.14 or later) as a BEARER Authorization.

From Jira Datacenter's "Using Personal Access Tokens" article:

Using PATs

To use a personal access token for authentication, you have to pass it as a bearer token in the Authorization header of a REST API call.

Here's an example using cURL to call the REST API with a bearer token:

curl -H "Authorization: Bearer <yourToken>" https://{confluenceBaseUrl}/rest/api/content



Solution

As of mid September 2022, the available MS Power Automate Connector uses the provided "API Token" in the way Jira Cloud's expecting it — even if you supply an on-prem Jira URL.

The MS documentation only mentions Cloud examples but perhaps the "behind a firewall" terminology may mislead some users into believing it's a matter of connectivity — which is not the case.

MS may release a new version of Jira Collector or other means of getting Power Automate to work with on-prem Jira instances — or may update their documentation. Please refer to their sources for updated information:


In the meantime, customers have reported using the Power Automate HTTP Actions worked for them.


Last modified on Mar 6, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.