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.
Hi Community! Thank you to all who joined our ongoing monthly Atlassian Access demo! We have an engaging group of attendees who asked many great questions. I’ll share a recap of frequently ask...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events