Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Cloud OAuth 2.0 – JQL API works but granular scopes not reflected

Rohit Thakur
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 9, 2025

 

Hi Community,

We are migrating from the deprecated /rest/api/3/search endpoint (Basic Auth + API token) to the new /rest/api/3/jql/search endpoint which requires OAuth 2.0 granular scopes.

Here’s what we’ve done so far:

  • Created an OAuth 2.0 (3LO) app in the Atlassian developer console.

  • Requested granular scopes:

    • read:jql:jira

    • validate:jql:jira

  • Completed the consent flow using the authorization URL with these scopes.

  • Successfully exchanged the code for an access token.

When decoding the access token, we do see:

 

"scope": "read:jql:jira validate:jql:jira"

However, when we try to call the JQL endpoint:

 

POST https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/jql/search Authorization: Bearer <access_token> Content-Type: application/json { "queries": [ { "query": "project = TEST AND created >= -7d", "maxResults": 5, "fields": ["key", "summary", "status"] } ] }

 

We still get this error:

 

{"code":401,"message":"Unauthorized; scope does not match"} 

Questions:

  1. Are read:jql:jira and validate:jql:jira the correct scopes for using the new JQL API?

  2. Should we remove legacy scopes (like read:jira-work) completely and only use granular scopes?

  3. Why does the token show the correct scopes but the request still fails with Unauthorized; scope does not match?

  4. Is there any migration guidance specific to JQL and granular scopes beyond the changelog note (CHANGE-2046)?

 

1 answer

0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 9, 2025

Hi @Rohit Thakur 

Welcome to the community.

All scopes mentioned in the API endpoint are required. 

So all these are needed:

  • read:jira-work
  • read:issue-details:jira
  • read:audit-log:jira
  • read:avatar:jira
  • read:field-configuration:jira
  • read:issue-meta:jira
Rohit Thakur
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 9, 2025

@Marc - Devoteam So, should we use a mixture of granular and legacy scopes?

 

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 9, 2025

Hi @Rohit Thakur 

Yes, according to the API documentation.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events