動態群組查詢的有效使用者欄位
本頁面將概略說明 CEL 支援的欄位和功能,可用於成員查詢。
使用者欄位
下列管理員 SDK User 資源欄位可用於會員查詢。
| 欄位 | 子欄位 | 
|---|---|
addresses | 
country | 
country_code | 
|
custom_type | 
|
extended_address | 
|
locality | 
|
po_box | 
|
postal_code | 
|
primary | 
|
region | 
|
street_address | 
|
type | 
|
archived | 
布林值 | 
change_password_at_next_login | 
布林值 | 
is_2sv_enforced | 
布林值 | 
is_enrolled_in_2sv | 
布林值 | 
is_mailbox_setup | 
布林值 | 
locations | 
area | 
building_id | 
|
custom_type | 
|
desk_code | 
|
floor_name | 
|
floor_section | 
|
type | 
|
organizations | 
cost_center | 
custom_type | 
|
department | 
|
description | 
|
domain | 
|
location | 
|
name | 
|
primary | 
|
symbol | 
|
title | 
|
type | 
|
relations | 
custom_type | 
type | 
|
value | 
|
emails | 
address | 
custom_type | 
|
primary | 
|
type | 
|
external_ids | 
custom_type | 
type | 
|
value | 
|
gender | 
address_me_as | 
custom_gender | 
|
type | 
|
ims | 
custom_protocol | 
custom_type | 
|
standard_protocol | 
|
primary | 
|
type | 
|
value | 
|
keywords | 
custom_type | 
type | 
|
value | 
|
languages | 
language_code | 
name | 
family_name | 
given_name | 
|
value | 
|
phones | 
custom_type | 
primary | 
|
type | 
|
value | 
|
suspended | 
布林值 | 
suspension_reason | 
custom_type | 
type | 
|
value | 
|
websites | 
custom_type | 
primary | 
|
type | 
|
value | 
類型屬性
上表的 type 屬性會使用列舉值進行比對,而非字串表示法。以下清單會記錄每個類型的字串表示法,以及對應的列舉值。
| 屬性 | 列舉值 | 字串表示法 | 
|---|---|---|
| 地址 | 0 | 
不明 | 
1 | 
自訂 | |
2 | 
home | |
3 | 
公司 | |
4 | 
其他 | |
| 位置 | 0 | 
預設 | 
1 | 
自訂 | |
2 | 
桌子 | |
| 組織 | 0 | 
不明 | 
1 | 
公司 | |
2 | 
學校 | |
3 | 
僅限網域 | |
| 關係 | 12 | 
manager | 
| 電子郵件 | 0 | 
不明 | 
1 | 
自訂 | |
2 | 
home | |
3 | 
公司 | |
4 | 
其他 | |
| 外部 ID | 0 | 
不明 | 
1 | 
自訂 | |
2 | 
帳戶 | |
3 | 
客戶 | |
4 | 
網路 | |
5 | 
機構 | |
6 | 
login_id | |
| 性別 | 0 | 
不明 | 
1 | 
男性 | |
2 | 
女性 | |
3 | 
其他 | |
| IMS 標準通訊協定 | 0 | 
預設 | 
1 | 
自訂通訊協定 | |
2 | 
目標 | |
3 | 
msn | |
4 | 
yahoo | |
5 | 
Skype | |
6 | 
||
7 | 
gtalk | |
8 | 
icq | |
9 | 
jabber | |
10 | 
網路會議 | |
| IMS 類型 | 0 | 
不明 | 
1 | 
自訂 | |
2 | 
home | |
3 | 
公司 | |
4 | 
其他 | |
| 關鍵字 | 0 | 
不明 | 
1 | 
自訂 | |
2 | 
任務 | |
3 | 
職業 | |
4 | 
outlook | |
| Phones | 0 | 
不明 | 
1 | 
自訂 | |
2 | 
home | |
3 | 
公司 | |
4 | 
其他 | |
5 | 
住家傳真 | |
6 | 
公司傳真 | |
7 | 
行動裝置 | |
8 | 
翻頁元素 | |
9 | 
其他傳真 | |
10 | 
公司代表號 | |
11 | 
assistant | |
12 | 
汽車 | |
13 | 
收音機 | |
14 | 
isdn | |
15 | 
回呼 | |
16 | 
電報 | |
17 | 
tty tdd | |
18 | 
公司手機 | |
19 | 
公司呼叫器 | |
20 | 
main | |
21 | 
大中央車站 | |
22 | 
Enterprise Voice | |
| 停權原因 | 1 | 
管理員 | 
2 | 
13 歲以下 | |
3 | 
需要登入網頁 | |
4 | 
abuse | |
5 | 
濫用:可由管理員復原 | |
| 網站 | 0 | 
不明 | 
1 | 
應用程式安裝網頁 | |
2 | 
網誌 | |
3 | 
自訂 | |
4 | 
ftp | |
5 | 
home | |
6 | 
首頁 | |
7 | 
其他 | |
8 | 
資料 | |
9 | 
reservations | |
10 | 
resume | |
11 | 
公司 | 
機構單位欄位
您也可以使用 orgUnitId 欄位查詢會員資格,藉此納入該機構單位的所有直接或間接使用者。如要進一步瞭解如何擷取 orgUnitId 值,請參閱 Admin SDK 參考文件。
查詢範例
特定機構單位下的所有直接使用者:
user.org_unit_id==orgUnitId('03ph8a2z1enx4lx')特定組織單位下的所有直接和間接使用者:
user.org_units.exists(org_unit, org_unit.org_unit_id==orgUnitId('03ph8a2z1khexns'))
其他查詢類型
特定使用者管理的所有使用者:
user.managers.exists(manager, manager.user_id == userId('MANAGER_ID'))將
MANAGER_ID替換為管理員的專屬使用者 ID。您可以使用 AdminSDK Directory API 擷取這個 ID,並將管理員的電子郵件地址設為userKey。