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

Setup Guide Unclear / Not up to Date #366

Open
magic-happenz opened this issue Mar 7, 2022 · 5 comments
Open

Setup Guide Unclear / Not up to Date #366

magic-happenz opened this issue Mar 7, 2022 · 5 comments
Labels
auth documentation update Documentation update needed for this

Comments

@magic-happenz
Copy link

Describe the bug
I failed multiple times setting this up. There are multiple things that do not work from the https://psgsuite.io/Initial%20Setup/ setup guide beginning with the broken links to create the project which is due to API changes I assume (i.e.: there is no Apps Activity API
existing).
Then there is no domain wide delegation checkbox anymore in the service account, at least not for me. All in all when following this guide step by step I still end up with error:
Exception calling "Execute" with "0" argument(s): "Error:"unauthorized_client", Description:"Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested.", Uri:"""
OR
Exception calling "Execute" with "0" argument(s): "Error:"invalid_grant", Description:"java.security.SignatureException:

To Reproduce
Steps to reproduce the behavior:

  1. Setup environment according to https://psgsuite.io/Initial%20Setup/
  2. Set-PSGSuiteConfig
  3. Get-GSUserList
  4. Error

Expected behavior
Get a list of users from my GSuite tenant.

Environment (please complete the following information):

  • OS: [e.g. Windows 11 21H2]
  • PowerShell Version: 5.1.22000.282
  • PSGSuite Version: 2.36.4
@jgeron-suhsd
Copy link
Collaborator

jgeron-suhsd commented Mar 11, 2022

Directions are mostly unclear and do need updating, but if you're able to mostly get through it and are able to run get-gsuser to return information about your admin account, try the following:

I was having this exact issue tonight on one of several domains that I work with. My problem was my CustomerID was incorrect. Double check your CustomerID in your PSGSuiteConfig.

Assuming you can run Get-GSUser, you should be able to find your CustomerID.

Then run Set-PSGSuiteConfig -ConfigName NameOfYourConfig -CustomerID YourCustomerID -Preference CustomerID

Then try running Get-GSUserList again. Should be all set.

@magic-happenz
Copy link
Author

Thanks for the tip but I am wondering how to do this if the config is not working? If you can run Get-GSUser you acutally already made it. My problem is that no config worked. BTW you can obtain it from https://admin.google.com/ac/accountsettings/profile. Would be good to acutally mention this in the guide...

However, after hours and hours of investigation I finally made it working. Here some tips for anyone who have to use it in the future:

Hope that helps anyone and that this guide could be updated to avoid the hard time people have that need to use it.

@jgeron-suhsd
Copy link
Collaborator

FYI - I run the module in VSCode without any issues, so I'm not sure what you're problem is in that regard.

@magic-happenz
Copy link
Author

Yes could be but at least for me some commands I run into errors on VSCode while they work in Powershell.

@FISHMANPET FISHMANPET added documentation update Documentation update needed for this auth labels Apr 1, 2022
@tekuadam
Copy link

For more info - In VSCode I get the following specifically when running it in the PowerShell Integrated Console:

image

Get-GSGmailProfile : The value supplied is not valid, or the property is read-only. Change the value, and then try again.
At line:1 char:1
+ Get-GSGmailProfile
+ ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-GSGmailProfile

If I run the same in the powershell terminal it works fine.

image

I've had this in the past with other modules, I assume due to the way the PowerShell extension handles modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth documentation update Documentation update needed for this
Projects
None yet
Development

No branches or pull requests

4 participants