I have created a service account.
I can see it in admin.atlassian.com under directory -> Service accounts.
I want to create an API token. The following happens:
The issue is that the generated token is not working (401 Unauthorized). But what is even more worrying is that the newly created credential is not visible in the list of credentials for the service account.
I asked another admin for a different site if she could create credentials and the credentials didn't show up for her either.
Are any of you able to create new credentials for your service account at the moment?
/Daniel
Hi @Daniel Hamngren ,
I would check two separate things here.
For the 401 Unauthorized, make sure the request is using the correct endpoint format for scoped service account API tokens. Atlassian’s docs say these tokens should be used through the Platform API Gateway, for example:
https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/...
instead of calling the site URL directly, such as:
https://your-site.atlassian.net/rest/api/3/...
Also check:
- the token has the required Jira scopes, for example read/write scopes depending on the endpoint
- the service account has app access
- the service account has the required Jira project permissions
- you are using the service account email/account with the token, not your personal user
The part that worries me more is the credential not appearing in the service account credentials list after creation. If the same behaviour happens across different sites/admins, that sounds less like a permission problem and more like a possible Atlassian-side issue or rollout problem.
As a quick test, I would try a simple GET request against:
https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/project/{projectKey}
If that fails with 401, it is likely endpoint/auth/scope/app access. If the token is created but not listed in Admin afterwards, I would raise it with Atlassian Support.
Hi! Thank you for your reply, this is a strange issue. 😅
It is hard to verify that the token actually got the correct scope since it is not visible in the service account credentials list after creation.
I can't contact Atlassian Support since I am using the free tier of Jira.
I tried creating a OAuth 2.0 credential as well (before I only tried API Token) but when I try to create it i got this error message:
Are you able to create a new service account credential?
/Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Daniel Hamngren ,
Thanks for the extra details.
If the service account has app access, project permissions, and the token was created with `read:jira-work`, then I agree this starts to look less like a normal Jira permission problem.
One thing to check: Atlassian’s documentation says OAuth 2.0 credentials for service accounts require the centralized user management experience. If your site/org is still on the original user management experience, OAuth 2.0 credentials may not behave as expected.
Docs:
https://support.atlassian.com/user-management/docs/create-oauth-2-0-credential-for-service-accounts/
For the API token path, the docs also say scoped service account tokens should use the `api.atlassian.com` gateway URL:
https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/...
Docs:
https://support.atlassian.com/user-management/docs/manage-api-tokens-for-service-accounts/
Since you are seeing two symptoms:
- the created API token is not visible afterwards
- OAuth 2.0 credential creation fails in the admin UI
I would suspect an Atlassian Admin / service account credential provisioning issue, not only a REST API permission issue.
I cannot verify it inside your organization, but I would try:
1. Check whether your organization uses centralized user management
2. Try creating the credential in an incognito window or another browser
3. Try creating a credential on a new test service account
4. Check the organization audit log for service account / credential events
5. If the UI still says “Error creating OAuth credential”, I would raise this as an Atlassian-side issue, even if support access is limited on the Free plan
The token not appearing after creation is the strongest signal here. If it is not listed, it is hard to trust that it was provisioned correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your answer.
1. My organization using Centralized User Management
2. I have tried creating the credential in another browser (first I used firefox, I also tried in edge with the same issue)
3. Creating a new service account didn't solve the issue.
4. I can't view the Audit Log since I do not subscribe to Atlassian Guard.
5. I have no idea how to raise this to Atlassian when I am not a paying subscriber.
Another admin for another organization had the same issue when creating new credentials. @Arkadiusz Wroblewski were able to create a new credential. Are you @Germán Morales _ Hiera able to do that?
Thank you for giving this issue your attention. I very much appreciate that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Daniel Hamngren
Please try first steps from here 401 Unauthorized error when service account accesses Jira or Confluence API | Atlassian Cloud | Atlassian Support
If that doesn’t help, please let us know.
Best,
Arkadiusz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I tried the steps. I am using the correct URL for api requests.
That didn't help.
And there are still no credentials in the list under my service account.
Are you able to create a service account credential?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'll check that within the next 2-3 hours and let you know.🤠🤞
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No problem from my side. I’ll double-check it tomorrow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much for checking!
I am still flailing in the dark over here 😅
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Still no problem on my end, so this is probably a backend issue on your side. It needs to be checked by Atlassian on the backend.
I flagged this post for you. Creating an API token or setting up OAuth should normally be straightforward, so if it still does not work, Atlassian will need to investigate it directly.
Best,
Arkadiusz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.