JQL "field does not exist or you do not have permission" in CI
Jira validates JQL field names against what the authenticated account can see. A misspelled field, or a custom field the account lacks access to, produces "does not exist or you do not have permission to view it."
What this error means
A /rest/api/3/search call fails with 400 and the JQL error naming a field, while simpler JQL queries succeed.
HTTP/1.1 400 Bad Request
{"errorMessages":["The field 'sprint' does not exist or you do not have permission to view it."],
"warningMessages":[]}Common causes
A field name typo or unavailable field
The JQL references a field that does not exist under that name for the account, so validation rejects the whole query.
The account cannot see a custom field
Custom field visibility depends on context and permission. A field the account cannot view appears not to exist in JQL.
How to fix it
Use a valid field reference
- Confirm the field name (or use
cf[10021]for a custom field id). - Ensure the account can view the field and its project context.
- Re-run the search with a corrected JQL string.
curl -sf -u "$JIRA_EMAIL:$JIRA_API_TOKEN" \
-G "https://your-domain.atlassian.net/rest/api/3/search" \
--data-urlencode 'jql=project = ABC AND cf[10020] = "EABC Sprint 5"'Grant the account access to the field
If the field is real, ensure the CI account is in a group/role that can view it, or reference a field it can see.
How to prevent it
- Reference custom fields by
cf[id]to avoid name ambiguity. - Grant the CI account visibility of fields your JQL uses.
- Validate JQL against the target site before relying on it.