Working with user email when domains are activated in JIRA

We have an application where we want to get a JIRA user’s email or search for users by email. However, in JIRA instances where domains have been activated, the email address is not available, and need to be retrieved from the my.atlassian.com account. Do we have a way to access the user email when domains are activated?