Google 管理コンソールで動的グループ用のメンバーシップ クエリを作成するには、デフォルトの標準属性、作成したカスタム属性、またはその両方を使用して条件を指定します。デフォルトでは、条件に一致するユーザーがグループに追加されます。必要に応じて、各条件について、条件に一致するユーザーをグループ メンバーシップから除外することもできます。
ユーザーが動的グループに含まれるようにユーザー アカウントを編集できます。一部の変更は、管理コンソールのフィールドを使用して行うことができます。それ以外の変更にはユーザー アカウントの更新を使用します。
標準の属性を使用する
この表のすべての属性を使用して、動的グループ用のメンバーシップ クエリを作成できます。管理コンソールで動的グループを作成する場合は、[条件] リストから標準属性を選択します。
属性 |
管理コンソールで編集可能 |
編集するには API を使用する必要がある |
サンプルコード |
国 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.po_box |
|
user.addresses.exists(address, address.po_box=='87132') |
|
addresses.primary |
|
user.addresses.exists(address, address.primary==true) |
|
addresses.postal_code |
|
user.addresses.exists(address, address.postal_code=='94040') |
|
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==2) |
|
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==2) |
|
external_ids.custom_type |
|
user.external_ids.exists(id, id.custom_type.startsWith('ランナー')) |
|
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=='彼ら' |
|
gender.custom_gender |
|
user.gender.custom_gender.startsWith('[カスタムの性別]') |
|
gender.type |
|
user.gender.type==3 |
|
ims.custom_protocol |
|
user.ims.exists(im, im.custom_protocol.startsWith('[カスタム]')) |
|
ims.custom_type |
|
user.ims.exists(im, im.custom_type.startsWith('[カスタム]')) |
|
ims.standard_protocol |
|
user.ims.exists(im, im.standard_protocol==7) |
|
ims.primary |
|
user.ims.exists(im, im.primary==true) |
|
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=='サンフランシスコ近郊') |
|
locations.building_id |
✔ |
user.locations.exists(loc, loc.building_id=='第 25 棟') |
|
locations.custom_type |
|
user.locations.exists(loc, loc.custom_type=='場所') |
|
locations.desk_code |
|
user.locations.exists(loc, loc.desk_code=='デスク 37') |
|
locations.floor_name |
✔ |
user.locations.exists(loc, loc.floor_name=='3 階') |
|
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=='Washington' |
|
name.given_name |
✔ |
user.name.given_name=='George' |
|
name.value |
✔ |
user.name.value=='George Washington' |
|
organizations.cost_center |
✔ |
user.organizations.exists(org, org.cost_center=='部署 X') |
|
organizations.custom_type |
|
user.organizations.exists(org, org.custom_type=='非営利団体') |
|
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==3) |
|
phones.value |
✔ |
user.phones.exists(phone, phone.value=='555-5555') |
|
relations.custom_type |
|
user.relations.exists(rel, rel.custom_type=='例') |
|
relations.type |
|
user.relations.exists(rel, rel.type==12) |
|
relations.value |
|
user.relations.exists(rel, rel.value=='Sundar') |
|
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') |
|
archived |
✔ |
user.archived==true |
|
change_password_at_next_login |
✔ |
user.change_password_at_next_login==true |
|
is_2sv_enforced |
✔ |
user.is_2sv_enforced==true |
|
is_enrolled_in_2sv |
✔ |
user.is_enrolled_in_2sv==true |
|
is_mailbox_setup |
✔ |
user.is_mailbox_setup==true |
|
suspended |
✔ |
user.suspended==true |
|
suspension_reason |
|
user.suspension_reason==2 |
|
org_units.org_unit_id |
✔ |
user.org_units.exists(org_unit, org_unit.org_unit_id==orgUnitId('03ph8a2z1kqs27e')) |
|
org_unit_id |
✔ |
user.org_unit_id==orgUnitId('03ph8a2z1kqs27e') |
|
managers.user_id** |
✔ |
user.managers.exists(manager, manager.user_id==user_id('2d8374y)) |
* 管理コンソールでユーザーのアカウントの詳細を変更できない場合は、Google Cloud API で編集できます。詳しくは、ユーザー アカウントの更新をご覧ください。
** [ユーザーのメール] で、管理者メールアドレスの入力を開始します。自動入力が表示されたら、アドレスを選択します。メールアドレスをすべて手動で入力してグループを作成しようとすると、エラーが表示されます。
カスタム属性を使用する
カスタム属性は Google Cloud API を使用して作成できます。管理コンソールでメンバーシップ クエリを作成すると、[条件] リストの標準の属性の後にカスタム属性が表示されます。
カスタム属性を含むクエリを実行し、クエリで返されたメンバーがゼロの場合は、API で属性プロパティが正しく設定されていない可能性があります。具体的には、indexed
プロパティを true に設定する必要があります。
グループ メンバーからユーザーを除外する
動的グループの条件を作成し、その条件を満たしていないユーザーのみをグループ メンバーとして追加することもできます。つまり、この条件を満たすユーザーをグループ メンバーシップから除外できます。
条件を満たしていないユーザーのみをグループに追加できるようにするには、条件を作成して除外アイコン をクリックします。たとえば、米国に居住していないユーザーのみのグループを作成するには、「国コードが US と等しい」という条件を指定して除外アイコン
をクリックします。除外されると、感嘆符(!)でクエリに示されます。
作成する一部のクエリでは、そのクエリに「exists」パラメータが含まれます。たとえば、クエリに国の条件が含まれている場合、クエリテキストには「user.addresses.exists」が含まれます。「exists」パラメータを含むクエリで除外オプションを使用できない場合もあります。詳しくは、クエリの作成とテストをご覧ください。