Skip to main content

Get group user membership by group id

Log in to add to favourites

Page last updated 04 December 2020

Gets the users as direct members of the group.

getUsersByGroupId(groupId: string): Promise<PagedList<User>>

Example

JavaScript
let groupId = "4b262379-5bbe-421e-a429-f6e2ab5a849b";

client.security.groups.getUsersByGroupId(groupId)
    .then(result => {
        console.log('API call result: ', result);
    })
    .catch(error => {
        console.log('API call error: ', error);        
    });

Gets the users as direct members of the group.

getUsersByGroupName(groupName: string): Promise<PagedList<User>>

Example

JavaScript
let groupName = "Test Users";

client.security.groups.getUsersByGroupName(groupName)
    .then(result => {
        console.log('API call result: ', result);
    })
    .catch(error => {
        console.log('API call error: ', error);        
    });

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