Forums

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

Service Account OAuth2 - API always returns 401?

Iker Gómez Eiras
Contributor
April 10, 2026

I'm trying to set up a service account to automatically create tickets in our ITSM service when servers trigger specific alerts in their monitoring.

But when I try to call the endpoint to create the issue, through this endpoint:
https://api.atlassian.com/ex/jira/<instanceid>/rest/api/3/servicedeskapi/request

I always get a "401 Unauthorized; scope does not match" error.

I've tried and created multiple OAuth2.0 tokens with different scopes, using only classic, only granular, and both. Always making sure they have the scopes specified in the documentation for that endpoint.

I've also made sure that the service account has Service Management license and I've also added it to a group that is part of the "Service Desk Team" role in our support projects.

But always the same 401 error.

Am I being a complete idiot and missing something, or are API calls to the servidedesk enpoints just broken for OAuth tokens?

1 answer

1 accepted

3 votes
Answer accepted
Marc -Devoteam-
Community Champion
April 10, 2026

Hi @Iker Gómez Eiras 

Is the instance ID correct, use: 

https://<my-site-name>.atlassian.net/_edge/tenant_info

Is the Service Account also a customer, as using the current API endpoint does require this.

Iker Gómez Eiras
Contributor
April 13, 2026

Yup, that was it, thank you very much!

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