通知

Duet AI は Gemini for Google Workspace になりました。詳細

動的グループ用のメンバーシップ クエリを作成する

Google 管理コンソールで動的グループ用のメンバーシップ クエリを作成するには、デフォルトの標準属性、作成したカスタム属性、またはその両方を使用できます。

目次

標準の属性を使用する

管理コンソールで動的グループを作成する場合は、[条件] リストから標準属性を選択します。 次の表に示すすべての属性を使用して、動的グループのメンバーシップ クエリを作成できます。

属性

サンプルコード

addresses.country

user.addresses.exists(address, address.country == 'カナダ')

国コード

addresses.country_code

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

カスタムの住所の種類

addresses.custom_type

user.addresses.exists(address, address.custom_type=='[カスタムの住所の種類]')

以降の住所

addresses.extended_address

user.addresses.exists(address, address.extended_address=='カリフォルニア州、アメリカ')

住所の地域

addresses.locality

user.addresses.exists(address, address.locality=='南カリフォルニア')

郵便番号

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=='南西部')

番地

addresses.street_address

user.addresses.exists(address, address.street_address=='123 番地')

アドレスの種類

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)

カスタムの外部 ID の種類

external_ids.custom_type

user.external_ids.exists(id, id.custom_type.startsWith('ランナー'))

外部 ID の種類

external_ids.type

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

外部 ID

external_ids.value

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

性別の代名詞

gender.address_me_as

user.gender.address_me_as=='彼ら'

カスタムの性別の種類

gender.custom_gender

user.gender.custom_gender.startsWith('[カスタムの性別]')

性別の種類

gender.type

user.gender.type==3

カスタムの IMS プロトコル

ims.custom_protocol

user.ims.exists(im, im.custom_protocol.startsWith('[カスタム]'))

カスタムの IMS の種類

ims.custom_type

user.ims.exists(im, im.custom_type.startsWith('[カスタム]'))

標準の 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=='チャット')

カスタムのキーワードの種類

keywords.custom_type

user.keywords.exists(keyword, keyword.custom_type.startsWith('業務委託者'))

キーワードの種類

keywords.type

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

キーワード

keywords.value

user.keywords.exists(keyword, keyword.value=='エンジニア')

言語コード

languages.language_code

user.languages.exists(language, language.language_code=='英語')

所在地エリア

locations.area

user.locations.exists(loc, loc.area=='サンフランシスコ近郊')

ビルディング ID

locations.building_id

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

カスタムの場所の種類

locations.custom_type

user.locations.exists(loc, loc.custom_type=='場所')

デスクコード

locations.desk_code

user.locations.exists(loc, loc.desk_code=='デスク 37')

Floor name

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==''

Cost center

organizations.cost_center

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

カスタムの組織の種類

organizations.custom_type

user.organizations.exists(org, org.custom_type=='非営利団体')

Department

organizations.department

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

組織の説明

organizations.description

user.organizations.exists(org, org.description=='検索プロバイダ')

ドメイン

organizations.domain

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

組織の所在地

organizations.location

user.organizations.exists(org, org.location=='カリフォルニア')

組織名

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=='例')

関係の値

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)

Website

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(''))

マネージャーのユーザー ID

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

primary_email

user.primary_email==''

停止中

suspended

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 で属性プロパティが正しく設定されていない可能性があります。具体的には、「indexed」プロパティを true に設定する必要があります。詳しくは、カスタム ユーザー属性をご覧ください。

ユーザーを動的グループに自動的に追加する

クエリ条件に一致するようにユーザーのアカウント情報を編集して、ユーザーを動的グループに自動的に追加することができます。Directory API を使用してユーザーのアカウントの詳細を編集します。詳しくは、ユーザー アカウントの更新をご覧ください。

管理コンソールでは、通常は [ユーザー] ページで次のようなユーザー アカウントの詳細情報を編集することもできます。

2 段階認証プロセス適用済み 2 段階認証プロセス登録済み
アドレスの種類 祖先組織部門
Building ID ログイン時のパスワード変更
Cost center Department
メールアドレス メールの種類
外部 ID
Floor name 階のセクション
アーカイブ済み メインのメールアドレスである
メールボックスが設定済みである 停止中
役職
マネージャーのユーザー ID 名前
親組織部門 電話番号
電話番号のタイプ  

動的グループからユーザーを除外する

条件を満たさないユーザーのみを追加するには、動的グループに対して条件を作成し、除外アイコン をクリックします。たとえば、米国に居住していないユーザーのみのグループを作成するには、「国コードが US と等しい」という条件を指定して除外アイコン をクリックします。クエリには、除外を示す感嘆符(!)が含まれています。

「exists」パラメータを含む一部のカスタムクエリでは、除外オプションを使用できません。詳しくは、クエリの作成とテストをご覧ください。

この情報は役に立ちましたか?

改善できる点がありましたらお聞かせください。
検索
検索をクリア
検索を終了
メインメニュー
9132446584321317504
true
ヘルプセンターを検索
true
true
true
true
true
73010
false
false