InternalError and errorCode=1002 - Unauthorized when trying to modify an user through the provisioning API

88 views
Skip to first unread message

fullofcaffeine

unread,
Jun 13, 2012, 2:01:22 PM6/13/12
to google-app...@googlegroups.com
Hello list,

I started to have some issues with the provisioning API this week. First, when I try to modify a user using it, I'm getting an errorCode=1002 message. Here's the full request/response:

2012-06-13_17:24:07.27324 opening connection to apps-apis.google.com...
2012-06-13_17:24:07.35556 opened
2012-06-13_17:24:07.41721 <- "POST /a/feeds/user/2.0/mydomain.com HTTP/1.1\r\nConnection: close\r\nContent-Type: application/atom+xml\r\nAuthorization: GoogleLogin auth=DQAAAOYAAAD11LW1rSFsXP-T2Mo5SGT0jcCKz3GDqWAKPURpSfkwNVkLgvqIghDfo2INw17R3ABt2U_taoPQDH0L7taLW5DDxIbsE_pn3v3R94IFpYwpgjyKjNRFT2UK90pyZRRfCcSF-BJdgnjX4O5DPSJh5BusIlJrO4njerki-jgS9Uy0v43QmcCtPNLyELV23alVTNQQyL07m-h7rahVlyzEoOEJDnXcowJY3rdO08oahOprTuagaMvfO7YtoDLRIhB4JCRzZOCvd_a4FYt0KPqHkfOUSPrrPJUVOdqT_G0eQCriwCoCv0XHmEzb4dQz2e3sxfHM\r\nContent-Length: 455\r\nHost: apps-apis.google.com\r\n\r\n"
2012-06-13_17:24:07.41748 <- "<atom:entry xmlns:atom='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'><apps:property name=\"password\" value=\"4c9bbd9645162a08d47e92d0e232ce6c6ecba37\"/><apps:property name=\"hashFunction\" value=\"SHA-1\"/><apps:property name=\"userEmail\" value=\"testem...@mydomain.com\"/><apps:property name=\"firstName\" value=\"Test\"/><apps:property name=\"lastName\" value=\"Employee2\"/><apps:property name=\"isAdmin\" value=\"false\"/></atom:entry>"
2012-06-13_17:24:07.73823 -> "HTTP/1.1 400 Bad Request\r\n"
2012-06-13_17:24:07.73835 -> "Content-Type: text/xml\r\n"
2012-06-13_17:24:07.73846 -> "Date: Wed, 13 Jun 2012 17:24:07 GMT\r\n"
2012-06-13_17:24:07.73854 -> "Expires: Wed, 13 Jun 2012 17:24:07 GMT\r\n"
2012-06-13_17:24:07.73862 -> "Cache-Control: private, max-age=0\r\n"
2012-06-13_17:24:07.73870 -> "X-Content-Type-Options: nosniff\r\n"
2012-06-13_17:24:07.73878 -> "X-Frame-Options: SAMEORIGIN\r\n"
2012-06-13_17:24:07.73886 -> "X-XSS-Protection: 1; mode=block\r\n"
2012-06-13_17:24:07.73893 -> "Server: GSE\r\n"
2012-06-13_17:24:07.73901 -> "Connection: close\r\n"
2012-06-13_17:24:07.73909 -> "\r\n"
2012-06-13_17:24:07.73926 reading all...
2012-06-13_17:24:07.73931 -> ""
2012-06-13_17:24:07.73974 -> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<AppsForYourDomainErrors>\r\n  <error errorCode=\"1200\" invalidInput=\"\" reason=\"DomainUserLimitExceeded\" />\r\n</AppsForYourDomainErrors>\r\n\r\n"
2012-06-13_17:24:07.74036 read 176 bytes
2012-06-13_17:24:07.74048 Conn close

I have no idea what that means. I also could not find the description of this error, and the link for the errorCode list in the documentation is broken (in appendix), so I couldn't get any additional details about it.

The other error happens when I try to fetch an user:

2012-06-13_17:24:06.14229 opening connection to apps-apis.google.com...
2012-06-13_17:24:06.22562 opened
2012-06-13_17:24:06.29144 <- "GET /a/feeds/user/2.0/mydomain.com/testem...@mydomain.com HTTP/1.1\r\nConnection: close\r\nContent-Type: application/atom+xml\r\nAuthorization: GoogleLogin auth=DQAAAOYAAAD11LW1rSFsXP-T2Mo5SGT0jcCKz3GDqWAKPURpSfkwNVkLgvqICDfo2INw17234ABt2U_taoPQDH0L7taLW5DDxIbsE_pn3v3R94IFpYwpgjyKjNRFT2UK90pyZRRfCcSF-BJdgnjX4O5DPSJh5BusIlJrO4njerki-jgS9Uy0v43QmcCtPNLyELV23alVTNQQyL07m-h7rahVlyzEoOEJDnXcowJY3rdO08oahOprTuagaMvfO7YtoDLRIhB4JCRzZOCvd_a4FYt0KPqHkfOUSPrrPJUVOdqT_G0eQCriwCoCv0XHmEzb4dQz2e3sxfHM\r\nHost: apps-apis.google.com\r\n\r\n"
2012-06-13_17:24:06.43928 -> "HTTP/1.1 500 Internal Server Error\r\n"
2012-06-13_17:24:06.43934 -> "Content-Type: text/html; charset=UTF-8\r\n"
2012-06-13_17:24:06.43936 -> "Date: Wed, 13 Jun 2012 17:24:06 GMT\r\n"
2012-06-13_17:24:06.43937 -> "Expires: Wed, 13 Jun 2012 17:24:06 GMT\r\n"
2012-06-13_17:24:06.43937 -> "Cache-Control: private, max-age=0\r\n"
2012-06-13_17:24:06.43938 -> "X-Content-Type-Options: nosniff\r\n"
2012-06-13_17:24:06.43939 -> "X-Frame-Options: SAMEORIGIN\r\n"
2012-06-13_17:24:06.43940 -> "X-XSS-Protection: 1; mode=block\r\n"
2012-06-13_17:24:06.43941 -> "Server: GSE\r\n"
2012-06-13_17:24:06.43942 -> "Connection: close\r\n"
2012-06-13_17:24:06.43943 -> "\r\n"
2012-06-13_17:24:06.43944 reading all...
2012-06-13_17:24:06.43945 -> ""
2012-06-13_17:24:06.43946 -> "Internal Error"
2012-06-13_17:24:06.43997 read 14 bytes
2012-06-13_17:24:06.44006 Conn close


It only says "Internal Error" and gives no useful information on why it happened whatsoever. Pretty hard to debug this way :(

Any insights on why those errors are happening would be greatly appreciated!

Thanks,

- Marcelo.

Jay Lee

unread,
Jun 14, 2012, 2:42:26 PM6/14/12
to google-app...@googlegroups.com
The 1st error means that you have no additional seats to for creating users in your Google Apps instance. You'll need to purchase more Google Apps licenses (or if you're using EDU or non-profit, request more users in the CPanel).

The 2nd error looks like a temporary error, your application should pause for a second and then retry the request, if it fails again, pause 2 seconds and try again continuing to backoff each time. Eventually the request should succeed or after 10 tries or so, have your app quit and report an error to the user.

Jay


On Wednesday, June 13, 2012 2:01:22 PM UTC-4, fullofcaffeine wrote:
Hello list,

I started to have some issues with the provisioning API this week. First, when I try to modify a user using it, I'm getting an errorCode=1002 message. Here's the full request/response:

2012-06-13_17:24:07.27324 opening connection to apps-apis.google.com...
2012-06-13_17:24:07.35556 opened
2012-06-13_17:24:07.41721 <- "POST /a/feeds/user/2.0/mydomain.com HTTP/1.1\r\nConnection: close\r\nContent-Type: application/atom+xml\r\nAuthorization: GoogleLogin auth=DQAAAOYAAAD11LW1rSFsXP-T2Mo5SGT0jcCKz3GDqWAKPURpSfkwNVkLgvqIghDfo2INw17R3ABt2U_taoPQDH0L7taLW5DDxIbsE_pn3v3R94IFpYwpgjyKjNRFT2UK90pyZRRfCcSF-BJdgnjX4O5DPSJh5BusIlJrO4njerki-jgS9Uy0v43QmcCtPNLyELV23alVTNQQyL07m-h7rahVlyzEoOEJDnXcowJY3rdO08oahOprTuagaMvfO7YtoDLRIhB4JCRzZOCvd_a4FYt0KPqHkfOUSPrrPJUVOdqT_G0eQCriwCoCv0XHmEzb4dQz2e3sxfHM\r\nContent-Length: 455\r\nHost: apps-apis.google.com\r\n\r\n"
2012-06-13_17:24:07.41748 <- "<atom:entry xmlns:atom='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'><apps:property name=\"password\" value=\"4c9bbd9645162a08d47e92d0e232ce6c6ecba37\"/><apps:property name=\"hashFunction\" value=\"SHA-1\"/><apps:property name=\"userEmail\" value=\"testemployee2@mydomain.com\"/><apps:property name=\"firstName\" value=\"Test\"/><apps:property name=\"lastName\" value=\"Employee2\"/><apps:property name=\"isAdmin\" value=\"false\"/></atom:entry>"
Reply all
Reply to author
Forward
0 new messages