Dinamik gruplar için üyelik sorguları oluşturma

Google Yönetici Konsolu'nda dinamik gruplar için üyelik sorguları oluşturmak istiyorsanız varsayılan standart özellikleri, oluşturduğunuz özel özellikleri veya her ikisini birden kullanabilirsiniz.

Bu sayfada ele alınan konular

Standart özellikleri kullanma

Yönetici Konsolu'nda dinamik grup oluşturduğunuzda, Koşullar listesinden standart özellikleri seçersiniz. Aşağıdaki tablodaki tüm özellikleri kullanarak dinamik gruplar için üyelik sorguları oluşturabilirsiniz.

Özellik

Örnek kod

Ülke

addresses.country

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

Ülke kodu

addresses.country_code

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

Özel adres türü

addresses.custom_type

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

Genişletilmiş adres

addresses.extended_address

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

Adres yerleşimi

addresses.locality

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

Posta kodu

addresses.postal_code

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

Posta kutusu

addresses.po_box

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

Birincil adres mi?

addresses.primary

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

Bölge

addresses.region

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

Açık adres

addresses.street_address

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

Adres türü

addresses.type

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

E-posta adresi

emails.address

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

Özel e-posta adresi türü

emails.custom_type

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

Birincil e-posta

emails.primary

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

E-posta türü

emails.type

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

Özel harici kimlik türü

external_ids.custom_type

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

Harici kimlik türü

external_ids.type

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

Harici kimlik

external_ids.value

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

Cinsiyet zamirleri

gender.address_me_as

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

Özel cinsiyet türü

gender.custom_gender

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

Cinsiyet türü

gender.type

user.gender.type==3

Özel IMS protokolü

ims.custom_protocol

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

Özel IMS türü

ims.custom_type

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

Standart IMS protokolü

ims.standard_protocol

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

Birincil IMS

ims.primary

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

IMS türü

ims.type

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

Anlık mesajlaşma

ims.value

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

Özel anahtar kelime türü

keywords.custom_type

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

Anahtar kelime türü

keywords.type

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

Keyword

keywords.value

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

Dil kodu

languages.language_code

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

Konum alanı

locations.area

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

Bina kimliği

locations.building_id

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

Özel konum türü

locations.custom_type

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

Masa kodu

locations.desk_code

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

Kat adı

locations.floor_name

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

Zemin bölümü

locations.floor_section

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

Konum türü

locations.type

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

Soyadı

name.family_name

user.name.family_name==''

Ad

name.given_name

user.name.given_name==''

Ad

name.value

user.name.value==''

Maliyet merkezi

organizations.cost_center

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

Özel kuruluş türü

organizations.custom_type

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

Bölüm

organizations.department

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

Çalışan Türü

organizations.description

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

Alan

organizations.domain

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

Kuruluşun konumu

organizations.location

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

Kuruluş adı

organizations.name

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

Birincil kuruluş

organizations.primary

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

Kuruluş simgesi

organizations.symbol

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

İş unvanı

organizations.title

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

Kuruluş türü

organizations.type

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

Özel telefon türü

phones.custom_type

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

Birincil telefon

phones.primary

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

Telefon türü

phones.type

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

Telefon numarası

phones.value

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

Özel ilişki türü

relations.custom_type

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

İlişki değeri

relations.value

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

İlişki türü

relations.type

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

Özel web sitesi türü

websites.custom_type

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

Birincil web sitesi

websites.primary

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

Web sitesi türü

websites.type

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

Web sitesi

websites.value

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

Üst kuruluş birimi

org_units.org_unit_id

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

Yöneticinin e-posta adresi

managers.user_id

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

Arşivlendi

arşivlendi

user.archived==true

Giriş yaparken şifre değiştirme

change_password_at_next_login

user.change_password_at_next_login==true

2 adımlı doğrulama zorunlu kılındı

is_2sv_enforced

user.is_2sv_enforced==true

2 adımlı doğrulama etkinleştirildi

is_enrolled_in_2sv

user.is_enrolled_in_2sv==true

Posta kutusu kurulu

is_mailbox_setup

user.is_mailbox_setup==true

Birincil e-posta adresi

primary_email

user.primary_email==''

Askıya alındı

askıya alındı

user.suspended==true

Askıya alınma nedeni

suspension_reason

user.suspension_reason==4

Üst kuruluş birimi

org_unit_id

user.org_unit_id==orgUnitId('')

Cinsiyet

Gender.Gender

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

Etnik köken

Ethnicity.Ethnicity

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

Özel özellikleri kullanma

Yönetici Konsolu'nda üyelik sorgusu oluşturduğunuzda, Koşullar listesindeki standart özelliklerden sonra özel özellikler görünür.

Özel özellik içeren bir sorgu çalıştırdığınızda sorguda sıfır üye döndürülürse özellikler Groups API'de yanlış şekilde ayarlanmış olabilir. "indexed" özelliğinin doğru olarak ayarlandığından emin olun. Ayrıntılar için Özel kullanıcı özellikleri bölümünü inceleyin.

Kullanıcıyı otomatik olarak dinamik gruba dahil etme

Bir kullanıcıyı otomatik olarak dinamik gruba eklemek için kullanıcının hesap bilgilerini, sorgu koşullarıyla eşleşecek şekilde düzenleyebilirsiniz. Bir kullanıcının hesap ayrıntılarından herhangi birini düzenlemek için Directory API'yi kullanın. Ayrıntılar için Kullanıcı hesabını güncelleme başlıklı makaleyi inceleyin.

Ayrıca, Yönetici Konsolu'ndaki bazı kullanıcı hesabı bilgilerini, genellikle Kullanıcılar sayfasından düzenleyebilirsiniz. Bu bilgilerden bazıları:

2 Adımlı Doğrulama zorunlu kılındı 2 adımlı doğrulama kaydı yapıldı
Adres türü Üst kuruluş birimi
Bina kimliği Giriş yaparken şifre değiştirme
Maliyet merkezi Bölüm
E-posta adresi E-posta türü
Harici Kimlik Ad
Kat adı Zemin bölümü
Arşivlendi Birincil e-posta adresi
Posta kutusu kurulu Askıya alınma
İş unvanı Soyadı
Yönetici kullanıcı kimliği Ad
Üst kuruluş birimi Telefon numarası
Telefon türü

Kullanıcıları dinamik gruptan hariç tutma

Yalnızca bir koşulu karşılamayan kullanıcıları eklemek isterseniz dinamik grup için bir koşul oluşturun, ardından hariç tut simgesini tıklayın. Örneğin, yalnızca ABD'de yaşamayan kullanıcıları içeren bir grup oluşturmak için "Ülke kodu eşittir ABD" koşulunu oluşturduktan sonra hariç tut simgesini tıklayın. Sorguda, hariç tutma için bir ünlem işareti (!) görürsünüz.

"exists" parametresini içeren bazı özel sorgularda hariç tutma seçeneğini kullanamazsınız. Ayrıntılar için Sorgunuzu formüle ve test etme bölümünü inceleyin.