Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


How to get the AccountId of an Opsgenie user?

I'm trying to create some basic automation flows using the REST API, more specifically I'm trying to create actions/task on a Confuence page and assign them to the user that is currently on watch for an Opsgenie scheduler, but the identifier returned by the Opsgenie API is not an AccountId. There doesn't seem to be any way to get that AccountId, and there is no way to match the user against the user returned by the Confluence API since there is no "get user by email" method....

The Opsgenie instance is already using Atlassian login, so how is this supposed to work? The AccountId is supposed to be the unique identifier across all the Atlassian products, but it seems that Opsgenie still uses it's own identifier...

This is all in the cloud, not on-prem, and without any changes to the default setup.

1 answer

1 accepted

0 votes
Answer accepted
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 31, 2022

Hi @Olav Aukan 


In Opsgenie, each user has a username (i.e. their login email), and a User ID.


If you have the user's email address, you can make a Get User API request using the user's email address (i.e. "username") to get the user's Opsgenie User ID.


You can also List Users to return a list of all users, with their associated User ID's.


Hope this helps!




Hi @Samir 

Thank you for the quick response. I am aware of these two endpoints to retrieve users, but the problem is that the responses don't contain the AccountId of the users.

The AccountId and the User ID are tho different identifications, and I can't use a users User Id from Opsgenie to retrieve the corresponding user in Confluence since Confluence only allows you to query users by AccountId.

You can see the difference in the format of the Ids. The User ID in Opsgenie is a Guid (f7713593-fafe-4346-abc9-e34b0a940f43) but the AccountId in Confluence (and other Atlassian products) is the organization id, followed by a colon and the a Guid (123456:50a1dfb1-61ef-413d-bae4-c1cc2d6e8db9). The Guid-part of the Ids are also different for each product. 

So the question then is if there is a way to get the AccountId of a user based on the users ID in Opsgenie?

Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 31, 2022

Hi @Olav Aukan ,


Thanks for clarifying. I think the issue is these are 2 different API's. There's the Opsgenie API, which doesn't use nor return the Atlassian ID, then there's the Atlassian User Management API.


The Opsgenie API's do not return any information about the associated Atlassian User account. It doesn't look like the Atlassian Cloud User API allows you to use emails/usernames as identifiers, so there wouldn't be a way to an associated Atlassian User ID given an Opsgenie user id/username.


I can enter a feature request for the Opsgenie User API to return the associated Atlassian User's AccountID. (Opsgenie user is linked to an associated Atlassian User account by their login email).

Like # people like this

Hi again @Samir 

A feature request for this would be brilliant, Like you said, there is already a link between the Opsgenie account and the Atlassian account, so maybe it's a quick feature to implement.

Thanks for the help so far!

@Samir do you have a link to this feature request? This problem is affecting us at Xometry also, as we are also trying to create automation that will auto-assign incoming support tickets to opsgenie on-call rotations.

Is there an update from any of the participants in this thread? We too would like to do an automation based on the Opsgenie on-call rotations

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events