You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I am calling PUT API to update a user account. The updated account has different username and primary email than the account on creation. In the response of the API, I am getting urn:scim:schemas:extension:atlassian-external:1.0 : , that is no external accountId is getting fetched in the response.
I have come across find users api where I can pass primary email of user in request parameter and get the accountId of that account in response. However, I can get accountId only if the email of the account has not been not updated since account creation.
Is there any API to get accountId even if account's primary email has been updated? Without the accountId I cannot add space permissions for a user in Confluence cloud.
Hello @Mrinalini Pal ,
In order to get the accountID for a user via REST API there are multiple options:
1) Use the Search users REST API endpoint for Confluence and search for a string that matches the public name or display name or the email address of the user like in below example:
"publicName": "Dario B",
"displayName": "Dario BXXXXXXXX",
2) Use the Jira REST API endpoint you already found but match the displayName instead of the email address if this is not working for you:
[... removed ...]
"displayName": "Dario BXXXXXXX",
3) I am not sure about this since I have never tried myself, so please double-check, but the externalID that you get when using the User Provisioning REST API should match the accountID and therefore you could use one of the below endpoints:
Finally, I'd like to get more details on the fact that you are not able to use the find users api if the email address has changed since I am not aware of this issue.
Have you actually checked if it is not just a matter of time after changing the email address (you might have to wait for it to be synchronized), or you are not able to search for email addresses that have been updated in the past days too?
Please let me know.