Setting users new alias as default

938 views
Skip to first unread message

IT SUPPORT

unread,
Aug 29, 2022, 6:49:46 PM8/29/22
to GAM for Google Workspace
I am really stugglig with this - I have managed to provision, delete accounts, create aliases for users which would be preferred over usernames as the send as.

eg instead of user...@domain.com
I want users sendas to show as 1stiniti...@domain.com

ive worked all that out but cant get it to default.

when I run;   I get a ERROR: 404: Requested entity was not found. - notFound

one thing I also notice is that the google admin console is showing the new alias, but in the users account it is not.

Any ideas?  thanks


PS H:\> c:\gam\gam.exe user test202208-1 update sendas tus...@domain.org.uk default
c:\gam\gam.exe :
At line:1 char:1
+ c:\gam\gam.exe user test202208-1 update sendas tus...@domain.org.uk defa ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
ERROR: 404: Requested entity was not found. - notFound
Allowing test20...@domain.org.uk to send as tus...@domain.org.uk (1/1)

Kim Nilsson

unread,
Aug 30, 2022, 9:17:35 AM8/30/22
to GAM for Google Workspace
Remember that you may need to insert a delay between running commands that rely on previous commands to finish, and the API to recognise the new values.
Sometimes (rarely) the APIs are slower than the admin GUI (most of the time, it's the other way around).

Ross Scroggs

unread,
Aug 30, 2022, 10:20:21 AM8/30/22
to google-ap...@googlegroups.com
Do:
gam user test202208-1 show sendas

Is tus...@domain.org.uk on the list; if not, you can't update it, you must add it.
Syntax:
gam <UserTypeEntity> [create|add] sendas <EmailAddress> <Name> [signature|sig <String>|(file <FileName> [charset <Charset>]) (replace <Tag> <String>)*] [html] [replyto <EmailAddress>] [default] [treatasalias <Boolean>]
        [smtpmsa.host <SMTPHostName> smtpmsa.port 25|465|587 smtpmsa.username <UserName> smtpmsa.password <Password> [smtpmsa.securitymode none|ssl|starttls]]

gam user test202208-1 add sendas tus...@domain.org.uk "Put desired display name here, e.g., Test User1" default

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/433ebd8a-30ca-4ba6-8620-05d3764ee655n%40googlegroups.com.

Alan Charlton

unread,
Sep 26, 2022, 11:28:24 PM9/26/22
to GAM for Google Workspace
Similar situation for me, resolved a bit differently than Ross' suggestion... that second command didn't work for me. What did work was breaking it up.

1) Ensure alias is added (in my case a domain alias was used, so test...@domain.com is the primary user, and test...@testdomainalias.com is the alias)

2) Add the sendas address:

gam user test.alan sendas test...@testdomainalias.com "Test Alan" treatasalias 1

3) Then perform another command to change it to be the default

gam user test.alan update sendas test...@testdomainalias.com default

I got errors trying it any other way.

This might be a bit late for OP, but maybe it'll help the next person who searches for a solution.
Reply all
Reply to author
Forward
0 new messages