pycontribs / jira

Python Jira library. Development chat available on https://matrix.to/#/#pycontribs:matrix.org
https://jira.readthedocs.io
BSD 2-Clause "Simplified" License
1.96k stars 873 forks source link

Implement /rest/api/<version>/user/email #1684

Open sushilkar opened 1 year ago

sushilkar commented 1 year ago

Problem trying to solve

GDPR enabled, there is no way to get the email address of the user from conn.user(account_id)

Implement /rest/api//user/email which can lookup the user by accountId and return the response as:

{"accountId":"<string>","email":"<string>"}

https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-rest-api-2-user-email-get

Possible solution(s)

No response

Alternatives

No response

Additional Context

No response

princenyeche commented 1 year ago

@sushilkar Getting a user's email address on Jira cloud requires your app to be whitelisted by following this guideline In the docs, it is mentioned that:

This API is only available to apps approved by Atlassian

Therefore, you must be using a connect-enabled app to access such resources. Alternatively, if your users are managed and you have a domain that is claimed, it is possible to use the organization API to get the user's email address. Only if that domain is managed by your organization.