Forums

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

Getting user in Confluence using REST call and email address does not work.

Jamie Wolman
Contributor
September 10, 2025

I am trying to get the user account id via email because I the full name I am given may not not be the full name of the person in Confluence. I need to use a consistent value.

https://xxx.atlassian.net/wiki/rest/api/search?cql=user.email~"xxx@gmail.com"

but I am getting below error :  

 

{
    "statusCode": 400,
    "data": {
        "authorized": true,
        "valid": true,
        "errors": [],
        "successful": true
    },
    "message": "com.atlassian.confluence.api.service.exceptions.BadRequestException: No field exists with the name: 'user.email' Did you mean one of : user.fullname, user.accountid, user"
}


I need to be able to get users by email as that is a consistent value whereas Full Name is not consistent between my various systems that Full Name might be different in the system I am using to determine when to make this call as to what's in Confluence. I really need to be able to get users by email address (the consistent value)

2 answers

1 vote
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 10, 2025

Hi @Jamie Wolman 

You can't get a user based on email address via the API ( has been for over a year).

You can only use account ID in the API.

To get a users account ID for a user in Confluence use; get-an-atlassian-cloud-users-account-id 

Jamie Wolman
Contributor
September 10, 2025

I need the accountID from Confluence. I don't have that value which is why I need to get the user based on some other value such as email or name. The problem is Name may not be consistent between where I am getting it from and Confluence, but email is consistent. 

Names are names and systems store them differently using different formats or true fullnames or nicknames, but emails are always consistent.

 

Would be nice to have the REST call accept getting confluence user by email.

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 10, 2025

Hi @Jamie Wolman 

This was there in the early day, but this has been removed, based on security and GDRP guidelines.

This option won't come back.

Jamie Wolman
Contributor
September 10, 2025

Just ran into this right now (today) I have a name which is a duplicate of another name (meaning two people with the same name) but of course have different emails. Just getting Confluence users by fullname is proving to be difficult because of just being able to use names. Thanks.

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 10, 2025

Hi @Jamie Wolman 

You show a CQL search, and that would find Confluence content, not users.  Instead, please try using the Jira find user endpoint to search by email address:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-search/#api-rest-api-3-user-search-get

Kind regards,
Bill

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 10, 2025

Hi @Bill Sheboy 

Yes this can work, but it will return an account ID, but it won't if this user has access to Confluence?

Then also the following endpoint could be used: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-bulk-migration-get 

Jamie Wolman
Contributor
September 10, 2025

I get the following results:

{
    "errorMessage": "Page not found"
}
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 10, 2025

Hi @Jamie Wolman 

Be aware the option @Bill Sheboy and I gave you need to use the Jira API

So use this as a base url: https://xxx.atlassian.net/rest

Jamie Wolman
Contributor
September 10, 2025

https://xxx.atlassian.net/rest/api/3/user/search?query=query

This is what I am using and it's not working for me. Get the Page Not Found message.

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 10, 2025

Hi @Jamie Wolman 

In the call you need to provide information like the email address.

Example: https://xxx.atlassian.net/rest/api/3/user/search?query=test@test.com

 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 10, 2025

@Marc - Devoteam -- You are correct about the users' access, and my assumption was the Confluence user set is likely a subset of the Jira ones.  If not, other methods are needed.

 

@Jamie Wolman -- How are you using that endpoint call and with which user's permissions?

For example, if you log into Jira with a browser, open an additional tab, and then paste in that URL, do you get a result?  If so, that indicates the way the endpoint is called is the problem and not the call itself.

Jamie Wolman
Contributor
September 10, 2025

I am using POSTMAN which is what I always use to test out my endpoint calls, before I add them to my program (typically Azure Logic Apps). I have Confluence Cloud, not a specific Jira site that I know. I am new to taking over Confluence so I only know what I know at this time but the call does not work I have programmed a work around and a check if I cannot find the user by the fullname per my original endpoint I email myself that I might have to do something manually. But this is a work around and a minor annoyance since I cannot query on the email.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 10, 2025

Have you tried other endpoint calls with the same credentials using Postman to confirm you are getting any results?  This would rule out a permissions problem.  Thanks!

Jamie Wolman
Contributor
September 10, 2025

This endpoint works in postman, https://xxx.atlassian.net/wiki/rest/api/search/user?cql=user.fullname~ "xxxx"

 

This endpoint works in postman, https://api.atlassian.com/users/xxx/manage/lifecycle/disable

 

My assumption is that the endpoint you gave me does not work.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 10, 2025

Perhaps work with your Site Admin to submit a ticket to Atlassian support if you are seeing inconsistent results with the revised Confluence user search endpoint. If you are on a paid license, you may do that here:

https://support.atlassian.com/contact/#/

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events