What is the format for the Directory.users().list().setQuery method?

丶灬走出姿态 提交于 2019-12-05 22:54:01

Currently the list API supports only prefix queries, please refer to the documentation for query parameter here.

Try with query as "email:someEmail@someDomain.com*" -> Note the asterisk at the end.

Here's the way to get a user by email address.

directory.users().get(userKey=email).execute()

Code to search for a user by email address should be something like

directory.users().list(query='email:emily@example.com').execute()

but this doesn't work. I suspect a bug in Google's API docs, or possibly in the actual implementation.

maybe this will point you in the right direction:

    var listReq = service.Users.List();
            listReq.Domain = domain;
        Users results = listReq.Execute();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!