-
Notifications
You must be signed in to change notification settings - Fork 67
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
Error Message Getting All Users for Multi-Domain Customer #32
Comments
Hey @ryanfog - Checking this out now! Apologies for the delay! |
Can you try running the following to see if you get a different behavior? I have a feeling the default SearchBase value may be causing some headaches for your org size: $users = Get-GSUser -Filter * -SearchBase $null -Verbose This should give you some verbose feedback showing the exact filter being sent with the command. Screenshot showing the differences: |
@ryanfog check my last answer and let me know if passing |
@ryanfog - In your PSGSuite config, do you have your customer ID and domain set? |
I do have a customer ID listed and one of the primary domains of the 40 or so we have listed in Google. if we need to do a screen share or something I am open to that |
Gotcha! What's your Preference set to in your config? CustomerID or Domain or not set? |
And are you trying to list the users for all domains under your customer? or just a single domain's users? |
[Variables] |
All users and all domains |
can you try setting your CustomerID to "my_customer" as a test, then rerunning to see if any difference is made? # Save the current customer ID
$currentCustomerID = (Show-PSGSuiteConfig).CustomerID
# Set the config to use the generic my_customer value
Set-PSGSuiteConfig -CustomerID my_customer
# Try pulling users again (Verbose may show where it's hanging)
$users = Get-GSUser -Filter * -Verbose
# Revert your config back to normal
Set-PSGSuiteConfig -CustomerID $currentCustomerID |
if the above works, then it may indicate the wrong CustomerID is stored in your config OR that Google really doesn't like using the CustomerID there and prefers Next step would be to ensure that the customer ID wasn't the result of an odd copy/paste or something via this command to pull your admin user account and the customer ID property directly from there: Set-PSGSuiteConfig -CustomerID (Get-GSUser).CustomerID |
Its appears you are onto something.. |
side note - I think that you should be able to specify a domain as well to list all users from, as currently Get-GSUserListPrivate only allows pulling the full customer list OR the domain set in the config (if Preference is set to Domain) |
Sweet!!! Try running the command in my previous message to set your CustomerID directly from the value returned by Get-GSUser for your AdminEmail: Set-PSGSuiteConfig -CustomerID (Get-GSUser).CustomerID
$users = Get-GSUser -Filter * -Verbose |
PS - I removed your screenshot since you still had your adminemail showing on the second verbose output 😉 |
Consider this issue resolved, it appears to be the old ID10T error on my part. |
lol, you're good! no dumb moves, just continual learning experiences. Glad it's sorted!! I'm still going to add some updates to Get-GSUser to allow specific domain listing as well, as I'm sure it will be useful for users like you who manage multiple G Suite domains! |
That would be awesome this we are a global company with domains like domain.fr and domain.ca etc.. |
I should have an updated version that adds that functionality in by tonight! |
Just to confirm as well, you were good after setting the CustomerID in your config to |
you should be using the actual CustomerID in your config and not the |
That is correct my config.ini file is updated with the proper customerID retrieved from Google directly. |
sweet! glad it's sorted! |
## 2.5.3 * Fixed/Added: Specific domain support for listing users with `Get-GSUser -Filter $filter -Domain domain2.com` to allow customers with multiple domains to only list users for a specific domain instead of just the entire customer or domain saved in the config. (Resolve [Issue #32](#32)) * Added: Better verbose output in when listing users * Fixed: Performance increase in `Get-GSDriveFileList` but returning DriveFile objects as it iterates through each page instead of storing in an array and returning the array at the end (Resolve [Issue #38](#38))
@ryanfog - added the ability to specify |
When I perform a "Get-GSUser -Filter *" the expected result is to pull back all users in G-Suite, instead I get an error message. My environment has a little over 12K accounts involved.
The text was updated successfully, but these errors were encountered: