Confluence links within Jira issues fail to authenticate
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
要約
Upon tapping the "Authenticate with Confluence to see this page" button on a Jira issue, the following error is displayed:
Authentication failed!
An error occurred while trying to obtain an access token. For application link "<Confluence site name> (<Applink-ID>) https://INSTANCE.atlassian.net/wiki confluence"
OAuth Problem Details
realm: 'https://INSTANCE.atlassian.net/wiki'
oauth_problem: 'consumer_key_rejected'
診断
- Confirm that the instance URL pointed in the error is from the same domain/site for both Jira and Confluence. For example, if the Jira site is https://<instance>.atlassian.net, Confluence should also be under https://<instance>.atlassian.net.
- As a Jira administrator, go to Application Links (via the gear icon at the top-right > Products > Application Links) and confirm that there is an application link with a "Config Error" message.
- When editing the application link with errors, confirm that the instance's URL is the same as the Jira instance. Editing it will also show a No remote application link message.
- As Confluence and Jira should be under the same instance's URL, on the list of application links, make sure that there is a System Confluence (Primary). There, tap the ellipsis button and Go to remote to confirm that this is from the same URL of Jira.
- In a Confluence page that has Jira issues linked, tap the Jira issue count on the top of the page, which will display a button to authenticate. Tapping this button will result in the same error message from Jira.
- In the Jira issue, tap the View in Confluence to make sure that this is pointing to a page from the same URL, confirming that the access is properly granted:
原因
By default, when Confluence and Jira are under the same instance, the application links are automatically created and cannot be modified or removed. When attempting to configure a new application link for the already existing instance's URL, although it will be created, the configuration error message will be displayed.
This avoids the integration between both products to work properly because the erroneous application link will be used on the OAuth handshake process, rejecting the consumer key.
ソリューション
Delete the created application link as there are already the system ones that make the integration work automatically:
- As a Jira administrator, go to Application Links (via the gear icon at the top-right > Products > Application Links)
- Tap the ellipsis button on the right side of the application link and select Delete
- Tap Delete again in order to confirm the deletion.
- If an application link was also created in Confluence, make sure to perform the same process as a Confluence administrator. To do so, go to the cog icon at the top-right and select Application Links to follow the same process as Jira.