Forums

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

A Guide to Service Accounts in Atlassian Cloud - Part 3: Service Accounts in Practice

Part 3: Atlassian Service Accounts in Practice

Now that we’ve set up our Service Account, we need to understand how to use it. As we identified in Part 1 of the series, Service Accounts sole purpose (for now) is to be used for API calls.

To help you get started, I’ve collected common pitfalls and errors, that I’ve encountered or been reported. Disclaimer: I am NOT a developer and by no means a specialist on APIs. So please correct me if I’m wrong and I’ll update this article for future readers.

 


Understanding & Using the Atlassian API

The correct API

There are two ways to access Atlassian REST APIs.

The most common and well documented one is the one, that includes your site url, followed by the specific request:

https://your-site.atlassian.net/{endpoint}

This way of calling the API cannot be used with scoped tokens. And as Service Account tokens cannot be created without scope, this API won’t work with them.

Luckily, there is another way via the api.atlassian.com base url, and most endpoints should work with that by now (not tested all).

https://api.atlassian.com/ex/confluence/{cloudId}/{endpoint}
https://api.atlassian.com/ex/jira/{cloudId}/{endpoint}

Rather than your site url, you need your Cloud ID to specify the target site.

💡
Find your Cloud ID by calling “https://<your-site>.atlassian.net/_edge/tenant_info", replacing “your-site” with your site url.
💡

Adding the Token

The API Token can be sent in the Header as Bearer Token. It doesn’t need to be hashed and you don’t need the Service Account Email (this is only required for Basic Authentication, which is shown in a lot of tutorials and listed in documentation).

Example curl Code for listing all Confluence spaces, the Service Account has access to:

curl --request GET \
      -H "Authorization: Bearer $TOKEN" \
      --url "https://api.atlassian.com/ex/confluence/{cloudId}/wiki/api/v2/spaces?limit=250"

💡
Make sure to safely store the token.

Do:

  • Store tokens in secret managers or password managers.
  • Inject them into runtime via environment variables or secret volumes.

Don’t:

  • Commit them to Git.
  • Put them in Dockerfiles or plain config files.
  • Paste them into public channels.

💡

 


Common pitfalls

Wrong API version

Only the latest API versions support the needed base url format and scoped access. Unsupported endpoints will results in 404s or 403s.

 

Pagination

Some endpoints use pagination. You can identify them by looking at the request parameters.

Note: The Confluence and Jira APIs use DIFFERENT ways of pagination. While Confluence uses cursor-based pagination, Jira uses off-set pagination. The specifics are documented in each API overview section.

Confluence: https://developer.atlassian.com/cloud/confluence/rest/v2/intro/#using
Jira: https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination

 

Internal Redirects

Some endpoints internally redirect to a different URL. One example is the “Get Attachment” endpoint in Confluence. Per default, redirecting is usually disabled.

For curl, you need to set the “location” flag.

curl --request GET \
  -H "Authorization: Bearer $TOKEN" \
  --location \

For Python it is the “allow_redirects” flag.

response = requests.get('http://example.com/redirecting-url', allow_redirects=True)

 

Incorrect token scopes or permissions

If you keep getting 401 or 403 responses, check your token scope. For best results, start with a very specific token for that one endpoint and only set the granular scope that is required for that specific endpoint.

Remember that not only the token needs to match but also App level Permissions (license + content access).

 

Using (Python) libraries

Python libraries, and probably most others, use the wrong API base url. As only the api.atlassian.net base url will work, the libraries cannot be used with Service Accounts.

 

Trial and Error

That’s the part I don’t like. A lot of this is trial & error. If you cannot create endless Service Accounts and Tokens, it’s easiest to test everything with a personal scoped token first. If it works for that, then test with the same scope with a Service Account.

Also, test against a Sandbox or Test environment especially with Write-Requests. But that should be self-explanatory. Right?


Service Accounts for API Calls in Automation

Nothing special here. Rather than using your personal Account to send Web Requests, you can use your Service Account Credentials for calls against the Atlassian API.

Remember to add the Authorization Header. Hide the Header once your setup is done to make sure nobody can copy that token!

image-20260128-201027.png

💡
You can use Smart Values in the request body as well as the url. Note that you need to url encode those values: https://support.atlassian.com/automation/kb/url-encode-jira-smart-values-using-20-instead-of-character/

💡

 


Missing Features

As per usual, Atlassian delivered Service Accounts at a state where they have not yet reached their full potential. So there still are a few things, that won't work.

❌ Service Accounts as Rule Actors

The “Automation for Jira” user is a blessing and a curse at the same time. Before, you needed a “Technical User” Account to be able to mingle with anything Jira without traces back to yourself. Now, you can save a license and just use Automation for Jira. It has access to everything and virtually no limits. And that’s the problem. It doesn’t respect permission limits, even if a regular user is setting up the automation. Atlassian also realized that and rumors have it, that the Automation for Jira user will be deprecated in the near future. With Confluence Automation, Atlassian simply didn’t provide a “Confluence for Automation” user to begin with.

Service Accounts to the rescue. You’d think. Unfortunately, Atlassian doesn’t yet allow Service Accounts to be added as Rule Actors.

I’ve tried doing it via the UI, Rule Export/Import and updating the Rule via API. Everything failed. I also had the Support confirm this. So the only thing left to do is vote the feature request: [AUTO-2008] Ability to add Service Accounts as actors for Jira & Confluence Automation - Create and track feature requests for Atlassian products.

I also have a meeting with the Automation team in a couple of days so stay tuned for an update or part 4 :)

❌ Service Account for Rovo Connection

If you connect a Rovo Agent in your Automation, it will always use your user as a Connection. Meaning: Regarless of who triggers the Automation, Rovo will run with your access and permissions and return results respectively. I already flagged this as a risk for data leackage numerous times and am hoping that Service Accounts could become the answer to my prayers. 

 

❌ Org Admin approved Self Service

Creating Service Accounts doesn't scale really well at the moment. I see the potential for some self service options where users can request certain things and Org Admins only need to approve. At the very least it would be great to see the Token Scopes and maybe the option to copy the token configuration.

 


 

That's it for now.

Thanks for following along.

In case you missed it:

Part 1: What they are (for)

Part 2: Setting up a Service Account

I'm interested: What APIs have you used successfully with Service Accounts? Let me know in the comments and I'll add them to this article!

11 comments

Rimantas Andrulevičius
Community Champion
February 4, 2026

Hey @Rebekka Heilmann _viadee_ ,

Amazing series of articles! Really, amazing.

I had one note - I can actually set the rule actor to the Service Account on one of my clients sites. One drawback that he also then needs to be the rule owner.

Have you tried adding the service account as rule owner and actor? (it was actually a standard Atlassian Acccount)

Anyway, looking forward for part 4 :)

 

Oh and one question - did you find a way of actually hide the auth token when using Service account tokens in Automation web requests (which require authentication) actions?
I mean, after encoding the token (and even if added as a variable) and then used in the web request - the encoded token is still in plain text (which "only" other Jira/Confluence admins can see/reuse it)

Rebekka Heilmann _viadee_
Community Champion
February 4, 2026

@Rimantas Andrulevičius interesting. I cannot set the Service Account as Rule owner. Is that simply an option in the UI for you?

Once you hide a parameter and update the rule, nobody including yourself can "unhide" the value:

Screenshot 2026-02-04 134937.png

It's also hidden in the exported JSON.

Like # people like this
Rebekka Heilmann _viadee_
Community Champion
February 4, 2026

@Gerusa Lobo Ping for Part 3. Do these tips help you at all? Otherwise it would be great if you could post a seperate question in the Forum and mention me there.

Rimantas Andrulevičius
Community Champion
February 4, 2026

@Rebekka Heilmann _viadee_  yeah simply in the UI. (it was actually a standard Atlassian Acccount)

Hm, the hidden value feature... seems to be new, right? I just noticed it now, when you showed the screenshot :D 

Rimantas Andrulevičius
Community Champion
February 5, 2026

@Rebekka Heilmann _viadee_  I double checked - sadly, it's actually a casual Atlassian Account, not a Service Account. The tech user name is with "Service Account" in it so I mixed up.

Yeah, it's totally sad that we can't add a service account in automations.

Greg D
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 Champions.
February 8, 2026

Awesome 3-part series @Rebekka Heilmann _viadee_ (and @Darryl Lee for the review since Rebekka mentioned that)!

 

We have been working through this Atlassian native service account journey too. As you mentioned, this approach with our own fully licensed additional proxy technical users has been happening for many years (we actually have always called them service accounts internally and so this term from Atlassian resonates). We are trying to pivot use-cases from our internal service accounts into these new native accounts and scale them since they make a lot more sense.

By testing a lot of API calls, we have proven these native service accounts can work as a replacement for any integration need where that function only needs to interact with an Atlassian app from an external system.

From my perspective, here are some big things to note:

  • One of their huge benefits - you can have them auth via a service-to-service OAuth 2.0 flow where you utilize the client credentials (ID and Secret) to then grab temporary OAuth tokens to interact with your sites
    • This is an upgrade in security and helps navigate the token rotation landscape
  • We would love to have an in-app secret sharing function and proper tagging so that you don't need to manage all of that information in something like a Confluence database or externally
    • Would be great to associate an Atlassian Team with these native service accounts and that gives them access to certain things... maybe
      • Grab the secret when Org Admin allows - could be temporary for the first share
      • Add more secrets for other purposes if Org Admin allows
      • Scope changes to existing secret like it is an app - this would be good even for just Org Admins right now
      • Notifications to let Org/Team/individuals know certain things
        • when token rotation is needed in advance of expiration
        • when a scope is changed (still needs the ability to change it)
        • app access provided
        • etc.

 

Hopefully your discussion with Atlassian went well (would love to hear what the Automation team said... Confluence really needs some way to have something beyond a hard-coded individual taking actions... and all Automation in Jira and Confluence could use an Atlassian Team being an Owner for error notifications).

Maybe you can sync up with @Andree Lindenblatt _AC Cologne_ on more of the details and we can all discuss what you have learned!

Rodolfo Romero - Adaptavist
Contributor
February 23, 2026

Is it possible to use a service account to create Jira spaces (projects) with shared configuration using the REST API? If so, what would be the REST endpoint to used and should the authentication be Basica Auth or Bearer?

Rebekka Heilmann _viadee_
Community Champion
February 23, 2026

Hi @Rodolfo Romero - Adaptavist 

I don't think you can create spaces with shared configs through the API. There's only The Jira Cloud platform REST API which supports the default system templates. So you need to create the project first and then set the schemes one after one based on ID.

The Authentication is the same for all APIs and Bearer is recommended.

Rodolfo Romero - Adaptavist
Contributor
February 23, 2026

@Rebekka Heilmann _viadee_ yes you can create Jira spaces with shared configuration with the REST API using the following REST endpoint, but it only works with regular user accounts. I've tested this and it works.

https://your_domain.atlassian.net/rest/simplified/latest/project/shared

The body of your call would be something like this

{"key": "<new_space_key>", "name": "<new_space_name>", "existingProjectId": "<shared_space_id"}

More info can be found in the link below.

https://community.atlassian.com/forums/Jira-articles/Jira-Cloud-Automation-Create-a-project-with-shared-settings-from/ba-p/1970419

I'm trying to do the same but with a service account. Maybe it doesn't work because service accounts need to access api.atlassian.com?

Rebekka Heilmann _viadee_
Community Champion
February 25, 2026

@Rodolfo Romero - Adaptavist I saw that article, that is a hidden API though. And as stated in my article and noted by you, Service Accounts only work with 

api.atlassian.com

base url. 

Rebekka Heilmann _viadee_
Community Champion
February 25, 2026

Update from the Automation team

There are apparently no current plans for replacing the "Jira for Automation" user or enabling Service Accounts for Automation. They are watching the feature request closely.

We then drifted to Service Accounts for Rovo to manage access for Agents running within Automation rules. We discussed that in length and when it comes to permissions (who can edit the permissions, are they set per Agent per Automation, etc.) it gets complicated quickly. There is a need though and they will probably ship some advancements towards that idea where other people will not be able to use my user connection for the Rovo Agent once they update a rule.

FYI @Greg D 

 

Further more, Service Accounts for MCP

We can now use Service Accounts for Rovo MCP: https://support.atlassian.com/atlassian-rovo-mcp-server/docs/configuring-authentication-via-api-token/

Like Greg D likes this

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events