Updating Google Custom Attributes

663 views
Skip to first unread message

Karolina Janowska

unread,
Oct 17, 2022, 8:54:41 AM10/17/22
to GAM for Google Workspace
Hi Everyone!

I want to updating custom attribute using GAM. I'm using GAMADV-XTD3. 

I tried command:

gam update user <email> <schemaName> <value> 

but I have error all the time. 

Please help me. 

Karolina

Ross Scroggs

unread,
Oct 17, 2022, 10:10:40 AM10/17/22
to google-ap...@googlegroups.com
Karolina,

For the schema of interest do:
gam info schema <NameOfSchema>
Then the command you are trying and the error message.

Ross

--
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/e04f14ee-76ca-45a5-baee-9239ef0e7356n%40googlegroups.com.


--

Karolina Janowska

unread,
Oct 18, 2022, 1:40:46 AM10/18/22
to GAM for Google Workspace
Thanks for your attention. 

Step 1. gam info schema <schemaName> 

(base) MacBook-Pro-Karolina:gam karolina$ gam info schema Termin_wanoci

Schema: Termin_wanoci

  schemaId: mQ2muyFDQ7S-q0fP3ozS_g==

  displayName: Termin

  Field: Data

    fieldId: QyGb1tO2RYWp6fbmn7XKEw==

    fieldType: DATE

    displayName: Data

    multiValued: False

    readAccessType: ADMINS_AND_SELF

Step 2a. gam update user x...@pwr.edu.pl Termin_wanoci "02.02.2022"

Command: /Users/karolina/bin/gamadv-xtd3/gam update user x...@pwr.edu.pl >>>Termin_wanoci<<< 02.02.2022


ERROR: Invalid argument

Help: Syntax in file /Users/karolina/bin/gamadv-xtd3/GamCommands.txt

Help: Documentation is at https://github.com/taers232c/GAMADV-XTD3/wiki


Step 2b. gam update user x...@pwr.edu.pl schema Termin_wanoci 02.02.2022

Command: /Users/karolina/bin/gamadv-xtd3/gam update user x...@pwr.edu.pl >>>schema<<< Termin_wanoci 02.02.2022


ERROR: Invalid argument

Help: Syntax in file /Users/karolina/bin/gamadv-xtd3/GamCommands.txt

Help: Documentation is at https://github.com/taers232c/GAMADV-XTD3/wiki


What do you think is wrong?


Karolina

Ross Scroggs

unread,
Oct 18, 2022, 10:47:00 AM10/18/22
to google-ap...@googlegroups.com
Karolina,

You have to specify the schema and the field; the date must be formatted as yyyy-mm-dd
gam update user x...@pwr.edu.pl Termin_wanoci.Data "2022-02-02"

Ross



--

Maj Marshall Giguere

unread,
Oct 18, 2022, 11:13:26 AM10/18/22
to google-ap...@googlegroups.com
gam update user x...@pwr.edu.pl schema Termin_wanoci.Data "2022-02-02"

You may have to tweak the date value.

Maj Marshall E Giguere

NH Wing Director of IT

Civil Air Patrol, U.S. Air Force Auxiliary

GoCivilAirPatrol.com

nhwg.cap.gov

Volunteers serving America's communities, saving lives, and shaping futures.



Karolina Janowska

unread,
Oct 19, 2022, 3:08:49 AM10/19/22
to GAM for Google Workspace
Hi,

below the command is correct 

gam update user x...@pwr.edu.pl Termin_wanoci.Data "2022-02-02" 

I have last question. Can I use a .csv file to update custom attributes? 

Thanks again!
Karolina

Karolina Janowska

unread,
Oct 19, 2022, 8:45:40 AM10/19/22
to GAM for Google Workspace
ok, I check it. I can ;) 

Thanks everyone!

KJ

tvi...@aysgarthschool.co.uk

unread,
Oct 19, 2022, 8:49:39 AM10/19/22
to google-ap...@googlegroups.com
it's my 1/2 day

Tatler: Prep school of the year 2019/20

Aysgarth School Trust Limited
Newton-Le-Willows | Bedale | North Yorkshire | DL8 1TF
Tel:  01677 450240
Follow us on Facebook | Instagram | Twitter

"...boy-friendly atmosphere where you can 'be your own man'." - click here to read the full Good Schools Guide review.

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system. Email transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of email transmission. If verification is required please request a hard-copy version. 
Aysgarth School Trust Limited, Newton le Willows, Bedale, North Yorkshire, DL8 1TF.

Registered Charity No. 529538 (England)
Company Number: 898078
Registered Office: Aysgarth School Trust Limited, Newton le Willows, Bedale, North Yorkshire, DL8 1TF
Telephone - 01677 450240

Maj Marshall Giguere

unread,
Oct 19, 2022, 9:52:10 AM10/19/22
to google-ap...@googlegroups.com
Yes, you can use a csv file to update custom schema values.
I would create a csv file with two columns, column 1 the email address (email), and column 2 the value (date).  Then it is a simple matter to use gam's substitution processing to perform the updates.

Example csv file input.csv
email,date
...

Command:
gam csv ./input.csv update user ~email Termin_wanoci.Data  "~date"


Maj Marshall E Giguere

NH Wing Director of IT

Civil Air Patrol, U.S. Air Force Auxiliary

GoCivilAirPatrol.com

nhwg.cap.gov

Volunteers serving America's communities, saving lives, and shaping futures.


Reply all
Reply to author
Forward
0 new messages