# Revision history [back]

### Finding a User on a Non-Default Domain

I have two domains on my OpenStack setup - 'default' and 'domain1'. Using the python API, I need to find a user(using the name attribute) on a non default domain. I tried to do it using the keystone client both as the default admin and domain1's admin.

1. As the default Admin - If I use the UI I need to set the domain context to be able to view the users of another domain. Is there anyway I could do this using the Python API? As it stands the search is restricted to users of the default domain.

2. As the domain1 admin - If I call the projects.find function as the domain1 admin, it returns a not authorized function as it tries to run the list_users function without setting the domain to domain1. Is there anyway to do that?

This is my code:

from keystoneauth1.identity import v3
from keystoneauth1 import session
from keystoneclient.v3 import clientcreds = get_keystone_creds() # gets the credentials from the environment