The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Pulling Reporter's Manager from API

Ryan_Buschmeyer
Contributor
November 20, 2024

We sync our user data from Entra ID using Atlassian Guard and Entra's provisioning. Currently, we can see any user's Manager in Atlassian Home, so we know that information is being pushed from Entra into Jira.

Use Case: 

What we are trying to do is set up an approval flow where the Reporter's manager is automatically populated into the "Approving Manager" field (user select).

What I need to be able to do is get the Reporter's Manager (by ID) either from a smart value or from the API and I've not been able to find it anywhere. When I use the API in Postman to pull the User properties, I get the following below:

 

{
"self": "https://xxx.atlassian.net/rest/api/2/user?accountId=xxx",
"accountId": "<user's account ID>",
"accountType": "atlassian",
"emailAddress": "<user's email address>",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/9bf6a2607ae9d1e795eed0b78456f34e?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAK-5.png",
"24x24": "https://secure.gravatar.com/avatar/9bf6a2607ae9d1e795eed0b78456f34e?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAK-5.png",
"16x16": "https://secure.gravatar.com/avatar/9bf6a2607ae9d1e795eed0b78456f34e?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAK-5.png",
"32x32": "https://secure.gravatar.com/avatar/9bf6a2607ae9d1e795eed0b78456f34e?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAK-5.png"
},
"displayName": "<name of user>",
"active": true,
"locale": "en_US"
},

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Jehan Bhathena
Community Champion
November 20, 2024

Hi @Ryan_Buschmeyer 

I haven't tried this yet, but I'm assuming that the Managers name is mentioned as a User Property. Can you try this API to see if it gives you the required details in response : https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-user-properties/#api-rest-api-2-user-properties-propertykey-get

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events