Hi Ryan, The timing issue seems a little strange. I'll check with some more engineers and see if there is a more deterministic way to create the user and modify the user's OU.
/Rufus On Mon, Oct 24, 2011 at 12:49 PM, Ryan <[email protected]> wrote: > I'm making a solution to dynamically provision new accounts, as needed, and > then move the account to the correct OU. However, there seems to be a timing > issue between the two. The > documentation<http://code.google.com/googleapps/domain/gdata_provisioning_api_v2.0_developers_protocol.html#Creating_an_Organization_User>says > that it is possible, #2. What I do is provision the new account, wait 2 > minutes, then try to move OU's. However, the Organization API reports that > the user does not exist. > > To get a little more in-depth, my solution follows these steps for a new > user: > > 1. Check for the users' account, which reports back that it does NOT > exist, by GETing from > https://apps-apis.google.com/a/feeds/MYDOMAIN/user/2.0/USERNAME > 2. Provision a new account by POSTing to > https://apps-apis.google.com/a/feeds/MYDOMAIN/user/2.0 > 3. Forces the user to wait 2 minutes before retrying to login again > 4. Check for the users' account again, which reports back that it DOES > exist, by GETing from > https://apps-apis.google.com/a/feeds/MYDOMAIN/user/2.0/USERNAME > 5. Check for the users Organization details, which reports back that it > does NOT exist, by GETing from > https://apps-apis.google.com/a/feeds/orguser/2.0/CUSTID/USER@EMAIL > > So the weird thing here is that the user management API reports that the > account exists but the organization API does not. At the same time, the user > does not show up in the Domain Dashboard. However, after 30+ minutes the > account then shows up in the Dashboard and the API can "move" OU's. > Thoughts? > > Thanks > ~ Ryan > > -- > 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/-/q1j4iShHpG4J. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-apps-mgmt-apis?hl=en. > -- Andy "Rufus" Rothfusz | Developer Programs Engineer | Google | Mountain View, CA -- You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.
