once Jira returned user emails but now i don't get it. Do you have any idea how to get user emails now?
Hey there Yuriy, could you let us know which API call you used to obtain the email address? If you are on Jira Cloud, then it may be harder to obtain than before, as per the Cloud REST API for Get User Email : This API is only available to apps approved by Atlassian, according to these guidelines.
The guidelines link brings you to this page : Guidelines for requesting access to email address. Long story short, you're going to need to apply with Atlassian to permit your app to use the API and retrieve user emails.
Thank you for your helping!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had a similar issue with this.
I noticed that when I verified my domain and claimed those users as "managed accounts", the emailAddress values were included in the response for those accounts.
This is specifically in regards to
GET /rest/api/3/user/search
GET /rest/api/3/users/search
I have not seem this documented or confirmed by Jira though.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yuriy,
What Jira version you use? I think, you must use REST API Auth, see https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-basic-authentication/
Pavel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
after some struggle I was finally able to find the solution with the experimental API
you will need to create org API token (not your personal token)
here is the python script:
import requests# Atlassian credentials, get from https://support.atlassian.com/organization-administration/docs/manage-an-organization-with-the-admin-apis/
api_token =
organization_id =
url = f"https://api.atlassian.com/admin/v1/orgs/{organization_id}/users/search"# Define headers with Bearer token
headers = {"Authorization": f"Bearer {api_token}", "Accept": "application/json"}response = requests.post(
url,
headers=headers,
json={
"emailDomains": {"contains": "canonical.com"},
"expand": ["EMAIL", "EMAIL_VERIFIED"],
},
)
response.raise_for_status()content = response.json()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
If you are an org admin (for Jira cloud) you can use this API call, bypassing limitation from Atlassian:
It will return you all user info within your organization. However, it only returns 50 users at a time so you'll need to iterate until the list is ended.
I use it with combination of other JIRA API calls to get all user emails within a project.
Maksym
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
getting all user emails in a project is exactly what I need but I have no idea how to get there :D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.