GetGroups
Lists all the groups, alternative usernames, and user fields for users. When multiple users match the query, the resulting groups, alternative usernames and fields in the response are merged.
You can filter the users that match the query using the following parameters:
- Use the
Repository
parameter to restrict the query to specific repositories. If you do not set theRepository
parameter, the action lists the information for all repositories specified by GroupServerDefaultRepositories in the OmniGroupServer configuration file. - Use the
UserName
parameter to match a specific user name. - Use the
FieldName
andFieldValue
parameters to return information for users that have the field specified byFieldName
with the value specified byFieldValue
.
Parameters
Parameter | Description | Required |
---|---|---|
AltUsernames | A Boolean that specifies whether to return alternative user names. | No |
EncryptResponse | Encrypt the output. | No |
FieldName | Return information for users that have this field with the value specified by FieldValue. This parameter is ignored if you set UserName . |
Only if you do not set UserName |
FieldValue | Return information for users that have the field specified by FieldName with this value. This parameter is ignored if you set UserName . |
Only if you do not set Username |
FileName | The file to write output to. | No |
ForceTemplateRefresh | Forces the server to load the template from disk. | No |
Output | Write output to a file. | No |
Redirected | Allows the query to be performed against the repository. | No |
Repository | The repositories from which you want to get information. | No |
Template | The template to use for the action output. | No |
TemplateParamCSVs | A list of variables to use for the specified template. | No |
UserName | The name of the user whose information is returned. | Yes, unless you set FieldName and FieldValue |
Example
/action=GetGroups&UserName=DOMAIN1%5cJSmith
This action instructs the group server to return information for the user DOMAIN1\JSmith
.
/action=GetGroups&FieldName=CompanyDepartment&FieldValue=Finance
This action instructs the group server to return information for any users that have the field CompanyDepartment
with the value Finance
.
Response
The following is an example response to the action:
action=GetGroups&UserName=DOMAIN1%5cJSmith&Repository=NT,eRoom
<responsedata> <Groups>DOMAIN1\GROUPA</Groups> <Groups>DOMAIN1\GROUPB</Groups> <Groups>DOMAIN1\GROUPC</Groups> <Groups>DOMAIN2\GROUPA</Groups> <Groups>DOMAIN2\GROUPB</Groups> <Groups>DOMAIN2\GROUPC</Groups> <GroupCount>6</GroupCount> <UserName>DOMAIN1\JSMITH</UserName> <UserName alias_for="DOMAIN1\JSMITH">JohnS</UserName> <UserName alias_for="DOMAIN1\JSMITH">JS</UserName> <DisplayName>John Smith</DisplayName> <GivenName>John</GivenName> <Surname>Smith</Surname> <mail>john.smith@domain1.com</mail> <Error>Repository 'eRoom' not recognized</Error> </responsedata>
If you set both GroupServerShowAlternativeNames=TRUE
and GroupServerNumberAlternativeNames=TRUE
, the response instead contains:
<UserName>DOMAIN1\JSMITH</UserName> <UserName0>DOMAIN1\JSMITH</UserName0> <UserName1>JohnS</UserName1> <UserName2>JS</UserName2>
TIP: It is expected that the primary username appears twice. The alias_for
attribute is not included.
Setting GroupServerNumberAlternativeNames=TRUE
is not recommended.