How to list Confluence pages created by Unknown User

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.

Purpose

This knowledge base will provide instructions on how to get a list of all the content created by Unknown Users.

Technical Background

Users that are no longer in Confluence due to user deletion will still have their content preserved in Confluence. These content will have the mark "Created by Unknown User(username).

An Unknown User is technically a row in the database where a row exists in user_mapping table but the user_mapping.username does not map to a row in cwd_user.user_name. All content pages are stored in CONTENT table with CONTENT.creator mapping to user_mapping.user_key.

Solution

Run the following SQL query:

select s.spacekey, s.spacename, c.title as "Page Title", um.username as "Unknown User"
from content c, spaces s, user_mapping um left join cwd_user cu on um.username = cu.user_name
where c.spaceid = s.spaceid and c.contenttype = 'PAGE' and c.prevver is null and c.content_status = 'current'
and c.creator = um.user_key
and cu.id is null
order by s.spacekey, c.title
DescriptionHow to list out contents in Confluence that are marked as Created by Unknown User, by querying from the database.
ProductConfluence
Last modified on Jan 25, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.