Everything is not a valid argument for "gam update user"

642 views
Skip to first unread message

Oleh

unread,
Sep 27, 2019, 11:33:32 AM9/27/19
to GAM for G Suite
I'm trying to update the user and nothing seems to work:

# gam update user our...@email.address suspended on
ERROR: on is not a valid argument for "gam update user"

# gam update user our...@email.address suspended 1
ERROR: 1 is not a valid argument for "gam update user"

# gam update user our...@email.address suspended true
ERROR: true is not a valid argument for "gam update user"
 
# gam update user our...@email.address suspended yes
ERROR: yes is not a valid argument for "gam update user"

When I do 
gam info user our...@email.address
it shows the user info, but I cannot update it.

Similar error is for updating the name, for example:
# gam update user our...@email.address firstname Testname suspended yes
ERROR: Testname is not a valid argument for "gam update user"

What it could be and why? 

# gam version
Python 3.7.4 64-bit final
google-api-python-client 1.7.11
Darwin-18.7.0-x86_64-i386-64bit x86_64

Kevin Melillo ✉

unread,
Sep 27, 2019, 11:46:20 AM9/27/19
to google-ap...@googlegroups.com
suspended on or suspended off 
Not yes or no.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/f18d9082-a8cf-415b-a67f-1b509f11760e%40googlegroups.com.


--
photo
Kevin Melillo
Electronic Communications Analyst, Information Technology

Phone: 732.465.6609 | Mobile: 732-609-4331

Email: k.me...@ieee.org

445 Hoes Lane Piscataway, NJ 08854

Jay Lee

unread,
Sep 27, 2019, 11:48:04 AM9/27/19
to google-ap...@googlegroups.com
I suspect something about how you are running the commands or quoting them is wrong. It appears GAM is not seeing the "suspended" argument or may be seeing it as part of the user email address. Are you copy / pasting these commands or parts of these commands and if so can you try running them by manually typing everything in?

Ross Scroggs

unread,
Sep 27, 2019, 11:50:30 AM9/27/19
to google-ap...@googlegroups.com
To test Jay's theory, cd to the directory containing the gam executable, then do: ./gam update user our...@email.address suspended on
What does this show: alias gam

Ross



--

Oleh

unread,
Sep 27, 2019, 12:16:43 PM9/27/19
to GAM for G Suite
Hi Jay,

>  It appears GAM is not seeing the "suspended" argument or may be seeing it as part of the user email address.

Thank you, I tried again, but this time I typed everything and it worked! It looks like I copied the email with some symbol that looks like a space but is not actually a space :-/ It's clearly visible when I run:

# gam update user our...@email.address suspended suspended on
updating user our...@email.address suspended...

ERROR: 404: Resource Not Found: userKey - userNotFound


To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.


--
photo
Kevin Melillo
Electronic Communications Analyst, Information Technology

Phone: 732.465.6609 | Mobile: 732-609-4331

Email: k.me...@ieee.org

445 Hoes Lane Piscataway, NJ 08854

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.


--
Ross Scroggs

Ross Scroggs

unread,
Sep 27, 2019, 12:31:27 PM9/27/19
to google-ap...@googlegroups.com
Kevin,

Both Standard and Advanced Gam accept the following for Boolean values:

true_values = ['on', 'yes', 'enabled', 'true', '1']

false_values = ['off', 'no', 'disabled', 'false', '0']


Ross




--

Oleh Vasylenko

unread,
Sep 30, 2019, 4:02:17 AM9/30/19
to google-ap...@googlegroups.com
A good example of principle of least astonishment, Ross. 
I didn't read the code, just guessed the other 'true' values correctly :)

You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/DmRHThuy3g8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAJkvRS_h11BrH-swajLxNZfGh%2B%3DrR9i2cmtc29XRaktejwuGvA%40mail.gmail.com.


--
Ambisafe Logo
Oleh Vasylenko
Chief Security Officer
Our company is not authorized to make legal determinations on behalf of our clients. Nothing we say or do should be taken as legal or financial advice. We strongly encourage you to retain and consult with your own legal counsel on all matters.
Reply all
Reply to author
Forward
0 new messages