update user attributes & custom schema attributes

2,563 views
Skip to first unread message

Jonathan Haff

unread,
Jul 15, 2021, 1:59:43 PM7/15/21
to GAM for Google Workspace
hey all, i'm trying to update user info (dept, address, etc) as well as custom schema attributes within one command, but it continues to fail on the custom attribute update, i'm using:

gam update user <email> address type work unstructured "School Address" schoolInfo.role Faculty

i can update the custom attribute if i run: gam update user <email> schoolInfo.role Faculty

any ideas?  the schema i'm trying to update:

Schema: schoolInfo
    schemaId: B9aoWpuBR7aF4nMNoXgKqA==
    displayName: School Information
    Field: id
      fieldId: pbJjTLe9SNqRhuWWYVC0Eg==
      fieldType: INT64
      displayName: ID
      multiValued: False
      readAccessType: ADMINS_AND_SELF
    Field: role
      fieldId: 3xxjTneTQA2UeEiJ7JYjIQ==
      fieldType: STRING
      displayName: Role
      multiValued: False
      readAccessType: ADMINS_AND_SELF
    Field: division
      fieldId: 3tsVoxu-RQuO4PHNlp8tAg==
      fieldType: STRING
      displayName: Division
      multiValued: False
      readAccessType: ADMINS_AND_SELF
    Field: gradYear
      fieldId: hYmGQpGwR9ykTgCDi0cLWA==
      fieldType: INT64
      displayName: Grad Year
      multiValued: False
      readAccessType: ADMINS_AND_SELF

thanks! jonathan

Ross Scroggs

unread,
Jul 15, 2021, 2:03:01 PM7/15/21
to google-ap...@googlegroups.com
Jonathan,

You're missing the primary keyword to end the address entry.

gam update user <email> address type work unstructured "School Address" primary schoolInfo.role Faculty

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/329b05d6-42aa-4890-9709-baf39889f8fdn%40googlegroups.com.


--

Jonathan Haff

unread,
Jul 15, 2021, 2:07:02 PM7/15/21
to GAM for Google Workspace
ahh, brilliant, thanks for the quick response!

Seth Dimbert (Hillel Yeshiva)

unread,
Aug 22, 2021, 12:40:00 PM8/22/21
to GAM for Google Workspace
Ross, I think I have a similar issue. I'm trying to add a value to the custom field ZoomGroup and I'm getting a syntax error:

gam csv gsheet sdimbert id <sheetID> zoomgroup gam update user ~primaryEmail  ZoomGroup ~ZoomGroup

What am I overlooking?

-SD

Ross Scroggs

unread,
Aug 22, 2021, 1:02:05 PM8/22/21
to google-ap...@googlegroups.com
Seth,

You need schemaname.fieldname. e.g., shhoolInfo.gradYear
do: gam show schemas

Seth Dimbert (Hillel Yeshiva)

unread,
Aug 22, 2021, 1:45:46 PM8/22/21
to GAM for Google Workspace
Yep... I figured it out just a few minutes ago. I need Employee_Information.zoomgroup.

Thanks, Ross!

-SD

Reply all
Reply to author
Forward
0 new messages