How to get user key in Confluence cloud?

Hana Kučerová
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 13, 2021

Hi everybody,

when I do full XML export of space from Confluence cloud, there are definitions of users, something like:

<object class="ConfluenceUserImpl" package="com.atlassian.confluence.user">
<id name="key"><![CDATA[user_key]]></id>
<property name="name"><![CDATA[user_email]]></property>
<property name="lowerName"><![CDATA[user_email]]></property>
<property name="atlassianAccountId"><![CDATA[user_account_id]]></property>
</object>

Are you aware of any other (ideally easier) way how to get the user_key other then XML export?

It is possible to get this information from REST API in server using endpoint /rest/api/user?username=user_username (there's userKey param in the response), but when I use cloud endpoint /wiki/rest/api/user?accountId=user_accountId, this information is missing in the response.

I also tried to find it somewhere in the admin section in user's profile etc., but no luck.

Thank you very much!

1 answer

0 votes
Martin Bayer _MoroSystems_ s_r_o__
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 13, 2021

Hi @Hana Kučerová , I don't think you can get it using REST API. There is a deprecation notice which describes where and why the username and userkey attributes are removed:

https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/

Hana Kučerová
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 13, 2021

Thanks @Martin Bayer _MoroSystems_ s_r_o__ .

So it looks like I will need to use the XML export. Not nice, but I can live with it :-). I just wanted to be sure I'm not missing something.

Martin Bayer _MoroSystems_ s_r_o__
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 13, 2021

NP :), and can you share the use case in which you need user key?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events