Deleting licenses via a csv file

600 views
Skip to first unread message

Ros Lee

unread,
Feb 28, 2022, 11:25:21 PM2/28/22
to GAM for Google Workspace
I have an OU in which some students are incorrectly assigned SKU ID 
1010310008.  I have created a csv containing those users whose licenses I want to revoke.
Will the following command delete the license for everyone in the csv.  Is the syntax correct?  (Sorry, I'm a newbie at this).

gam csv licenses.csv gam delete license 1010310008

Stephen Bennett

unread,
Mar 1, 2022, 5:21:04 AM3/1/22
to google-ap...@googlegroups.com

This email and any attachments contain confidential information which may be subject to legal privilege. If you are not the intended recipient you must not use, disclose, copy or distribute this email or information in it. If it has been received in error please notify us immediately by return email and then delete/destroy the message. This email is not necessarily the official view or communication of Otumoetai College.

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" 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/90b395de-514f-42dc-b3b2-33cd6a3c503en%40googlegroups.com.

Ross Scroggs

unread,
Mar 1, 2022, 10:13:02 AM3/1/22
to google-ap...@googlegroups.com
Ros,

What is the header line in licenses.csv?
Replace header in the line below with the actual value from the CSV file.

gam csv licenses.csv gam user "~header" delete license 1010310008

Ross

Ros Lee

unread,
Mar 1, 2022, 2:36:05 PM3/1/22
to google-ap...@googlegroups.com
perfect, thanks Ross!

Ros Lee
Head of IT Services  BA (Hons) DipBusComp
T. +64 7 576 2316 ext. 744  |  www.otc.school.nz


  




You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/z6Ieh03sp_0/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/8BF5C83D-783C-4AA0-BA94-9EDBC5AB45D6%40gmail.com.

Melyani Nurhalimah Sembiring

unread,
May 14, 2025, 5:18:06 AMMay 14
to GAM for Google Workspace
Hello Ross,


i tried to remove license <101007xxxx> using command:
gam csv <file.csv> gam user ~header delete license 101007xxxx

but it returned :

ERROR : Invalid Choice (101007xxxx) : Expected 101001001 | 1010020020 | 101034xxxx | ...etc (screenshot attached)
the license 101007xxxx doesn't included in those expected value, (but it is listed in the SKU IDs list https://github.com/GAM-team/GAM/wiki/Licenses)

Screenshot 2025-05-14 at 16.11.18.png

kindly need help to check what is the problem,

thanks and regards,

Ross Scroggs

unread,
May 14, 2025, 9:38:37 AMMay 14
to google-ap...@googlegroups.com
What is: gam version
Those licenses were added in 7.05.11, current in 7.07.02

Ross
----
Ross Scroggs



On May 14, 2025, at 2:18 AM, Melyani Nurhalimah Sembiring <melya...@pusdatin.belajar.id> wrote:

Hello Ross,


i tried to remove license <101007xxxx> using command:
gam csv <file.csv> gam user ~header delete license 101007xxxx

but it returned :

ERROR : Invalid Choice (101007xxxx) : Expected 101001001 | 1010020020 | 101034xxxx | ...etc (screenshot attached)
the license 101007xxxx doesn't included in those expected value, (but it is listed in the SKU IDs list https://github.com/GAM-team/GAM/wiki/Licenses)

<Screenshot 2025-05-14 at 16.11.18.png>

kindly need help to check what is the problem,

thanks and regards,
On Tuesday, March 1, 2022 at 10:13:02 PM UTC+7 Ross Scroggs wrote:
Ros,

What is the header line in licenses.csv?
Replace header in the line below with the actual value from the CSV file.

gam csv licenses.csv gam user "~header" delete license 1010310008

Ross

On Feb 28, 2022, at 8:25 PM, Ros Lee <rl...@otc.school.nz> wrote:

I have an OU in which some students are incorrectly assigned SKU ID 
1010310008.  I have created a csv containing those users whose licenses I want to revoke.
Will the following command delete the license for everyone in the csv.  Is the syntax correct?  (Sorry, I'm a newbie at this).

gam csv licenses.csv gam delete license 1010310008

This email and any attachments contain confidential information which may be subject to legal privilege. If you are not the intended recipient you must not use, disclose, copy or distribute this email or information in it. If it has been received in error please notify us immediately by return email and then delete/destroy the message. This email is not necessarily the official view or communication of Otumoetai College.

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" 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/90b395de-514f-42dc-b3b2-33cd6a3c503en%40googlegroups.com.

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

Massimo Giovanni BERVA

unread,
May 14, 2025, 10:24:34 AMMay 14
to google-ap...@googlegroups.com
Hi,
I have the same problem

I run:
gam user test....@unibg.it delete license 1010070001
return ERROR:
Command: gam user test....@unibg.it delete license >>>1010070001<<<

ERROR: Invalid choice (1010070001): Expected <1010010001|1010020020|1010020025|1010020026|1010020027|1010020028|1010020029|1010020030|1010020031|1010050001|1010060001|1010060003|1010060005|1010310002|1010310003|1010310005|1010310006|1010310007|1010310008|1010310009|1010310010|1010330002|1010330003|1010330004|1010340001|1010340002|1010340003|1010340004|1010340005|1010340006|1010350001|1010360001|1010370001|1010380001|1010380002|1010380003|1010390001|1010400001|1010430001|1010470001|1010470002|1010470003|1010470004|1010470005|1010470006|1010470007|1010490001|1010500001|1010500002|Google-Apps|Google-Apps-For-Business|Google-Apps-For-Government|Google-Apps-For-Postini|Google-Apps-Lite|Google-Apps-Unlimited|Google-Chrome-Device-Management|Google-Drive-storage-16TB|Google-Drive-storage-1TB|Google-Drive-storage-200GB|Google-Drive-storage-20GB|Google-Drive-storage-2TB|Google-Drive-storage-400GB|Google-Drive-storage-4TB|Google-Drive-storage-50GB|Google-Drive-storage-8TB|Google-Vault|Google-Vault-Former-Employee>
Help: Syntax in file /usr/local/bin/my_scripts/gamadv-xtd3/GamCommands.txt
Help: Documentation is at https://github.com/taers232c/GAMADV-XTD3/wiki
2025-05-14T14:13:13.536+00:00,0/1,Processing complete

My version: gamadv-xtd3: 7.05.02

Regards
Massimo

Ross Scroggs

unread,
May 14, 2025, 10:28:28 AMMay 14
to google-ap...@googlegroups.com
What is: gam version
Those licenses were added in 7.05.11, current in 7.07.02

Ross
----
Ross Scroggs


Ross Scroggs

unread,
May 14, 2025, 11:14:00 AMMay 14
to google-ap...@googlegroups.com
Ross
----
Ross Scroggs


Melyani Nurhalimah Sembiring

unread,
May 19, 2025, 8:30:08 AMMay 19
to google-ap...@googlegroups.com
Thanks Ross,

it works fine after updating to the newest version,


regards,

Massimo Giovanni BERVA

unread,
May 20, 2025, 4:21:29 AMMay 20
to google-ap...@googlegroups.com
Thanks Ross,

it works fine me too.

now i have the same problem on license

Google Workspace for Education Gmail Only ( 1010070004 )

The output of the gam print licenses command is:
Got 0 Licenses for 101001 (Cloud Identity Free)...
Got 0 Licenses for 101005 (Cloud Identity Premium)...
Got 0 Licenses for 101031 (Google Workspace for Education)...
Got 0 Licenses for 101033 (Google Voice)...
Got 0 Licenses for 101034 (Google Workspace Archived User)...
Got 0 Licenses for 101035 (Cloud Search)...
Got 0 Licenses for 101036 (Google Meet Global Dialing)...
Got 0 Licenses for 101037 (Google Workspace for Education)...
Got 0 Licenses for 101038 (AppSheet)...
Got 0 Licenses for 101039 (Assured Controls)...
Got 0 Licenses for 101040 (Chrome Enterprise)...
Got 0 Licenses for 101043 (Google Workspace Additional Storage)...
Got 0 Licenses for 101047 (Gemini)...
Got 0 Licenses for 101049 (Education Endpoint Management)...
Got 0 Licenses for 101050 (Colab)...
Got 3396 Licenses for Google-Apps (Google Workspace)...
Got 0 Licenses for Google-Chrome-Device-Management (Google Chrome Device Management)...
Got 0 Licenses for Google-Drive-storage (Google Drive Storage)...
Got 0 Licenses for Google-Vault (Google Vault)...

Can you help me?

Regards
Massimo





Ross Scroggs

unread,
May 20, 2025, 10:06:43 AMMay 20
to google-ap...@googlegroups.com
What is the problem? License SKU 1010070004 in part of the Google Apps product;
were those licenses among the 3396 Google-Apps licenses?

Ross
----
Ross Scroggs


Massimo Giovanni BERVA

unread,
May 21, 2025, 11:20:10 AMMay 21
to google-ap...@googlegroups.com
The problems on Google Workspace for Education Gmail Only ( 1010070004 ) license.
I want to add the "Google Workspace for Education Gmail Only" license so I run:

gam user test....@unibg.it add license 1010070004
Command: /tmp/staticx-gadehb/gam user test....@unibg.it add license >>>1010070004<<<

ERROR: Invalid choice (1010070004): Expected <1010010001|1010020020|1010020025|1010020026|1010020027|1010020028|1010020029|1010020030|1010020031|1010050001|1010060001|1010060003|1010060005|1010310002|1010310003|1010310005|1010310006|1010310007|1010310008|1010310009|1010310010|1010330002|1010330003|1010330004|1010340001|1010340002|1010340003|1010340004|1010340005|1010340006|1010350001|1010360001|1010370001|1010380001|1010380002|1010380003|1010390001|1010400001|1010430001|1010470001|1010470002|1010470003|1010470004|1010470005|1010470006|1010470007|1010490001|1010500001|1010500002|Google-Apps|Google-Apps-For-Business|Google-Apps-For-Government|Google-Apps-For-Postini|Google-Apps-Lite|Google-Apps-Unlimited|Google-Chrome-Device-Management|Google-Drive-storage-16TB|Google-Drive-storage-1TB|Google-Drive-storage-200GB|Google-Drive-storage-20GB|Google-Drive-storage-2TB|Google-Drive-storage-400GB|Google-Drive-storage-4TB|Google-Drive-storage-50GB|Google-Drive-storage-8TB|Google-Vault|Google-Vault-Former-Employee>
Help: Syntax in file /usr/local/bin/my_scripts/gam7/GamCommands.txt

Why?



Ross Scroggs

unread,
May 21, 2025, 11:25:06 AMMay 21
to google-ap...@googlegroups.com
Support for that license was added in 7.05.11, current is 7.07.05.


Ross
----
Ross Scroggs


Massimo Giovanni BERVA

unread,
May 21, 2025, 1:55:14 PMMay 21
to google-ap...@googlegroups.com
Thanks Ross, I'm going to upgrade it.
Regards
Massimo 
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 Google Workspace" 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 Google Workspace" 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 Google Workspace" 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 Google Workspace" 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 Google Workspace" 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 Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-manager/3C6B3067-678C-431A-87FA-67CADE0C7DFF%40gmail.com.
Reply all
Reply to author
Forward
0 new messages