Error with Invoke-GShellScopeManager

36 views
Skip to first unread message

Anton

unread,
Nov 22, 2017, 4:01:17 PM11/22/17
to gshell-discuss

I recently started using Google Calendar to manage my personal schedule. I’m now looking for a way to programmatically enter my work roster as events in my personal Google Calendar.


gShell impressed me a lot and it does seem to have a couple of calendar cmdlets that fit my purpose.I understand that most of the cmdlets are aimed to serve domain admins but I recall that I read that some g-suite cmdlets (mail, calendar and drive) would also work for personal accounts too. Reason enough to give it a shot.


I’ve gone through the Getting Started instructions including creating a Google Developer's Console project and setting the Client ID and Secret. However, I did skip configuring ”your Google Apps domain to allow the use of the APIs” as I do not manage a domain.


The Set-gShellClientSecrets cmdlet created the gShell_OAuth2.json file with entries for clientSecrets but without a value for domains and null as value for defaultDomain.


Now I get an error when invoking the scope manager after a browser window is opened stating “Received verification code. You may now close this window.”

Loosely translated the error is: Value cannot be Null, parameter name: key


Anyone that can get me back on track? Thanks in advance!



PS> Invoke-GShellScopeManager

Please choose an API to explore its scope options:

 

[1]    calendar:v3

[2]    classroom:v1

[3]    admin:datatransfer_v1

[4]    admin:directory_v1

[5]    drive:v3

[6]    gmail:v1

[7]    groupsmigration:v1

[8]    groupssettings:v1

[9]    licensing:v1

[10]   admin:reports_v1

[11]   reseller:v1

 

Enter the number of your choice: 1

 

Would you like to view all 2 scopes [a], the 1 read-only scopes [r] or 1 all other scopes [o]?

 

Enter your choice: : a

 

calendar:v3 - Manipulates events and other calendar data.

 

 

Please select the scope(s) you'd like to grant gShell permission to:

 

[ ] 0  All - All scopes in this list.

[ ] 1  https://www.googleapis.com/auth/calendar - Manage your calendars

[ ] 2  https://www.googleapis.com/auth/calendar.readonly - View your calendars

 

Enter your choices, separated by commas: 0

 

calendar:v3 - Manipulates events and other calendar data.

 

 

Please confirm the scope(s) you'd like to grant gShell permission to:

 

[ ] 0  All - All scopes in this list.

[√] 1  https://www.googleapis.com/auth/calendar - Manage your calendars

[√] 2  https://www.googleapis.com/auth/calendar.readonly - View your calendars

 

Toggle your choices separated by commas or hit [enter] to finish and authenticate:

Scopes have been chosen, thank you.

 

You will now authenticate for this API. Press any key to continue:

Invoke-GShellScopeManager : Waarde kan niet null zijn.

Parameternaam: key

At line:1 char:1

+ Invoke-GShellScopeManager

+ ~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Invoke-GShellScopeManager], ArgumentNullException

    + FullyQualifiedErrorId : System.ArgumentNullException,gShell.Cmdlets.Utilities.ScopeHandler.InvokeGShellScopeManager

 

 

 

 

Spencer Varney

unread,
Nov 22, 2017, 9:54:54 PM11/22/17
to Anton, gshell-discuss
Hey Anton,

Unfortunately that error is decidedly vague so I can't offer any immediate suggestions; I'll have to look into it more for you, but it's a holiday weekend so it might not be until next week. Don't let me forget.

Also, I'm currently working hard on the next evolution of gShell in which all APIs from google will be represented to some degree. I won't get in to the details of that here, but if your issue needs a fix that is anything more than small it may need to wait until the next big release. That said, I'll try to get you up and running.

Regards,

Spencer

--
You received this message because you are subscribed to the Google Groups "gshell-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gshell-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anton

unread,
Dec 2, 2017, 5:59:44 PM12/2/17
to gshell-discuss
Hi Spencer,

Hope you enjoyed the festivities (Thanksgiving???).
Thanks for your response, I'm patient and still interested, but you did suggest that I should remind you not to forget. Hence this friendly reminder.
Anton.

Spencer Varney

unread,
Dec 12, 2017, 11:05:44 AM12/12/17
to Anton, gshell-discuss
I think I may have found the issue. I'm going to keep testing things out, but I don't  know that I'll be able to fix this with the current release. You may need to wait for the new version which doesn't yet have a solid ETA, sorry.

For my reference, in case I need to look back at this - when authenticating for a gmail address the domain of gmail.com isn't returned in the expected place from the oauth call.

Anton

unread,
Dec 12, 2017, 1:06:58 PM12/12/17
to gshell-discuss
Still hopefull and patient. Anton.
Reply all
Reply to author
Forward
0 new messages