Forums

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

Unable to get account Id of user in Jira Rest API v2 for Jira Server

Sunil Thakur September 3, 2020

Hi,

I am trying to get user details using Jira Rest API v2. I am getting all details related to the user except Account Id. Can anyone help me out how to get account Id as well.

Thanks

2 answers

1 vote
Prince Nyeche
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 Leaders.
September 4, 2020

Hi @Sunil Thakur 

if your question is meant for Jira Cloud, please can you share the endpoint you're using for that request where you did perform a user search and the result came back without an accountId? As accountId is specific to Atlassian Cloud and not the Jira Server version.

0 votes
Ti-Fen Pan February 14, 2022

@Prince Nyeche  We are trying to figure out account id for jira server as well because mult-user field does not accept user_name for jira server request type submission.   The below is one of the  example.  Any pointers here?

--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic c3ZjX212d29ya3NfamlyYTppOSo0N25DcSpLTjJLMmhVdEtmVg==' \
--data-raw '{
"requestTypeId": "88",
"serviceDeskId": "4",
"raiseOnBehalfOf": "xxx@moveworks.ai",
"requestFieldValues": {
"summary": "Moveworks/Vaya Test (please ignore)",
"components": [{"name": "Active Directory"}],
"customfield_10085": [{"id": "10157"}],
"customfield_10052": {"name": "user_name"}
}
}'

The response we got 
```
bond server reply: rest_pool: {\"errorMessage\":\"Your request could not be created. Please check the fields have been correctly filled in. We can't create this issue for you right now, it could be due to unsupported content you've entered into one or more of the issue fields. If this situation persists, contact your administrator as they'll be able to access more specific information in the log file.\",\"i18nErrorMessage\":{\"i18nKey\":\"sd.validation.request.creation.failure.required.field\",\"parameters\":[\"We can't create this issue for you right now, it could be due to unsupported content you've entered into one or more of the issue fields. If this situation persists, contact your administrator as they'll be able to access more specific information in the log file.\```
Prince Nyeche
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 Leaders.
February 23, 2022

I don't think Jira server uses accountId. AccountId is only specific for cloud instances.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events