Closed mcipriani-de closed 2 months ago
If you have a template user you can do the following:
gam redirect stdout ./template.json info user templateuser@domain.com formatjson
gam create user newuser@domain.com json file ./template.json firstname New lastname User
The following fields are not copied:
USER_JSON_SKIP_FIELDS = ['agreedToTerms', 'aliases', 'creationTime', 'customerId', 'deletionTime', 'groups', 'id',
'isAdmin', 'isDelegatedAdmin', 'isEnforcedIn2Sv', 'isEnrolledIn2Sv', 'isMailboxSetup',
'lastLoginTime', 'licenses', 'primaryEmail', 'thumbnailPhotoEtag', 'thumbnailPhotoUrl']
I can look into copying the groups.
Hi, it would be nice to create a user with the ability to copy information and group memberships from an exsisting one. Like the "copyfrom" on group creation. E.g like this
gam create user <EmailAddress> copyfrom <EmailAddress>
Regards Michel