Adding recently deleted user to an email list gives the user suspended error.

19 views
Skip to first unread message

David McMurray

unread,
Nov 15, 2011, 10:40:04 AM11/15/11
to Google Apps Domain Information and Management APIs
Hi,

This may or may not be intentional, so I'm just trying to find out
what the outcome should be. Also this is related to the old email
lists which are now deprecated but I would be grateful if anyone can
clarify if this works differently for the email groups...

In instances where we try to create an email account that has been
deleted within the last 5 days, we get the UserDeletedRecently (1100)
error, which is what we would expect.

However when trying to add this user to an email list using the
deprecated method "addRecipientToEmailList", I get the UserSuspended
(1101) error.

Now I know we shouldn't even be trying to add deleted user accounts to
groups/lists in the first place, but due to the way our system works
we'll need to continue doing this for the time being. But...

My first question is: Is this the result I should expect?

My second question is: Does using the new "addMemberToGroup" method
yield the same result when used on a user account that was deleted
within the last 5? Of course I'll find out when we move to using
"addMemberToGroup" instead of "addRecipientToEmailList", but if the
new method yields a more appropriate error then it might be a good
excuse to move to the group methods sooner.

It's not a huge issue, because we get the UserSuspended error and
that's enough to inform our system that it was unsuccessful. Once the
5 days have passed since the user account was deleted then it gets
created again ok and then gets added to the email list without any
problem.

Regards,
David.

Jay Lee

unread,
Nov 15, 2011, 1:10:35 PM11/15/11
to google-app...@googlegroups.com
Hi David,

  The UserSuspended error instead of a UserDeletedRecently error is strange, a Googler would need to speak to that. FYI, I test using the Provisioning API Group calls (vs. deprecated list calls) and I get the same UserSuspended error:

C:\google-apps-manager>\Python27\python.exe gam.py delete user us...@example.org norename
Deleting account for user8
/user8 HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: apps-apis.google.com\r\nCo
ntent-Type: application/atom+xml\r\nAuthorization: OAuth realm="", oauth_nonce="
xxxx", oauth_timestamp="1321374343", oauth_consumer_key="xxxx.apps.g
oogleusercontent.com", oauth_signature_method="HMAC-SHA1", oauth_version="1.0",
oauth_token="xxxx", oauth_signature="
xxxxx"\r\nUser-Agent: Google Apps Manager 2.0 / jay
0l...@gmail.com (Jay Lee) / Python 2.7.2 final / Windows-7-6.1.7601-SP1 AMD64 / G
Data-Python 2.0.14+20110902+custom_mods\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: GData-Version: 1.0
header: Date: Tue, 15 Nov 2011 16:26:00 GMT
header: Expires: Tue, 15 Nov 2011 16:26:00 GMT
header: Cache-Control: private, max-age=0
header: X-Content-Type-Options: nosniff
header: X-Frame-Options: SAMEORIGIN
header: X-XSS-Protection: 1; mode=block
header: Content-Length: 0
header: Server: GSE
header: Content-Type: text/html
Deleted user user8

C:\google-apps-manager>\Python27\python.exe gam.py update group te...@example.org add member us...@example.org
te...@example.org/member HTTP/1.1\r\nAccept-Encoding: identity\r\nHost:
apps-apis.google.com\r\nContent-Length: 217\r\nContent-Type: application/atom+xm
l\r\nAuthorization: OAuth realm="", oauth_nonce="xxxxx", oauth_timestamp="xxxxxx", oauth_consumer_key="xxxxxx.apps.googleusercontent.com", oauth_si
gnature_method="HMAC-SHA1", oauth_version="1.0", oauth_token="xxxx
xxxx", oauth_signature="0qVhiDOyhr3TYpOXyncd9fvY2so%3D"
\r\nUser-Agent: Google Apps Manager 2.0 / jay...@gmail.com (Jay Lee) / Python 2
.7.2 final / Windows-7-6.1.7601-SP1 AMD64 / GData-Python 2.0.14+20110902+custom_
mods\r\n\r\n'
send: '<?xml version=\'1.0\' encoding=\'UTF-8\'?>\n<ns0:entry xmlns:ns0="http://
rty name="memberId" value="us...@example.org" /></ns0:entry>'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Content-Type: text/xml
header: Date: Tue, 15 Nov 2011 16:27:57 GMT
header: Expires: Tue, 15 Nov 2011 16:27:57 GMT
header: Cache-Control: private, max-age=0
header: X-Content-Type-Options: nosniff
header: X-Frame-Options: SAMEORIGIN
header: X-XSS-Protection: 1; mode=block
header: Server: GSE
header: Transfer-Encoding: chunked
Traceback (most recent call last):
  File "gam.py", line 2962, in <module>
    doUpdateGroup()
  File "gam.py", line 1245, in doUpdateGroup
    result = groupObj.AddMemberToGroup(email, group)
  File "C:\google-apps-manager\gdata\apps\groups\service.py", line 219, in AddMe
mberToGroup
    return self._PostProperties(uri, properties)
  File "C:\google-apps-manager\gdata\apps\service.py", line 532, in _PostPropert
ies
    raise gdata.apps.service.AppsForYourDomainException(e.args[0])
gdata.apps.service.AppsForYourDomainException: {'status': 400, 'body': '<?xml ve
rsion="1.0" encoding="UTF-8"?>\r\n<AppsForYourDomainErrors>\r\n  <error errorCod
e="1101" invalidInput="" reason="UserSuspended" />\r\n</AppsForYourDomainErrors>
\r\n\r\n', 'reason': 'Bad Request'}

Jay Lee

unread,
Nov 16, 2011, 8:02:00 AM11/16/11
to google-app...@googlegroups.com

Even stranger, the Audit Report shows success (this is the same domain):




Shraddha Gupta

unread,
Nov 17, 2011, 1:33:57 AM11/17/11
to google-app...@googlegroups.com
Hello David,

We are investigating the issue. I will get back to you as soon as we get any updates

Thanks,
Shraddha Gupta
Developer Programs Engineer
Hyderabad, Google India.



On Wed, Nov 16, 2011 at 6:32 PM, Jay Lee <jay...@gmail.com> wrote:

Even stranger, the Audit Report shows success (this is the same domain):




--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/wUYWRmZul_QJ.

To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.

David McMurray

unread,
Nov 17, 2011, 9:48:32 AM11/17/11
to Google Apps Domain Information and Management APIs
Thank you for giving it a test with AddMemberToGroup Jay, much
appreciated.

On Nov 15, 6:10 pm, Jay Lee <jay0...@gmail.com> wrote:
> Hi David,
>
>   The UserSuspended error instead of a UserDeletedRecently error is
> strange, a Googler would need to speak to that. FYI, I test using the
> Provisioning API Group calls (vs. deprecated list calls) and I get the same
> UserSuspended error:
>
> C:\google-apps-manager>\Python27\python.exe gam.py delete user
> us...@example.org norename
> Deleting account for user8
> send: '*DELETEhttps://apps-apis.google.com/a/feeds/example.org/user/2.0*
> */user8* HTTP/1.1\r\nAccept-Encoding: identity\r\nHost:
> apps-apis.google.com\r\nCo
> ntent-Type: application/atom+xml\r\nAuthorization: OAuth realm="",
> oauth_nonce="
> xxxx", oauth_timestamp="1321374343", oauth_consumer_key="xxxx.apps.g
> oogleusercontent.com", oauth_signature_method="HMAC-SHA1",
> oauth_version="1.0",
> oauth_token="xxxx", oauth_signature="
> xxxxx"\r\nUser-Agent: Google Apps Manager 2.0 / jay
> 0...@gmail.com (Jay Lee) / Python 2.7.2 final / Windows-7-6.1.7601-SP1
> AMD64 / G
> Data-Python 2.0.14+20110902+custom_mods\r\n\r\n'
> reply: 'HTTP/1.1 200 OK\r\n'
> header: GData-Version: 1.0
> header: Date: Tue, 15 Nov 2011 16:26:00 GMT
> header: Expires: Tue, 15 Nov 2011 16:26:00 GMT
> header: Cache-Control: private, max-age=0
> header: X-Content-Type-Options: nosniff
> header: X-Frame-Options: SAMEORIGIN
> header: X-XSS-Protection: 1; mode=block
> header: Content-Length: 0
> header: Server: GSE
> header: Content-Type: text/html
> Deleted user user8
>
> C:\google-apps-manager>\Python27\python.exe gam.py update group
> t...@example.org add member us...@example.org
> send: '*POSThttps://apps-apis.google.com/a/feeds/group/2.0/example.org/*
> *t...@example.org/member* HTTP/1.1\r\nAccept-Encoding: identity\r\nHost:
> apps-apis.google.com\r\nContent-Length: 217\r\nContent-Type:
> application/atom+xm
> l\r\nAuthorization: OAuth realm="", oauth_nonce="xxxxx",
> oauth_timestamp="xxxxxx",
> oauth_consumer_key="xxxxxx.apps.googleusercontent.com", oauth_si
> gnature_method="HMAC-SHA1", oauth_version="1.0", oauth_token="xxxx
> xxxx", oauth_signature="0qVhiDOyhr3TYpOXyncd9fvY2so%3D"
> \r\nUser-Agent: Google Apps Manager 2.0 / jay0...@gmail.com (Jay Lee) /
> Python 2
> .7.2 final / Windows-7-6.1.7601-SP1 AMD64 / GData-Python
> 2.0.14+20110902+custom_
> mods\r\n\r\n'
> send: '<?xml version=\'1.0\' encoding=\'UTF-8\'?>\n<ns0:entry
> xmlns:ns0="http://www.w3.org/2005/Atom"
> xmlns:ns1="http://schemas.google.com/apps/2006"><ns1:prope
> rty name="memberId" value="us...@example.org" /></ns0:entry>'
> reply: 'HTTP/1.1 400 Bad Request\r\n'
> header: Content-Type: text/xml
> header: Date: Tue, 15 Nov 2011 16:27:57 GMT
> header: Expires: Tue, 15 Nov 2011 16:27:57 GMT
> header: Cache-Control: private, max-age=0
> header: X-Content-Type-Options: nosniff
> header: X-Frame-Options: SAMEORIGIN
> header: X-XSS-Protection: 1; mode=block
> header: Server: GSE
> header: Transfer-Encoding: chunked
> Traceback (most recent call last):
>   File "gam.py", line 2962, in <module>
>     doUpdateGroup()
>   File "gam.py", line 1245, in doUpdateGroup
>     result = groupObj.*AddMemberToGroup*(email, group)
>   File "C:\google-apps-manager\gdata\apps\groups\service.py", line 219, in
> AddMe
> mberToGroup
>     return self._PostProperties(uri, properties)
>   File "C:\google-apps-manager\gdata\apps\service.py", line 532, in
> _PostPropert
> ies
>     raise gdata.apps.service.AppsForYourDomainException(e.args[0])
> gdata.apps.service.AppsForYourDomainException: {'status': 400, 'body':
> '<?xml ve
> rsion="1.0" encoding="UTF-8"?>\r\n<AppsForYourDomainErrors>\r\n  <error
> errorCod
> e="1101" invalidInput="" reason="*UserSuspended*"
Reply all
Reply to author
Forward
0 new messages