Incomprehensible value of user_id/user_key in webhooks

Sergey Matveev May 20, 2021

I have several webhooks on Jira Cloud. Each webhook, in additional to parameters, add two of its own: user_id and user_key with understandable values - username

 

Now i see these parameters contain strange values like:

ug:29affccb-e7e8-416a-848f-b3cbe38ad527

What is this id? 

I checked it is not accountId

 

Also strange

Some people who use these webhooks generate normal username, and some people like this ug:29affccb-e7e8-416a-848f-b3cbe38ad527

2 answers

0 votes
Yatish Madhav
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 16, 2022

Hi

I wonder what the diff is between the 2?

Eg if a user is set to be assigned using the account id 621a81398b8c2f002297ab25 and the error returned is "User 'ug:168f9cdc-ef12-4e74-65b5-c1f85394afdd' cannot be assigned issues"

What is 621a81398b8c2f002297ab25 vs ug:168f9cdc-ef12-4e74-65b5-c1f85394afdd?

Please advise?

Thank you
Yatish

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 20, 2021

Hi Sergey - that value is indeed the account id for the user. 

Sergey Matveev May 20, 2021

Hi John! If it is accound id for the user, why i can't get user info via 

/rest/api/3/user/groups?accountId=ug:29affccb-e7e8-416a-848f-b3cbe38ad527

 

Response:

{ "errorMessages": [ "Specified user does not exist or you do not have required permissions" ], "errors": {}}

 

?

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 20, 2021

It might be more of a permission error than a value error 

Sergey Matveev May 21, 2021

But i have admin rules :-) 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 21, 2021

who is the webhook running as? i.e. what user?

Also, you can verify the accountID by just running a simple filter like

assignee = ug:29affccb-e7e8-416a-848f-b3cbe38ad527

Sergey Matveev May 21, 2021

Wow, realy! 

assignee = ug:29affccb-e7e8-416a-848f-b3cbe38ad527 return some tickets with specific user.

But why i can't find this id in user info?  /rest/api/3/user 

 

I am looking the way to get username by this id: ug:29affccb-e7e8-416a-848f-b3cbe38ad527 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 21, 2021

I still think it is a permission thing with how you are using the webhook - can you share the webhook you are using? 

Sergey Matveev June 9, 2021

simple webhook: https://{jenkins_url}/buildByToken/buildWithParameters?job=deploy_issue&token={token}&ISSUE=${issue.key}

 

for some person Jira add additional parameter &user_id=sergey.matveev

for some person add &user_id=ug:29affccb-e7e8-416a-848f-b3cbe38ad527

Jan Duda March 11, 2022

Hi Sergey,

have you found a solution for this issue? I tried everything, but it's impossible to get accountId from user_id (user_key) using REST API. 

Thank you for any advice.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events