Searching for security groups

This page explains how to find all of your security groups with the Cloud Identity Groups API.


To search for all security groups, call with a query string of


The following example shows a helper function to search for security groups using the Python client library:

def search_security_groups(service, identity_source_id, pageSize, view):
  # Set the label to search for all Google groups
  searchQuery = "&query=parent=='customers/{customer_id}'&&" \
    + "&pageSize=" + pageSize + "&view=" + view
    searchGroupsRequest = service.groups().search()
    searchGroupsRequest.uri += searchQuery
    response = searchGroupsRequest.execute()
    print response
  except Exception as e:
    print e