Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Username from user mail

Dishant Sharma
Contributor
October 4, 2022

I am using confluence server 7.13.7. Is there a way through which I can get a user’s username through the user’s mail?

2 answers

0 votes
Fabio Racobaldo _Herzum_
Community Champion
October 4, 2022

Hi @Dishant Sharma ,

In the Users&Security->User you can search a user based on username or email. So, as a Confluence Admin, if you go to Administration -> User Management -> Users you can perform that action by yourself.

Hope this helps,

Fabio

Dishant Sharma
Contributor
October 4, 2022

@Fabio Racobaldo _Herzum_  Thanks for the reply. Actually, I was looking for a REST API so that I can use the returned username inside my code.

Fabio Racobaldo _Herzum_
Community Champion
October 4, 2022
Alex Koxaras _Relational_
Community Champion
October 4, 2022

@Fabio Racobaldo _Herzum_ the API you provided is for Jira, but @Dishant Sharma is asking for Confluence. Unless the latter really wants for Jira and he mistakenly stated Confluence. Can the above work for Confluence?

Fabio Racobaldo _Herzum_
Community Champion
October 4, 2022

You are right @Alex Koxaras _Relational_ . It seems to be not existing for Confluence. 

I found the following ticket https://jira.atlassian.com/browse/CONFSERVER-47399 that seems to be be fixed without a suggestion.

Alex Koxaras _Relational_
Community Champion
October 4, 2022

Nice @Fabio Racobaldo _Herzum_ and thank you for sharing this! It would be great if they would the endpoint as well.. :/

Like # people like this
0 votes
Alex Koxaras _Relational_
Community Champion
October 4, 2022

Hi @Dishant Sharma 

You could get it by using scriptrunner. What do you want to achieve?

Dishant Sharma
Contributor
October 4, 2022

@Alex Koxaras _Relational_ thank you so much for the reply. Actually, I want to get a user's name on the basis of their email. I will have the list of user emails in a confluence instance and I want to fetch their username so that I can use it for making other API calls to get some more details about that particular user. I will also have the required administrative privileges to make such API calls.

Alex Koxaras _Relational_
Community Champion
October 4, 2022

@Dishant Sharma I don't get it..

A user will send you an email.

You want from that email to get the users' username automatically (?).

And make some API requests.

Correct?

Dishant Sharma
Contributor
October 4, 2022

@Alex Koxaras _Relational_ Yes, I want the user's username.

Alex Koxaras _Relational_
Community Champion
October 4, 2022

Sorry but the above logic it doesn't make sense to me...

If you want to get the user's username from an email you got in your email inbox, then Confluence is not the place to look for. I think that you have not setup the proper stage for us. I mean that I can understand your request (get the user's username) but you haven't told us from where you want to get this.  

Dishant Sharma
Contributor
October 4, 2022

@Alex Koxaras _Relational_ sorry, actually I mean I want an API in which I can pass the user's mail as a query parameter and I can get back the user's username associated with that email address.

Alex Koxaras _Relational_
Community Champion
October 4, 2022

@Dishant Sharma 

Thank you for the clarification! Try the following then:

/rest/prototype/1/user/non-system/USERNAME

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events