Last updated Jul 8, 2024

How do I find the logged in user?

When writing a Confluence app, the user can be retrieved from the com.atlassian.confluence.user.AuthenticatedUserThreadLocal class, which will give you the current logged in user as a com.atlassian.confluence.user.ConfluenceUser object.

ConfluenceUser confluenceUser = AuthenticatedUserThreadLocal.get();

Note that if there is no logged in user, then the user object returned will be null.

Rate this page: