SCRT-HQ / PSGSuite

Powershell module for Google / G Suite API calls wrapped in handy functions. Authentication is established using a service account via P12 key to negate the consent popup and allow for greater handsoff automation capabilities
https://psgsuite.io/
Apache License 2.0
234 stars 66 forks source link

Error:"invalid_grant", Description:"Invalid email or User ID", Uri:"" #267

Open pdewas opened 4 years ago

pdewas commented 4 years ago

Hello,

I have an error to access the data : Error:"invalid_grant", Description:"Invalid email or User ID", Uri:""

Steps to reproduce the behavior:

  1. Get-GSUser -Filter *

Do you have any idea, how to solve this?

Kr, Pierre

scrthq commented 4 years ago

@pdewas - There are two components that could be impacting:

  1. New Google Dev Console project/service account (takes some time for permissions to propagate)
  2. PSGSuite was not explicitly imported (sometimes auto-loading the module results in unexpected behavior due to SDK types not loading correctly)
phatmandrake commented 4 years ago

This is also an error you can get if your PSGSuite Config file is incorrect

If you run Show-PSGSuiteConfig Is the value for "AppEmail" filled out?