"Error: 400: sendAsEmail is not a valid"...Address *is* Valid

786 views
Skip to first unread message

Phatmandrake

unread,
Jun 28, 2017, 11:29:00 AM6/28/17
to GAM for G Suite


gam user Rick.Sanchez sendas Morty.Smith@organicPlumbus.com "Morthy Smith"

ERROR: 400: sendAsEmail is not a valid user or group - invalidArgument


The "OrganicPlumbus.com" is Secondary Domain. So far I've seen conflicting behaviors.

I've been able to assign a Secondary Domain as an alias without problem in previous attempts, but this is the first inexplicable failure. I have managed to create an alias through after manually creating a Secondary email address for the user in gmail and then removing it, but I have not been able to replicate the behavior. It appears this was a one off instance of luck.

I'm uncertain if the information being passed to the API by GAM is being malformed or if it's a problem with the API itself. I've seen one other post from the 13th describing a similar issue, but mine is slightly different so I created a separate topic.

https://groups.google.com/forum/#!topic/google-apps-manager/r6jMuaUIp8Y

✉ Kevin Melillo

unread,
Jun 28, 2017, 1:21:50 PM6/28/17
to google-ap...@googlegroups.com
Quick question:  Does Morty...@organicplumbus.com exist in your current environment as a user, group, or alias?

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/e2093663-bf24-46c5-acba-3ec567a8e9fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Kevin Melillo
Electronic Communications Analyst
Information Technology
445 Hoes Lane
Piscataway, NJ 08854

Phone:732-465-6609 | Mobile: 732-609-4331

Phatmandrake

unread,
Jun 28, 2017, 5:24:36 PM6/28/17
to GAM for G Suite
Morty...@organicplumbus.com doesn't exist as anything. It's intended to be a sendas address that I want to assign to rick.s...@ricklabs.com. However the aformentioned command errors even though @organicplumbus and and @ricklabs are valid domains on my gsuite account. It should ultimately end up being an alias, but it doesn't exist because I can't create it through GAM (I can through GSuite though).



On Wednesday, June 28, 2017 at 12:21:50 PM UTC-5, k.melillo wrote:
Quick question:  Does Morty...@organicplumbus.com exist in your current environment as a user, group, or alias?
On Wed, Jun 28, 2017 at 11:18 AM, Phatmandrake <phat...@gmail.com> wrote:


gam user Rick.Sanchez sendas Morty.Smith@organicPlumbus.com "Morthy Smith"

ERROR: 400: sendAsEmail is not a valid user or group - invalidArgument


The "OrganicPlumbus.com" is Secondary Domain. So far I've seen conflicting behaviors.

I've been able to assign a Secondary Domain as an alias without problem in previous attempts, but this is the first inexplicable failure. I have managed to create an alias through after manually creating a Secondary email address for the user in gmail and then removing it, but I have not been able to replicate the behavior. It appears this was a one off instance of luck.

I'm uncertain if the information being passed to the API by GAM is being malformed or if it's a problem with the API itself. I've seen one other post from the 13th describing a similar issue, but mine is slightly different so I created a separate topic.

https://groups.google.com/forum/#!topic/google-apps-manager/r6jMuaUIp8Y

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.

+KimNilsson

unread,
Jun 29, 2017, 4:13:27 AM6/29/17
to GAM for G Suite, Ross Scroggs
Reading Brandon's thread, it's quite clear that Ross didn't answer your question, since you have problems adding a sendas from your own domain.

I just tried with Ross' GAMADV-X and I could add an internal address, as you are trying to do, but not an external address.
The error message I got from GAMADV-X was:

Add Failed: Custom from requires smtpMsa configuration

Trying with regular GAM v4.23 I got this:

$ gam user m...@domain.user sendas m...@external.user "Kim External"
Allowing m...@domain.user se to send as m...@external.user (1/1)

ERROR: 400: Custom from requires smtpMsa configuration - invalidArgument

So, it fails, but not with the same error as you got. But, at least my two error messages are the same.

Graham Ingleby

unread,
Jun 29, 2017, 6:36:48 AM6/29/17
to GAM group
I think you need to add the alias before you can set the account to SendAs the alias, so the original error is correct as you need an existing address to add as a SendAs and the address you are trying to add doesnt exist yet and so is not valid - if you see what I mean

 



This message is for the named person's use only. If you receive this message in error, please delete it and notify the sender. Ancoris reserves the right to monitor all e-mail communications through its networks. Ancoris Limited, Registered in England Number: 04830784, Registered address: 5a Frascati Way, Maidenhead, Berkshire SL6 4UY. Trading Address: Lily Hill House, Lily Hill Road, Bracknell, Berkshire RG12 2SJ




Kim Nilsson

unread,
Jun 29, 2017, 7:01:09 AM6/29/17
to Google Apps Manager
Ah, that could be it. 
What's the syntax for adding an alias? 
Run that first, and then the sendas-command. 

k.melillo

unread,
Jun 29, 2017, 1:11:20 PM6/29/17
to GAM for G Suite
Google has recently taken steps to limit what email addresses forwards can be set to via the API (and thus via GAM). See this blog post for details about what domains you can set forwards to. Generally you are limited to forwarding to your primary domain, alias and secondary domains and subdomains of those.

So in other words, if it does not exist in your domain, you can not do it through GAM.  You can do it through the user interface though, as it will require authorization by the external email address.

Kim Nilsson

unread,
Jun 30, 2017, 2:55:15 AM6/30/17
to Google Apps Manager
hehe, not so "recently", @k.melillo. Seven years ago.

✉ Kevin Melillo

unread,
Jun 30, 2017, 7:54:10 AM6/30/17
to google-ap...@googlegroups.com
Ha!  Yep, it has been awhile...  but the GAM documentation does not show this! 

On Fri, Jun 30, 2017 at 2:55 AM, Kim Nilsson <there.is.no...@gmail.com> wrote:
hehe, not so "recently", @k.melillo. Seven years ago.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Phatmandrake

unread,
Jul 3, 2017, 7:46:04 AM7/3/17
to GAM for G Suite
Thankfully these conditions are already satisfied for my case.

Phatmandrake

unread,
Jul 3, 2017, 8:00:34 AM7/3/17
to GAM for G Suite
This makes sense so much sense it hurts. So many of our users already had been given secondary (alias) Email addresses from the admin side, but didn't necessarily have it set-up from the user side that I thought they were handled by the same command.

In case anyone else runs into the same issue:

1st: https://github.com/jay0lee/GAM/wiki/GAM3DirectoryCommands#email-aliases
2nd: https://github.com/jay0lee/GAM/wiki/ExamplesEmailSettings#add-a-send-as-address-custom-from

I feel silly.

Ian Crew

unread,
Jul 3, 2017, 8:58:06 AM7/3/17
to 'Jordan Tinsley' via GAM for G Suite
Hi k.melillo:

Actually, that post regarding email forwarding was superseded by the one at https://gsuiteupdates.googleblog.com/2016/07/gmail-api-new-endpoints-for-settings.html about a year ago.  It is now possible to set forwarding to external addresses.  The only “gotcha” is that if you set a forward to an external address, the external address gets a confirmation email and the forwarding doesn’t start working until they accept.  (It’s considered to be in a “pending” state until that confirmation happens.)

As GAM has been updated to work with the new Gmail API, I presume that it is indeed possible to set external forwards with GAM, and it’s just the documentation that’s out of date, but I have to admit I haven’t tried it myself.

If anyone does try it, I’ll also point out that the GAM documentation is a publicly-editable wiki, and depends on all of us to fix it if we find a mistake.

Cheers,

Ian
 
-- 
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.

✉ Kevin Melillo

unread,
Jul 3, 2017, 9:31:58 AM7/3/17
to google-ap...@googlegroups.com
Ah.  So since an approval is needed, it can be initiated by the admin, but some of the work-flow would be on the end user. 

I just tried this, and it does work.  An email is sent to the external address, with a link to click for approval.  Once you click the link, it is set as a valid forwarding address, but is still disabled.  The user will then have to go in, and activate it, via settings, or the admin will have to perform another command

gam user<internal email address> forward on <external verified address> keep|archive|delete|markread

A very tedious and multi-step process, but it does work.

On Mon, Jul 3, 2017 at 8:57 AM, Ian Crew <ic...@berkeley.edu> wrote:
Hi k.melillo:

Actually, that post regarding email forwarding was superseded by the one at https://gsuiteupdates.googleblog.com/2016/07/gmail-api-new-endpoints-for-settings.html about a year ago.  It is now possible to set forwarding to external addresses.  The only “gotcha” is that if you set a forward to an external address, the external address gets a confirmation email and the forwarding doesn’t start working until they accept.  (It’s considered to be in a “pending” state until that confirmation happens.)

As GAM has been updated to work with the new Gmail API, I presume that it is indeed possible to set external forwards with GAM, and it’s just the documentation that’s out of date, but I have to admit I haven’t tried it myself.

If anyone does try it, I’ll also point out that the GAM documentation is a publicly-editable wiki, and depends on all of us to fix it if we find a mistake.

Cheers,

Ian
On Jun 29, 2017, at 10:11 AM, k.melillo <k.me...@ieee.org> wrote:

Google has recently taken steps to limit what email addresses forwards can be set to via the API (and thus via GAM). See this blog post for details about what domains you can set forwards to. Generally you are limited to forwarding to your primary domain, alias and secondary domains and subdomains of those.

So in other words, if it does not exist in your domain, you can not do it through GAM.  You can do it through the user interface though, as it will require authorization by the external email address.

On Wednesday, June 28, 2017 at 11:29:00 AM UTC-4, Phatmandrake wrote:


gam user Rick.Sanchez sendas Morty.Smith@organicPlumbus.com "Morthy Smith"

ERROR: 400: sendAsEmail is not a valid user or group - invalidArgument


The "OrganicPlumbus.com" is Secondary Domain. So far I've seen conflicting behaviors.

I've been able to assign a Secondary Domain as an alias without problem in previous attempts, but this is the first inexplicable failure. I have managed to create an alias through after manually creating a Secondary email address for the user in gmail and then removing it, but I have not been able to replicate the behavior. It appears this was a one off instance of luck.

I'm uncertain if the information being passed to the API by GAM is being malformed or if it's a problem with the API itself. I've seen one other post from the 13th describing a similar issue, but mine is slightly different so I created a separate topic.

https://groups.google.com/forum/#!topic/google-apps-manager/r6jMuaUIp8Y

-- 
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

+KimNilsson

unread,
Jul 3, 2017, 11:51:02 AM7/3/17
to GAM for G Suite
But, I do not want to forward any emails anywhere.

Keith Coffaro

unread,
Jan 23, 2018, 12:50:32 PM1/23/18
to GAM for G Suite
Was there any update to this?

We're migrating an acquired company (and domain) and the acquired domain was added as an additional domain.  I'm trying to add the @xyz.com alias domain as default SENDAS for the users but am getting the same error as mentioned in this thread:

c:\gam user first...@abc.com sendas FL...@xyz.com "First Last" replyto FL...@xyz.com default

ERROR: 400: Custom from requires smtpMsa configuration - invalidArgument

Last year, I was able to issue this command en masse without any authorizations needed by the end users.

Any help would be appreciated.

using GAM 4.32

+KimNilsson

unread,
Jan 24, 2018, 7:01:08 AM1/24/18
to GAM for G Suite
Have you added the sendAs address as an alias to each user first?
I don't think you can set sendAs without doing that step first.

Keith Coffaro

unread,
Jan 24, 2018, 12:11:33 PM1/24/18
to GAM for G Suite
Kim,
Thank you so much.
That was it.  I feel dumb.

Keith

Phatmandrake

unread,
Jan 24, 2018, 2:55:03 PM1/24/18
to GAM for G Suite
#Learning 😋
Reply all
Reply to author
Forward
0 new messages