Stay organized with collections
Save and categorize content based on your preferences.
Searching for security groups
This page explains how to find all of your security groups with the
Cloud Identity Groups API.
REST
To search for all security groups, call
groups.search()
with a query string of labels:cloudidentity.googleapis.com/groups.security.
Python
The following example shows a helper function to search for security groups
using the Python client library:
defsearch_security_groups(service,identity_source_id,pageSize,view):# Set the label to search for all Google groupssearchQuery= "&query=parent=='customers/{customer_id}'&&labels:cloudidentity.googleapis.com/groups.security" \
+ "&pageSize=" +pageSize+ "&view=" +viewtry:searchGroupsRequest=service.groups().search()searchGroupsRequest.uri+=searchQueryresponse=searchGroupsRequest.execute()print(response)exceptExceptionase:print(e)