Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get-jcusergroupmember not pulling all users #239

Open
rgahan opened this issue Jun 26, 2020 · 6 comments
Open

get-jcusergroupmember not pulling all users #239

rgahan opened this issue Jun 26, 2020 · 6 comments

Comments

@rgahan
Copy link

rgahan commented Jun 26, 2020

I have over 500 users in a user group, and when I use the powershell module to get the list, I only get 199 user objects.

I am on module version 1.17.3

@rgahan rgahan changed the title get-jcusergroupmembership not pulling all users get-jcusergroupmember not pulling all users Jun 26, 2020
@ghost
Copy link

ghost commented Jun 26, 2020

@rgahan can you please send over the exact command with parameters that your running so we can try to reproduce?

@rgahan
Copy link
Author

rgahan commented Jun 26, 2020

Pretty basic command - Get-JCUserGroupMember -GroupName fs-personalfolder

The group fs-personalfolder has 530 members in the UI. It only returns 199 members in powershell .

@ghost
Copy link

ghost commented Jun 26, 2020

We tried to reproduce in our test environment but were unable to get the same result. Here are some troubleshooting steps you might try.

# Validate that there are no other groups with similar names
Get-JCGroup | Where-Object { $_.name -like '*fs*personalfolder*' }
# Return the users associated to that group and get the count
$UserGroupMembers = Get-JCUserGroupMember -GroupName fs-personalfolder
$UserGroupMembers.Count
# Another way to get user to user group associations
$UserGroupMembersAssociation = Get-JCAssociation -Type:('user_group') -Name:('fs-personalfolder') -TargetType:('user')
$UserGroupMembersAssociation.Count

@rgahan
Copy link
Author

rgahan commented Jun 26, 2020

PS C:\WINDOWS\system32> # Validate that there are no other groups with similar names
>> Get-JCGroup | Where-Object { $_.name -like '*fs*personalfolder*' }
>> # Return the users associated to that group and get the count
>> $UserGroupMembers = Get-JCUserGroupMember -GroupName fs-personalfolder
>> $UserGroupMembers.Count
>> # Another way to get user to user group associations
>> $UserGroupMembersAssociation = Get-JCAssociation -Type:('user_group') -Name:('fs-personalfolder') -TargetType:('user')
>> $UserGroupMembersAssociation.Count

attributes id                       name              type
---------- --                       ----              ----
                  *                        fs-personalfolder user_group
199
199

* I removed the group ID. 

I also tested this on another VM to see if I had an issue locally.  Same results

@jworkmanjc
Copy link
Contributor

@rgahan, we've done a little digging but can't reproduce the issue locally. Would you mind if we opened a support case on your behalf and spent some time troubleshooting over a screen share session next week?

@jworkmanjc
Copy link
Contributor

@rgahan,

I know this is an old issue but I know what's going on here now. We had another case show up that looked similar to this one and this time we were able to look at the database where system groups store entries for systems. It appears that in some cases there were entries to null systems (meaning systems that no longer exist in an organization) tied to system groups.

There is an effort to clean up these null entries. In addition we've identified a way in which we can modify get-jcusergroupmember to address this in the future. When we address that I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants