Create Users in Sub OU

1,967 views
Skip to first unread message

Suma

unread,
Jul 18, 2013, 1:34:26 PM7/18/13
to google-ap...@googlegroups.com
Hi Everyone,

New to GAM and need to create about 25,000 users. I have sub-organizations and when I use the command:

gam create user testuser firstname test lastname user password password org "/All Students/2015"

I get an error: Error 400: Invalid input: INVALID_OU_ID - invalid

I thought it was a syntax error on the OU, however, when I do an update command,  gam update users testuser org "/All Students/2015" that works just fine.

What am I missing?  Would like to be able to create the users and put them in the proper OU in 1 step, instead of having to create then update all 25,000 users.

Thanks for your help and insight!

Suma

Jay Lee

unread,
Jul 18, 2013, 1:41:08 PM7/18/13
to google-ap...@googlegroups.com
You didn't say what version of GAM you are using. What does:

gam print orgs

show? Try it without the first / and see if that helps.


Regards,

Jay Lee
Large Customer Deployment Lead   |  Dito



Suma

--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" 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.
Visit this group at http://groups.google.com/group/google-apps-manager.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Suma

unread,
Jul 18, 2013, 2:09:18 PM7/18/13
to google-ap...@googlegroups.com
AHA! No leading / solved it. Odd that the update command takes the leading / but create command doesn't...

Thanks so much!



On Thursday, July 18, 2013 10:41:08 AM UTC-7, Jay Lee wrote:
You didn't say what version of GAM you are using. What does:

gam print orgs

show? Try it without the first / and see if that helps.


Regards,

Jay Lee
Large Customer Deployment Lead   |  Dito


On Thu, Jul 18, 2013 at 1:34 PM, Suma <s...@hartdistrict.org> wrote:
Hi Everyone,

New to GAM and need to create about 25,000 users. I have sub-organizations and when I use the command:

gam create user testuser firstname test lastname user password password org "/All Students/2015"

I get an error: Error 400: Invalid input: INVALID_OU_ID - invalid

I thought it was a syntax error on the OU, however, when I do an update command,  gam update users testuser org "/All Students/2015" that works just fine.

What am I missing?  Would like to be able to create the users and put them in the proper OU in 1 step, instead of having to create then update all 25,000 users.

Thanks for your help and insight!

Suma

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

Israel Leite

unread,
Dec 9, 2013, 7:04:43 AM12/9/13
to google-ap...@googlegroups.com
Hi,

Are you able to move users from one OU to another?

I found this issue here:

http://code.google.com/p/google-apps-manager/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&groupby=&sort=&id=212

I run the command but nothing happens .

Ross Scroggs

unread,
Jul 27, 2014, 9:14:47 PM7/27/14
to google-ap...@googlegroups.com
This is a bug in the gam.py source: in the 3.3 source at line 3199 there is this snippet of code which is within doCreateUser
    elif sys.argv[i].lower() in [u'org', u'ou']:
      org = sys.argv[i+1]
      if org[1] != u'/':
        org = u'/%s' % org
      body[u'orgUnitPath'] = org
      i += 2
 
It's trying to add a leading / to the org if there isn't one but it's testing the second character instead of the first. The third line of code should read:

      if org[0] != u'/':

The command works as expected after the fix.

Ross
Reply all
Reply to author
Forward
0 new messages