Gam Create user (Especifying Employee ID and alternate email address)

611 views
Skip to first unread message

Cesar G

unread,
May 31, 2022, 5:46:47 AM5/31/22
to GAM for Google Workspace
Hi!,

I'm trying to create a user by Gam, but I can't specify the employee id or the alternative email address

I tried this command: gam csv "path to csv file" gam create user ~PrimaryEmail firstname ~FirstName lastname ~LastName password ~Password email.adress ~email.1.adress ExternalId ~externalId.0.value org ~OrgUnit changepassword on

But it gives me error 400: invalid input (externalid, emailadress)

I can't find the correct input to specify the employee id and alternate email address when creating a new user.

Can you help me?

Thanks in advance.




Keith Burtt

unread,
May 31, 2022, 7:25:43 AM5/31/22
to GAM for Google Workspace
Hi just a quick observation try externalid instead of ExternalId I know this seems daft but I have found that Caps sometimes matter. also email.adress is wrong it can be recoveryemail unless you are trying to create an alias and then its alias. I am not 100% sure but give it a go. On a side not I always run the command to create a single user before doing it with csv to check command works and then if it doesn't is an error in what the csv is passing over.  

Ross Scroggs

unread,
May 31, 2022, 10:53:59 AM5/31/22
to google-ap...@googlegroups.com
Cesar,

The command syntax is not correct, see: https://github.com/taers232c/GAMADV-XTD3/wiki/Users#definitions and scroll down to <UserMultiAttribute>
You left out the type value after otheremail and external.
<UserMultiAttribute> ::=
        (otheremail home|other|work|<String> <String>)|
        (externalid account|customer|login_id|network|organization|<String> <String>)|

 

You want something like this, you'll have to verify the column headers.
 gam csv "path to csv file" gam create user ~PrimaryEmail firstname ~FirstName lastname ~LastName password ~Password othermail work ~email.adress externalid organization ~externalId.0.value org ~OrgUnit changepassword on

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/846eb46a-eb79-49d8-b2ac-f6bb193443d9n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages