I am writing a python application that uses the Google Admin SDK to search for users in the user directory. I need to search users by the External ID or the Employee ID, it doesn't seem to be implemented in the python library (https://github.com/googleapis/google-api-python-client#installation), but there is support from google as it says in their official docs, see (https://developers.google.com/admin-sdk/directory/v1/guides/search-users#examples)
I would really appreciate it if someone can help point things out.
It is possible to search for user by the external Id using the query parameter query
.
my_customer
query = 'externalId:someValue'
list
results = service.users().list( customer='my_customer',
query='externalId:someValue',
orderBy='email'
).execute()
users = results.get('users', [])