สร้างการค้นหาการเป็นสมาชิกสําหรับกลุ่มแบบไดนามิก

หากต้องการสร้างการค้นหาการเป็นสมาชิกสำหรับกลุ่มแบบไดนามิกในคอนโซลผู้ดูแลระบบของ Google คุณสามารถใช้แอตทริบิวต์มาตรฐานเริ่มต้น แอตทริบิวต์ที่กำหนดเองที่คุณสร้าง หรือทั้ง 2 อย่างก็ได้

ในหน้านี้

ใช้แอตทริบิวต์มาตรฐาน

เมื่อสร้างกลุ่มแบบไดนามิกในคอนโซลผู้ดูแลระบบ คุณจะเลือกแอตทริบิวต์มาตรฐานจากรายการเงื่อนไข คุณสามารถใช้แอตทริบิวต์ทั้งหมดในตารางนี้เพื่อสร้างการค้นหาการเป็นสมาชิกสําหรับกลุ่มแบบไดนามิกได้

แอตทริบิวต์

โค้ดตัวอย่าง

ประเทศ

addresses.country

user.addresses.exists(address, address.country == 'Canada')

รหัสประเทศ

addresses.country_code

user.addresses.exists(address, address.country_code == '555')

ประเภทที่อยู่ที่กำหนดเอง

addresses.custom_type

user.addresses.exists(address, address.custom_type=='Custom address type')

ที่อยู่แบบยาว

addresses.extended_address

user.addresses.exists(address, address.extended_address=='California, USA')

ที่ตั้งของที่อยู่

addresses.locality

user.addresses.exists(address, address.locality=='Southern California')

รหัสไปรษณีย์

addresses.postal_code

user.addresses.exists(address, address.postal_code=='94040')

ตู้ ป.ณ.

addresses.po_box

user.addresses.exists(address, address.po_box=='87132')

เป็นที่อยู่หลัก

addresses.primary

user.addresses.exists(address, address.primary==true)

ภูมิภาค

addresses.region

user.addresses.exists(address, address.region=='Southwest')

ที่อยู่

addresses.street_address

user.addresses.exists(address, address.street_address=='123 Fake St')

ประเภทที่อยู่

addresses.type

user.addresses.exists(address, address.type==1)

อีเมล

emails.address

user.emails.exists(email, email.address.startsWith(''))

ประเภทอีเมลที่กำหนดเอง

emails.custom_type

email.address.startsWith('custom@google.com')

เป็นอีเมลหลัก

emails.primary

user.emails.exists(email, email.primary==true)

ประเภทอีเมล

emails.type

user.emails.exists(email, email.type==1)

ประเภทรหัสภายนอกที่กำหนดเอง

external_ids.custom_type

user.external_ids.exists(id, id.custom_type.startsWith('runner'))

ประเภทรหัสภายนอก

external_ids.type

user.external_ids.exists(id, id.type==3)

รหัสภายนอก

external_ids.value

user.external_ids.exists(id, id.value=='')

สรรพนามระบุเพศ

gender.address_me_as

user.gender.address_me_as=='they/them'

ประเภทเพศที่กำหนดเอง

gender.custom_gender

user.gender.custom_gender.startsWith('custom gender')

ประเภทเพศ

gender.type

user.gender.type==3

โปรโตคอล IMS ที่กำหนดเอง

ims.custom_protocol

user.ims.exists(im, im.custom_protocol.startsWith('custom'))

ประเภท IMS ที่กำหนดเอง

ims.custom_type

user.ims.exists(im, im.custom_type.startsWith('custom'))

โปรโตคอล IMS มาตรฐาน

ims.standard_protocol

user.ims.exists(im, im.standard_protocol==7)

เป็น IMS หลัก

ims.primary

user.ims.exists(im, im.primary==true)

ประเภท IMS

ims.type

user.ims.exists(im, im.type==3)

โปรแกรมรับส่งข้อความด่วน

ims.value

user.ims.exists(im, im.value=='chat')

ประเภทคีย์เวิร์ดที่กำหนดเอง

keywords.custom_type

user.keywords.exists(keyword, keyword.custom_type.startsWith('contractor'))

ประเภทคีย์เวิร์ด

keywords.type

user.keywords.exists(keyword, keyword.type==3)

Keyword

keywords.value

user.keywords.exists(keyword, keyword.value=='engineer')

รหัสภาษา

languages.language_code

user.languages.exists(language, language.language_code=='English')

พื้นที่ตั้ง

locations.area

user.locations.exists(loc, loc.area=='Near San Francisco')

รหัสอาคาร

locations.building_id

user.locations.exists(loc, loc.building_id=='')

ประเภทสถานที่ตั้งที่กำหนดเอง

locations.custom_type

user.locations.exists(loc, loc.custom_type=='Region')

รหัสโต๊ะ

locations.desk_code

user.locations.exists(loc, loc.desk_code=='Desk 37')

ชื่อชั้น

locations.floor_name

user.locations.exists(loc, loc.floor_name=='')

ส่วนพื้น

locations.floor_section

user.locations.exists(loc, loc.floor_section=='')

ประเภทสถานที่ตั้ง

locations.type

user.locations.exists(loc, loc.type==1)

นามสกุล

name.family_name

user.name.family_name==''

ชื่อ

name.given_name

user.name.given_name==''

ชื่อ

name.value

user.name.value==''

ศูนย์ต้นทุน

organizations.cost_center

user.organizations.exists(org, org.cost_center=='')

ประเภทองค์กรที่กำหนดเอง

organizations.custom_type

user.organizations.exists(org, org.custom_type=='nonprofit')

ฝ่าย

organizations.department

user.organizations.exists(org, org.department=='')

ประเภทพนักงาน

organizations.description

user.organizations.exists(org, org.description=='search provider')

โดเมน

organizations.domain

user.organizations.exists(org, org.domain=='example.net')

สถานที่ตั้งขององค์กร

organizations.location

user.organizations.exists(org, org.location=='California')

ชื่อองค์กร

organizations.name

user.organizations.exists(org, org.name=='Google')

เป็นองค์กรหลัก

organizations.primary

user.organizations.exists(org, org.primary==true)

สัญลักษณ์ขององค์กร

organizations.symbol

user.organizations.exists(org, org.symbol=='GOOG')

ตำแหน่งงาน

organizations.title

user.organizations.exists(org, org.title=='')

ประเภทองค์กร

organizations.type

user.organizations.exists(org, org.type==2)

ประเภทโทรศัพท์ที่กำหนดเอง

phones.custom_type

user.phones.exists(phone, phone.custom_type.startsWith('new type'))

เป็นโทรศัพท์หลัก

phones.primary

user.phones.exists(phone, phone.primary==true)

ประเภทโทรศัพท์

phones.type

user.phones.exists(phone, phone.type==11)

หมายเลขโทรศัพท์

phones.value

user.phones.exists(phone, phone.value=='')

ประเภทความสัมพันธ์ที่กำหนดเอง

relations.custom_type

user.relations.exists(rel, rel.custom_type=='example')

ค่าความสัมพันธ์

relations.value

user.relations.exists(rel, rel.value=='Sundar')

ประเภทความสัมพันธ์

relations.type

user.relations.exists(rel, rel.type==12)

ประเภทเว็บไซต์ที่กำหนดเอง

websites.custom_type

user.websites.exists(site, site.custom_type.startsWith('creative writing'))

เป็นเว็บไซต์หลัก

websites.primary

user.websites.exists(site, site.primary==true)

ประเภทเว็บไซต์

websites.type

user.websites.exists(site, site.type==2)

เว็บไซต์

websites.value

user.websites.exists(site, site.value=='google.com')

หน่วยขององค์กรระดับสูงกว่าทั้งหมด

org_units.org_unit_id

user.org_units.exists(org_unit, org_unit.org_unit_id==orgUnitId(''))

อีเมลของผู้จัดการ

managers.user_id

user.managers.exists(manager, manager.user_id==userId(''))

เก็บถาวรแล้ว

เก็บ

user.archived==true

เปลี่ยนรหัสผ่านเมื่อเข้าสู่ระบบ

change_password_at_next_login

user.change_password_at_next_login==true

บังคับใช้การยืนยันแบบ 2 ขั้นตอนแล้ว

is_2sv_enforced

user.is_2sv_enforced==true

ลงทะเบียนการยืนยันแบบ 2 ขั้นตอนแล้ว

is_enrolled_in_2sv

user.is_enrolled_in_2sv==true

เป็นการตั้งค่ากล่องจดหมาย

is_mailbox_setup

user.is_mailbox_setup==true

อีเมลหลัก

primary_email

user.primary_email==''

ถูกระงับ

พักการทำงาน

user.suspended==true

เหตุผลของการระงับ

suspension_reason

user.suspension_reason==4

หน่วยขององค์กรระดับบน

org_unit_id

user.org_unit_id==orgUnitId('')

เพศ

Gender.Gender

user.custom_schemas.Gender.Gender.exists(G, G=='')

เชื้อชาติ

Ethnicity.Ethnicity

user.custom_schemas.Ethnicity.Ethnicity.exists(E, E=='')

ใช้แอตทริบิวต์ที่กำหนดเอง

เมื่อสร้างการค้นหาการเป็นสมาชิกในคอนโซลผู้ดูแลระบบ แอตทริบิวต์ที่กำหนดเองจะปรากฏหลังแอตทริบิวต์มาตรฐานในรายการเงื่อนไข

หากคุณเรียกใช้การค้นหาที่มีแอตทริบิวต์ที่กําหนดเองและการค้นหาไม่แสดงผลสมาชิกใดเลย พร็อพเพอร์ตี้แอตทริบิวต์อาจถูกตั้งค่าอย่างไม่ถูกต้องใน Groups API กล่าวคือ ต้องตั้งค่าพร็อพเพอร์ตี้ "ที่จัดทำดัชนี" เป็น true โปรดดูรายละเอียดที่หัวข้อแอตทริบิวต์ผู้ใช้ที่กำหนดเอง

รวมผู้ใช้ไว้ในกลุ่มแบบไดนามิกโดยอัตโนมัติ

คุณสามารถแก้ไขข้อมูลบัญชีของผู้ใช้ให้ตรงกับเงื่อนไขการค้นหาเพื่อรวมผู้ใช้ไว้ในกลุ่มแบบไดนามิกโดยอัตโนมัติ คุณจะแก้ไขรายละเอียดบัญชีของผู้ใช้ได้โดยใช้ Directory API โปรดดูรายละเอียดที่หัวข้ออัปเดตบัญชีผู้ใช้

นอกจากนี้ คุณยังแก้ไขรายละเอียดบางอย่างของบัญชีผู้ใช้ได้ในคอนโซลผู้ดูแลระบบ ซึ่งโดยปกติดำเนินการจากหน้าผู้ใช้ ดังนี้

บังคับใช้การยืนยันแบบ 2 ขั้นตอนแล้ว ลงทะเบียนการยืนยันแบบ 2 ขั้นตอนแล้ว
ประเภทที่อยู่ หน่วยขององค์กรระดับสูงกว่าทั้งหมด
รหัสอาคาร เปลี่ยนรหัสผ่านเมื่อเข้าสู่ระบบ
ศูนย์ต้นทุน แผนก
อีเมล ประเภทอีเมล
รหัสภายนอก ชื่อ
ชื่อชั้น ส่วนชั้น
เก็บแล้ว เป็นอีเมลหลัก
เป็นการตั้งค่ากล่องจดหมาย ถูกระงับการใช้งาน
ตำแหน่งงาน นามสกุล
รหัสผู้ใช้ของผู้จัดการ ชื่อ
หน่วยขององค์กรระดับบน หมายเลขโทรศัพท์
ประเภทโทรศัพท์

ยกเว้นผู้ใช้จากกลุ่มแบบไดนามิก

หากต้องการเพิ่มเฉพาะผู้ใช้ที่ไม่ตรงตามเงื่อนไข ให้สร้างเงื่อนไขสำหรับกลุ่มแบบไดนามิก แล้วคลิกยกเว้น ตัวอย่างเช่น หากต้องการสร้างกลุ่มที่มีเฉพาะผู้ใช้ที่ไม่ได้อาศัยอยู่ในสหรัฐอเมริกา คุณต้องสร้างเงื่อนไข "Country code equals US" แล้วคลิกยกเว้น ในการค้นหา คุณจะเห็นเครื่องหมายตกใจ (!) สำหรับการยกเว้น

สำหรับคำค้นหาที่กำหนดเองบางรายการที่มีพารามิเตอร์ "exists" คุณจะใช้ตัวเลือกยกเว้นไม่ได้ โปรดดูรายละเอียดที่หัวข้อสร้างและทดสอบการค้นหา