Search for Groups
Post /GetAllSearchAdvanced
Send a POST request to the GetAllSearchAdvanced()
method on the GroupView
object to return information about one or more groups. The information included in the response depends on the range of group properties and parameter values included in the request.
A valid OAuth 2.0 Bearer token is required.
URL
POST https://<FQDN_Of_Your_EmpowerID_Web_Server>/api/webui/v1/GroupView/GetAllSearchAdvanced
Header Key/Value Pairs
Key | Value |
---|---|
Authorization | Bearer <access_token> |
X-EmpowerID-API-Key | The API key from the registered OAuth application |
Content-Type | application/json |
Request Body
The body of the request must include all parameters required by the method and the IncludedProperties
object with at least one group property.
Included Properties
Use IncludedProperties
to return one or more group properties.
Body Parameters
The GetAllSearchAdvanced()
method includes a number of parameters that must be included in the body or the request. Use parameters to filter the number of groups returned by the endpoint.
columnsToSearch
The columnsToSearch
body parameter is used to return groups meeting one or more conditions. Each condition specifies a property with a specific value to search. For example, to return a list of groups where the FriendlyName
field contains "NH30" and the Notes
field contains "For Internal Audit Use", the value for columnsToSearch
would be set to that shown below.
"%[[][[]%<Conditions><Condition PropertyName=\"FriendlyName\" SearchValue=\"NH30\" Operator=\"EqualTo\" QuerySuffix=\" AND \" StartGroupString=\"\" EndGroupString=\"\" Index=\"0\" SearchType=\"String\"/><Condition PropertyName=\"Notes\" SearchValue=\"For Internal Audit Use\" Operator=\"EqualTo\" QuerySuffix=\"\" StartGroupString=\"\" EndGroupString=\"\" Index=\"1\" SearchType=\"String\"/></Conditions>"
Remarks
In the above example, columnsToSearch
contains two search conditions. The API returns accounts matching both conditions. Each condition includes the PropertyName
to search, the SearchValue
to search for, an Equality Operator
, a QuerySuffix
and a SearchType
for the relevant data type. Each of these must be set correctly or an error will occur.
Search Examples
The below examples demonstrate how to use IncludedProperties
, parameters, and conditions in columnsToSearch
to query the API for a list of groups matching the search conditions. Attributes returned for each record are set by the properties specified in IncludedProperties
.
Get all high security groups that a specific person belongs to
Set the ReferencePersonID
parameter to the GUID of an EmpowerID Person and the IsHighSecurityGroup
parameter to 1
to return a list of high security groups where the reference person has a linked user account.
{
"IncludedProperties": [
"LogonName",
"NetBiosName",
"FriendlyName",
"AllowJoinRequests",
"IsHighSecurityGroup",
"RiskFactorTotal",
"DistinguishedName",
"ResourceID",
"GroupID",
"ResourceGUID",
"ValidUntil",
],
"Parameters": {
"AccountStoreID": null,
"SecurityBoundaryID": null,
"SecurityBoundaryTypeID": null,
"GroupTypeID": null,
"GroupUsageTypeID": null,
"ResourceTypeID": null,
"IsEmpty": null,
"IsMailEnabled": null,
"IsHighSecurityGroup": 1,
"HideInEmpowerID": null,
"OrgZoneID": null,
"AccountStoreUsageTypeID": null,
"ITEnvironmentTypeID": null,
"EligibilityAssigneeID": null,
"EligibilityTypeID": null,
"RbacAssignedToAssigneeID": null,
"TCode": null,
"IsAssignable": null,
"ReferencePersonID": "4e98a3bd-ac98-401a-ac73-042332d73bd9",
"OwnerPersonGUID": null,
"AzGlobalFunctions": null,
"ProtectedApplicationResourceID": null,
"AccountMemberID": null,
"IsAccountIDMember": null,
"textToSearch": null,
"columnsToSearch": "%[[][[]%<Conditions/>",
"pageLength": 10,
"resourceTags": null,
"start": 0,
"totalCount": null
}
}
Get all groups belonging to a specified account store
Set the AccountStoreID
parameter to the ID of an account store to return groups belonging to that account store.
{
"IncludedProperties": [
"LogonName",
"NetBiosName",
"FriendlyName",
"AllowJoinRequests",
"IsHighSecurityGroup",
"RiskFactorTotal",
"DistinguishedName",
"ResourceID",
"GroupID",
"ResourceGUID",
"ValidUntil",
],
"Parameters": {
"AccountStoreID": 2096,
"SecurityBoundaryID": null,
"SecurityBoundaryTypeID": null,
"GroupTypeID": null,
"GroupUsageTypeID": null,
"ResourceTypeID": null,
"IsEmpty": null,
"IsMailEnabled": null,
"IsHighSecurityGroup": null,
"HideInEmpowerID": null,
"OrgZoneID": null,
"AccountStoreUsageTypeID": null,
"ITEnvironmentTypeID": null,
"EligibilityAssigneeID": null,
"EligibilityTypeID": null,
"RbacAssignedToAssigneeID": null,
"TCode": null,
"IsAssignable": null,
"ReferencePersonID": null,
"OwnerPersonGUID": null,
"AzGlobalFunctions": null,
"ProtectedApplicationResourceID": null,
"AccountMemberID": null,
"IsAccountIDMember": null,
"textToSearch": "AdvancedSearch",
"columnsToSearch": "%[[][[]%<Conditions />",
"pageLength": 25,
"resourceTags": null,
"start": 0,
"totalCount": null
}
}
Get all mail-enabled groups
Use columnsToSearch
to return mail-enabled groups. Note the PropertyName
for the search condition is set to IsMailEnabled
, SearchValue
is set to True
, the Operator
is set to EqualTo
and the SearchType
is Boolean
.
Get all group memberships for a specific user account
Set the AccountMemberID
parameter to the GUID of a specific user account and the IsAccountIDMember
parameter to true to return groups where that account is a member.
SearchTerms
Each identity object in the EmpowerID Identity Warehouse has a SearchTerms
property with a specific set of search values that can used to return all objects matching those values. For groups, SearchTerms
encompass the Name
, FriendlyName
, Email
, EmpowerIDName
, EmpowerIDFriendlyName
, LogonName
, NetBiosName
, FQN
, DistinguishedName
, and Description
properties. When used, the API returns all groups where the specified search value finds a match in any of those properties. For example, if the search value is set to “Doc”, the API would return all the following groups
Any group with a match in the name
Any group with a match in the friendly name
Any group with a match in the email address
Any group with a match in the EmpowerID name
Any group with a match in the EmpowerID friendly name
Any group with a match in the logon name
Any group with a match in the Net BIOS name
Any group with a match in the FQN
Any group with a match in the Distinguished Name
Any group with a match in the description
The following examples illustrate how to use SearchTerms
to return a subset of groups:
Get all groups with a SearchTerm of “SAP”
Get all groups where the SearchValue
of the SearchTerm
is an email address containing "onmicrosoft"
Sample Responses