Skip to main content

Check a user is a member of a group

Log in to add to favourites
HEAD/api/security/groups/{groupIdentifier}/users/{userIdentifier}

Parameters

NameParameter typeTypeFormatDescription
groupIdentifier(required)pathstringgroup identifier For convenience, Group resources can be referenced by using either the group name or id
UserIdentifier(required)pathstringuser identifier For convenience, User resources can be referenced by using one of several identifiers - username, email address or Id.

Responses

HTTP status codeReasonModel
204Success - User in Group
401UnauthorizedError
403ForbiddenError
404User not in groupError
500Internal server errorError

Examples

Check if a user is a member of the a group by Id

HTTP
HEAD: /api/security/groups/9bb89380-fd49-41a5-ab2f-fc25e482a251/users/9f02a3d1-d8eb-4b10-8ed6-293a11d5201f

Check if user 'tdurden' is a member of the 'Paper Street Soap Company' group by name

HTTP
HEAD: /api/security/groups/Paper%20Street%20Soap%20Company/users/tdurden

Check if user is a member of the 'Fight club' group by email address

HTTP
HEAD: /api/security/groups/9bb89380-fd49-41a5-ab2f-fc25e482a251/users/tdurden@fightclub.com

Remarks

Membership will be classed as true if the user is a member of a child group of the specified group.

Permissions

Member of System Administrators or the authenticated user matching the specified user can check group membership.

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request