---
title: "API: getUserGroups"
slug: "api-getusergroups"
tags: ["home groups", "permissions"]
updated: 2022-09-20T15:50:20Z
published: 2022-09-20T15:50:20Z
canonical: "support.smarteru.com/api-getusergroups"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://support.smarteru.com/llms.txt
> Use this file to discover all available pages before exploring further.
# API: getUserGroups
- SmarterU requires all API calls to POST to HTTPS. Any POST to HTTP will result in the SU:01 error (i.e., No POST data detected.).
- If you are viewing the help in a language other than English, please change your language to English before copying and pasting any code. All API attributes and functions are in English.
- Tags are required unless specified.
## **Description**
The getUserGroups method retrieves a [user's groups](/v1/docs/user-group-permissions).
## **Who Has Access**
The following users have access to the getUserGroups method:
- Users with the [Group Managers](/v1/docs/group-permission-group-manager-gm), [Manage Group Users](/v1/docs/group-permission-manage-group-users-mgu), or [Manage Users](/v1/docs/group-permission-manage-users-mu) group permission.
- [Supervisors](/v1/docs/user-profile-information#supervisors), if the [account's **Supervisor Access** setting's](/v1/docs/account-settings#supervisor-access)*View Supervisees* or *Edit Supervisees* option is checked.
- [Administrators and owners](/v1/docs/user-profile-information#access-level).
## **API Call XML Package**
```markup
getUserGroups
-OR-
-OR-
```
## **User Tag Group**
The User tag group is a container for the user filter.
```markup
-OR-
-OR-
```
The User tag contains one of the following.
### ID
The user's system-generated identifier. This tag is mutually exclusive with the [Email](/v1/docs/api-getusergroups#email) and [EmployeeID](/v1/docs/api-getusergroups#employeeid) tags. This is the ID returned by the [getUser](/v1/docs/api-getuser) method.
### Email
The [user's email address](/v1/docs/user-login-information#primary-email-required-if-employee-id-not-specified). This tag is mutually exclusive with the [ID](/v1/docs/api-getusergroups#id) and [EmployeeID](/v1/docs/api-getusergroups#employeeid) tags. This is the Email returned by the [getUser](/v1/docs/api-getuser) and [listUsers](/v1/docs/api-listusers) methods.
### EmployeeID
The [user's employee ID](/v1/docs/user-login-information#employee-id-required-if-primary-email-not-specified). This tag is mutually exclusive with the [ID](/v1/docs/api-getusergroups#id) and [Email](/v1/docs/api-getusergroups#email) tags. This is the EmployeeID returned by the [getUser](/v1/docs/api-getuser) and [listUsers](/v1/docs/api-listusers) method.
## API Response XML Package
The [API response XML package](/v1/docs/api-response-xml-package) will always include a Result, Info, and [Errors](/v1/docs/api-getusergroups#error-codes) tag.
```markup
```
The UserGroups tag is a container for the [groups](/v1/docs/groups) returned by the getUserGroups method. Each group is contained in a Group tag and may contain the following.
### Name
The [group's name](/v1/docs/group-group-information#name).
### Identifier
The user-specified [group identifier](/v1/docs/group-group-information#group-id).
### IsHomeGroup
Indicates whether the group is the user's [home group](/v1/docs/home-groups):
- *0* - The group is not the user's home group.
- *1* - The group is the user's home group.
### **Permissions**
A container for the [user's group permissions](/v1/docs/user-group-permissions). Each permission is contained in a Permission tag.
### Example API Response XML Package
Below is an example of an API response XML package.
```markup
Success
No
Yes
No
No
```
## **Error Codes**
| Error Code | Message |
| --- | --- |
| GUG:01 | The email address provided is not valid. |
| GUG:02 | The employee ID provided is not valid. |
| GUG:03 | The user ID provided is not valid. |
## Related
- [API: createUser](/api-createuser.md)
- [API: getUser](/api-getuser.md)
- [API: getUserSubscriptions](/api-getusersubscriptions.md)
- [API: getUserWithRoleDetail](/api-getuserwithroledetail.md)
- [API: listUsers](/api-listusers.md)
- [API: updateUser](/api-updateuser.md)
- [Home Groups](/home-groups.md)
- [User: Group Permissions](/user-group-permissions.md)