Tworzenie reguł dodawania członków do grup dynamicznych

Aby utworzyć reguły dodawania członków do grup dynamicznych w konsoli administracyjnej Google, możesz użyć domyślnych atrybutów standardowych, atrybutów niestandardowych utworzonych przez siebie lub obu typów atrybutu.

Na tej stronie

Używanie atrybutów standardowych

Podczas tworzenia grupy dynamicznej w konsoli administracyjnej wybierasz atrybuty standardowe z listy Warunki. Za pomocą wszystkich atrybutów w tej tabeli możesz tworzyć reguły dodawania członków do grup dynamicznych.

Atrybut

Przykładowy kod

Kraj

addresses.country

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

Kod kraju

addresses.country_code

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

Niestandardowy typ adresu

addresses.custom_type

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

Rozszerzony adres

addresses.extended_address

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

Miejscowość

addresses.locality

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

Kod pocztowy

addresses.postal_code

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

Skrytka pocztowa

addresses.po_box

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

Jest adresem głównym

addresses.primary

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

Region

addresses.region

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

Adres pocztowy

addresses.street_address

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

Typ adresu

addresses.type

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

Adres e-mail

emails.address

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

Niestandardowy typ adresu e-mail

emails.custom_type

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

Jest głównym adresem e-mail

emails.primary

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

Typ e-maila

emails.type

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

Niestandardowy typ identyfikatora zewnętrznego

external_ids.custom_type

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

Typ identyfikatora zewnętrznego

external_ids.type

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

Identyfikator zewnętrzny

external_ids.value

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

Zaimki określające płeć

gender.address_me_as

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

Niestandardowy typ płci

gender.custom_gender

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

Typ płci

gender.type

user.gender.type==3

Niestandardowy protokół IMS

ims.custom_protocol

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

Niestandardowy typ komunikatora

ims.custom_type

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

Standardowy protokół IMS

ims.standard_protocol

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

Jest głównym komunikatorem

ims.primary

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

Typ IMS

ims.type

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

Komunikator internetowy

ims.value

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

Niestandardowy typ słowa kluczowego

keywords.custom_type

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

Typ słowa kluczowego

keywords.type

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

Keyword

keywords.value

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

Kod języka

languages.language_code

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

Obszar lokalizacji

locations.area

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

Identyfikator budynku

locations.building_id

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

Niestandardowy typ lokalizacji

locations.custom_type

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

Kod biurka

locations.desk_code

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

Nazwa piętra

locations.floor_name

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

Sekcja progu

locations.floor_section

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

Typ lokalizacji

locations.type

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

Nazwisko

name.family_name

user.name.family_name==''

Imię

name.given_name

user.name.given_name==''

Nazwa

name.value

user.name.value==''

Centrum kosztów

organizations.cost_center

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

Niestandardowy typ organizacji

organizations.custom_type

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

Departament

organizations.department

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

Typ pracownika

organizations.description

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

Domena

organizations.domain

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

Lokalizacja organizacji

organizations.location

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

Nazwa organizacji

organizations.name

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

Jest organizacją główną

organizations.primary

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

Symbol organizacji

organizations.symbol

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

Stanowisko

organizations.title

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

Typ organizacji

organizations.type

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

Niestandardowy typ telefonu

phones.custom_type

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

Jest głównym numerem telefonu

phones.primary

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

Typ telefonu

phones.type

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

Numer telefonu

phones.value

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

Niestandardowy typ relacji

relations.custom_type

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

Wartość relacji

relations.value

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

Typ relacji

relations.type

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

Niestandardowy typ witryny

websites.custom_type

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

Jest witryną główną

websites.primary

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

Typ witryny

websites.type

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

Witryna

websites.value

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

Jednostka organizacyjna elementu nadrzędnego

org_units.org_unit_id

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

Adres e-mail menedżera

managers.user_id

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

Zarchiwizowane

zarchiwizowany

user.archived==true

Zmiana hasła podczas logowania

change_password_at_next_login

user.change_password_at_next_login==true

Wymuszenie weryfikacji dwuetapowej

is_2sv_enforced

user.is_2sv_enforced==true

Weryfikacja dwuetapowa została włączona

is_enrolled_in_2sv

user.is_enrolled_in_2sv==true

Ma skonfigurowaną skrzynkę pocztową

is_mailbox_setup

user.is_mailbox_setup==true

Główny adres e-mail

primary_email

user.primary_email==''

Zawieszone

zawieszona

user.suspended==true

Przyczyna zawieszenia

suspension_reason

user.suspension_reason==4

Nadrzędna jednostka organizacyjna

org_unit_id

user.org_unit_id==orgUnitId('')

Płeć

Gender.Gender

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

Pochodzenie etniczne

Ethnicity.Ethnicity

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

Używanie atrybutów niestandardowych

Gdy w konsoli administracyjnej tworzysz regułę dodawania członków, atrybuty niestandardowe pojawiają się po atrybutach standardowych na liście Warunki.

Jeśli uruchomisz regułę zawierającą atrybut niestandardowy i nie zwróci ona żadnych kont użytkowników, właściwości atrybutu mogą być nieprawidłowo ustawione w interfejsie Groups API. Właściwość „indeksowana” musi mieć wartość Prawda. Szczegółowe informacje znajdziesz w artykule Niestandardowe atrybuty użytkownika.

Automatyczne uwzględnianie użytkownika w grupie dynamicznej

Możesz zmodyfikować informacje o koncie użytkownika tak, aby pasowały do warunków zapytania, co pozwoli automatycznie uwzględnić użytkownika w grupie dynamicznej. Możesz edytować dowolne szczegóły konta użytkownika za pomocą interfejsu Directory API. Więcej informacji znajdziesz w sekcji Aktualizowanie konta użytkownika artykułu dotyczącego zarządzania kontami użytkowników.

W konsoli administracyjnej możesz też edytować niektóre szczegóły kont użytkowników, zwykle na stronie Użytkownicy, w tym:

Wymuszenie weryfikacji dwuetapowej Rejestracja w systemie weryfikacji dwuetapowej
Typ adresu Jednostka organizacyjna elementu nadrzędnego
Identyfikator budynku Zmiana hasła podczas logowania
Centrum kosztów Departament
Adres e-mail Typ e-maila
Identyfikator zewnętrzny Imię
Nazwa piętra Obszar piętra
Zarchiwizowane Jest głównym adresem e-mail
Ma skonfigurowaną skrzynkę pocztową jest zawieszony,
Stanowisko Nazwisko
Identyfikator użytkownika menedżera Nazwa
Nadrzędna jednostka organizacyjna Numer telefonu
Rodzaj telefonu

Wykluczanie użytkowników z grupy dynamicznej

Aby dodać tylko użytkowników, którzy nie spełniają warunku, utwórz warunek dla grupy dynamicznej i kliknij Wyklucz . Aby na przykład utworzyć grupę zawierającą tylko użytkowników spoza Stanów Zjednoczonych, utwórz warunek „Kod kraju to Stany Zjednoczone”, a potem kliknij Wyklucz . W regule wykluczenie jest widoczne jako wykrzyknik (!).

W przypadku niektórych zapytań niestandardowych z parametrem „exists” (istnieje) nie można użyć opcji wykluczania. Szczegółowe informacje znajdziesz w artykule na temat tworzenia i testowania reguł.