Set custom attribute to display name.

202 views
Skip to first unread message

Ryan Buffa

unread,
Sep 20, 2024, 10:03:08 AM9/20/24
to GAM for Google Workspace
Is there a gam command I can use that will set the display name of a user in a custom field.

Something like 
gam update user us...@domain.com Acquisition_Information.Full_Name {displayName}

This command obviously sets the full name attribute to "{displayName}"

I am connecting to a saml application and the App does not support first name and last name. Google doesn't let you select displayName in the attribute mapping. 

The only option is to use a custom attribute. I would like to be able to populate the custom attribute based on the current display name of the user and possibly script it to automatically run. 

Ross Scroggs

unread,
Sep 20, 2024, 11:06:33 AM9/20/24
to google-ap...@googlegroups.com
Ryan,

# Get user names
gam redirect csv ./UserNames.csv print users field name
# Use display name if defined
gam config csv_input_row_filter "name.displayName:regex:^.+$" csv UserNames.csv gam update user "~primaryEmail" Acquisition_Information.Full_Name "~name.displayName"
# Use full name if display name not defined
gam config csv_input_row_drop_filter "name.displayName:regex:^$" csv UserNames.csv gam update user "~primaryEmail" Acquisition_Information.Full_Name "~name.fullName"

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/47488270-31fd-43c1-a922-6b1ddf8f47ban%40googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages