I’ve built an Azure Logic App custom connector which allows me to use Actions in the Jira Cloud API that are not available in the Azure built-in Jira connector.
As my apps were just in dev initially, I used basic auth to authenticate the connector to the Jira Cloud API. All actions in the custom connector worked without issue.
Now I’m moving my apps into Prod I need to change the custom connector authentication to use OAuth 2.0.
I’ve followed the steps in the Jira documentation and can successfully authenticate to the Jira Cloud API via OAuth 2.0 using
- The authorisation URL provided in my Atlassian developer portal
- A manually created authorisation URL
However when I enter the exact same details into the Custom Connector OAuth 2.0 Security tab, authorisation to the Jira Cloud API fails with the message ‘This app has not requested any supported Atlassian scope. Check the authorisation URL for your app and ensure that it includes valid scopes’
I’m not sure how relevant this is, but an API Connection is created for the custom connector whenever I attempt authentication.
The fields I’m using in the Custom Connector Security fields are:
- Identity Provider: Generic OAuth 2
- Client id: Copied straight from my Atlassian Dev portal
- Client secret: Copied straight from my Atlassian Dev portal
- Authorization URL:
https://auth.atlassian.com/authorize
- Token URL:
https://api.atlassian.com/ex/jira/myConfirmedValidCloudid/rest/api/2/project
- Refresh URL: Same as Token URL
- Scope:
read%3Ajira-work
For all the above Security fields, I’ve provided the exact same values as those used for the two authentication methods mentioned above, which worked.
I’ve tried the following troubleshooting steps:
- Adding the scope to the authorisation URL:
https://auth.atlassian.com/authorize?scope=write%3Ajira-work
- Changing the scope in the authorisation URL to another valid scope:
https://auth.atlassian.com/authorize?scope=read%3Ajira-work
- Changing the scope in the Security fields to slightly different formats
read%3Ajira-work
read:jira-work
'read:jira-work'
- I’ve also tried changing the scopes directly in the custom connector Swagger file
Again I’m not sure how relevant this is, but when I add the scope to the authorisation URL the Atlassian error message just says ‘something went wrong’ and no API connection is created for the custom connector.
Below is an extract from the Custom Connector’s Swagger file:
securityDefinitions:
oauth2_auth:
type: oauth2
flow: accessCode
authorizationUrl: https://auth.atlassian.com/authorize
tokenUrl: https://api.atlassian.com/ex/jira/myConfirmedValidCloudid/rest/api/2/project
scopes: {read%3Ajira-work: read%3Ajira-work}
security:
oauth2_auth: [read%3Ajira-work]
Any guidance would be greatly appreciated.