GAM Command to Update Immutable ID Custom Field

77 views
Skip to first unread message

Adam Walker

unread,
Jun 9, 2025, 3:08:43 PM6/9/25
to GAM for Google Workspace

I have been working with chatgpt and gemini to export the immutableid field from Azure into a csv file and then to import it into into a custom field under Local Information called ImmutableID. So far I (we) have been unsuccessful even updating the immutableID field using GAM or GAM-ADV. Currently, I have gamadv installed. Below is the relevant information Gemini put together of things we have tried. Can someone please help me figure out my issue?


Hello GAM Team and community,

I am experiencing a very persistent "ERROR: Invalid argument" when trying to update a custom user schema field using gam.exe update user schemas. This occurs specifically at the schemas keyword. What's puzzling is that print commands for the same custom schema are working perfectly fine, so the schema is recognized and accessible.

Here are the details of my environment and troubleshooting steps:

1. GAMADV-XTD3 Version:

GAMADV-XTD3 7.05.08 - https://github.com/taers232c/GAMADV-XTD3 - pyinstaller Ross Scroggs <ross.s...@gmail.com> Python 3.13.2 64-bit final Windows 10 10.0.19045 SP0 Multiprocessor Free AMD64 Path: C:\gamadv Config File: C:\Users\staff\.gam\gam.cfg, Section: DEFAULT, customer_id: C0xxxxxxxxxxxxxxxxx, domain: example.com Time: [YOUR CURRENT TIME HERE]

2. Operating System: Windows 10

3. Configuration Status:

  • .\gam.exe info user me works correctly and outputs my user information.
  • My gam.cfg file (located at C:\Users\staff\.gam\gam.cfg) has the following relevant content in the [DEFAULT] section:
    Ini, TOML
    customer_id = C0xxxxxxxxxxxxxxxxx domain = example.com
  • The oauth2.txt file is also present in C:\Users\staff\.gam\.

4. Custom Schema Information (from print schemas): The custom schema I'm working with is Local_Information, and the field is ImmutableID. print schemas confirms these exact names:

baEvgP6fTMCqUUNb0kMAuA==,Local_Information,Local Information,3,LocalEmployeeType,0tJ2jOZBTxiYTCa0tbt-pg==,LocalEmployeeType,STRING,False,ADMINS_AND_SELF,LocalID,e_b-rcxTTD6ObQFX-xCHBQ==,LocalID,INT64,False,ADMINS_AND_SELF,ImmutableID,jg6QIxxZQeq9VtiCGmd-WQ==,ImmutableID,STRING,False,ADMINS_AND_SELF spT0tXXAQOCcG-GbfocW0g==,ssoEmailAddress,ssoEmailAddress,1,ssoEmailAddress,se1JKDkdQbWIuo8q05YsKA==,ssoEmailAddress,STRING,False,ALL_DOMAIN_USERS,,,,,,,,,,,, xLJ07NDvQpOok-fLLuRdMw== Priv,1,Role,wHyQ7TgEQGyrlHLfgfDjuw==,Role,STRING,False,ADMINS_AND_SELF,,,,,,,,,,,,

5. Successful Custom Schema Read/Print Operations: GAMADV-XTD3 can successfully read data from the custom schema. I manually set the ImmutableID field to "1234" in the Google Workspace Admin Console, and the following command correctly retrieved it:

PS C:\gamadv> .\gam.exe print users query stud...@example.com customschemas Local_Information Getting all Users that match query (query="stud...@example.com"), may take some time on a large Google Workspace Account... Got 1 User: stud...@example.com - stud...@example.com primaryEmail,customSchemas.Local_Information.ImmutableID stud...@example.com,1234

6. Failing Custom Schema Update Operation: Despite the successful read operation, the update command continuously fails with "Invalid argument" at the schemas keyword. I have tried multiple variations:

  • Attempt 1 (no quotes on schema name):

    PowerShell
    PS C:\gamadv> .\gam.exe update user stud...@example.com schemas Local_Information ImmutableID "student08immid" Command: C:\gamadv\gam.exe update user stud...@example.com >>>schemas<<< Local_Information ImmutableID student08immid ERROR: Invalid argument Help: Syntax in file C:\gamadv\GamCommands.txt Help: Documentation is at https://github.com/taers232c/GAMADV-XTD3/wiki
  • Attempt 2 (with quotes on schema name):

    PowerShell
    PS C:\gamadv> .\gam.exe update user stud...@example.com schemas "Local_Information" ImmutableID "student08immid" Command: C:\gamadv\gam.exe update user stud...@example.com >>>schemas<<< Local_Information ImmutableID student08immid ERROR: Invalid argument Help: Syntax in file C:\gamadv\GamCommands.txt Help: Documentation is at https://github.com/taers232c/GAMADV-XTD3/wiki

7. Troubleshooting Steps Already Taken:

  • Confirmed GAMADV-XTD3 installation and authentication.
  • Verified gam.cfg content (customer_id and domain).
  • Confimed correct schema (Local_Information) and field (ImmutableID) names via print schemas.
  • Confirmed print users customschemas works correctly, showing data for existing fields and primaryEmail for blank fields.
  • Attempted update commands with and without quotes around the schema name.
  • Attempted print users pfc and print users fields Schema.Field (both failed with "Invalid argument/choice").

It seems the issue is specific to the schemas keyword within the update command, despite its apparent correctness. Any insights or alternative syntax suggestions would be greatly appreciated.

Thank you in advance for your help!

Ross Scroggs

unread,
Jun 9, 2025, 3:38:29 PM6/9/25
to google-ap...@googlegroups.com
You want:
.\gam.exe update user stud...@example.com Local_Information.ImmutableID "student08immid"


Ross
----
Ross Scroggs



--
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 visit https://groups.google.com/d/msgid/google-apps-manager/7d93b4b6-2b8c-4064-879c-a8ac539160d1n%40googlegroups.com.

Adam Walker

unread,
Jun 9, 2025, 4:37:41 PM6/9/25
to GAM for Google Workspace
That worked perfect, thank you! I actually started with Gam7 and moved to gamadv trying to get it to work. I'll switch back to gam7. If I do, is the command the same?

Ross Scroggs

unread,
Jun 9, 2025, 4:40:15 PM6/9/25
to google-ap...@googlegroups.com
Yes. GAM7 is GAMADV-XTD3 rebranded.

Ross

----
Ross Scroggs



Reply all
Reply to author
Forward
0 new messages