How to get log in user infor in Confluence

Dear All,

I want to get the information of user who is currently logging in Confluence 4.3 from my plugin. As I have tried to search, the RemoteUser API is proper for this problem. But when I tried to use this api, the problem occurs. Also, I tried to find out the document of the API usage, but I cannot find.So my question is:

- Does RemoteUser API is the proper api in order to get informaiton of currently login user in Confluence? if not, I hope you could point out the way to solve this poblem. If yes, I hope you could tell me how to use this API.

Thanks in advance,

2 answers

1 accepted

0 votes
Accepted answer

Hi !

this should work:

HttpServletRequest request = ServletActionContext.getRequest();
String remoteUserName = request.getRemoteUser();
this.remoteUser = AuthenticatedUserThreadLocal.getUser();


I tried the these two ways. They all work properly! Thanks you so much, Thomas.


have your tried to use :


Thank Sandro, it realy works!

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

844 views 41 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you