Failure when adding a teacher to an active course

1,769 views
Skip to first unread message

John Lowe

unread,
Feb 8, 2018, 1:17:50 PM2/8/18
to GAM for G Suite
The course info is pasted below. When I try to add a teacher or update the owner, I get an ERROR: 400 Precondition check failed. - failedPrecondition. Any ideas? The teacher who created the course had an email change a while back. Should that have killed the ability to add a teacher or owner to this course?

id: 0B-jAkn_pwtiPfnVyc1BmRTREWkZRZFRaX1ZXeENzNVc4NlJzR29VVVAtVzhlUUh6cFBCb00
 creationTime: 2017-08-28T19:33:45.009Z
 ownerEmail: 116245035089881460574
 courseState: ACTIVE
 courseGroupEmail: Starling_s_Hom...@ccsgafe.org
 ownerId: 116245035089881460574
 descriptionHeading: Starling's Homeroom
Aliases:
  StarlingMath
Participants:
 Teachers:
  Unknown user

Ross Scroggs

unread,
Feb 8, 2018, 2:56:23 PM2/8/18
to google-ap...@googlegroups.com
John,

What are the commands you're trying to execute?

Ross

On Thu, Feb 8, 2018 at 10:17 AM, John Lowe <jl...@clinton.k12.nc.us> wrote:
The course info is pasted below. When I try to add a teacher or update the owner, I get an ERROR: 400 Precondition check failed. - failedPrecondition. Any ideas? The teacher who created the course had an email change a while back. Should that have killed the ability to add a teacher or owner to this course?

id: 0B-jAkn_pwtiPfnVyc1BmRTREWkZRZFRaX1ZXeENzNVc4NlJzR29VVVAtVzhlUUh6cFBCb00
 creationTime: 2017-08-28T19:33:45.009Z
 ownerEmail: 116245035089881460574
 ownerId: 116245035089881460574
 descriptionHeading: Starling's Homeroom
Aliases:
  StarlingMath
Participants:
 Teachers:
  Unknown user

John Lowe

unread,
Feb 8, 2018, 5:21:16 PM2/8/18
to GAM for G Suite


On Thursday, February 8, 2018 at 2:56:23 PM UTC-5, Ross Scroggs wrote:
John,

What are the commands you're trying to execute?

Ross
On Thu, Feb 8, 2018 at 10:17 AM, John Lowe <jl...@clinton.k12.nc.us> wrote:
The course info is pasted below. When I try to add a teacher or update the owner, I get an ERROR: 400 Precondition check failed. - failedPrecondition. Any ideas? The teacher who created the course had an email change a while back. Should that have killed the ability to add a teacher or owner to this course?

id: 0B-jAkn_pwtiPfnVyc1BmRTREWkZRZFRaX1ZXeENzNVc4NlJzR29VVVAtVzhlUUh6cFBCb00
 creationTime: 2017-08-28T19:33:45.009Z
 ownerEmail: 116245035089881460574
 courseState: ACTIVE
 courseGroupEmail: Starling_s_Hom...@ccsgafe.org
 ownerId: 116245035089881460574
 descriptionHeading: Starling's Homeroom
Aliases:
  StarlingMath
Participants:
 Teachers:
  Unknown user

--
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.



--

John Lowe

unread,
Feb 8, 2018, 5:34:33 PM2/8/18
to GAM for G Suite
This may be because the original teacher email tsta...@ccsgafe.org was deleted. It is possible to change the ownerid on this course to someone I know is still active?

Ross Scroggs

unread,
Feb 8, 2018, 5:56:16 PM2/8/18
to google-ap...@googlegroups.com
John,

I'm working on this same issue with someone else. The output will look different from what you see as I'm running my Advanced Gam.
I have a junk course where I deleted the user that was the owner.

$ gam info course 6941461074 owneremail show teachers

Course: 6941461074

  Course ID: 6941461074, Owner ID: 114592717926494512783, Does not exist

  alternateLink: http://classroom.google.com/c/xxx

  calendarId: rdschool.org_classroomxxx@group.calendar.google.com

  courseGroupEmail: junk...@rdschool.org

  courseState: ACTIVE

  creationTime: 2017-07-01T09:13:27-07:00

  enrollmentCode: 906z479

  guardiansEnabled: False

  id: 6941461074

  name: junk

  ownerEmail: 114592717926494512783

  ownerId: 114592717926494512783

  teacherFolder:

    id: 0By1SKeDrZ1WNfnlqREVqRFBmZV9kMUYwQnZ4TnZ1R3RncTBUZlR3X0hxb0drcVVaQm56Zm8

  teacherGroupEmail: junk_teachers_xxx@rdschool.org

  updateTime: 2017-07-01T09:14:51-07:00

  Participants:

    Teachers: 3

      Unknown user

      Test User1 - test...@rdschool.org

      RDS Admin - ad...@rdschool.org

Note that the ownerId and ownerEmail are the same, I do this when I can't get the ownerEmail.

Note the unknown Teacher.


Let's promote teacher test...@rdschool.org to be the owner.


$ gam update course 6941461074 owner test...@rdschool.org

Course: 6941461074, Update Failed: @UserInIllegalDomain Invitation cannot be created for user in this domain

$

That's a bust and not very understandable, what illegal domain?


The rule is that only teachers can be promoted to owners, let's verify that, maybe we'll get lucky.


$ gam update course 6941461074 owner test...@rdschool.org

Course: 6941461074, Update Failed: @IneligibleOwner Only a co-teacher can be invited as owner of the course

$

No luck there. Let's try adding a new teacher.


$ gam course 6941461074 add teacher test...@rdschool.org

Course: 6941461074, Add 1 Teacher

  Course: 6941461074, Teacher: test...@rdschool.org, Add Failed: 400: 400 - Precondition check failed.

$

Ummm? Now what?


Ross


On Thu, Feb 8, 2018 at 2:34 PM, John Lowe <jl...@clinton.k12.nc.us> wrote:
This may be because the original teacher email tsta...@ccsgafe.org was deleted. It is possible to change the ownerid on this course to someone I know is still active?


On Thursday, February 8, 2018 at 5:21:16 PM UTC-5, John Lowe wrote:
gam course 5073095756 add teacher tonya...@clinton.k12.nc.us

On Thursday, February 8, 2018 at 2:56:23 PM UTC-5, Ross Scroggs wrote:
John,

What are the commands you're trying to execute?

Ross
On Thu, Feb 8, 2018 at 10:17 AM, John Lowe <jl...@clinton.k12.nc.us> wrote:
The course info is pasted below. When I try to add a teacher or update the owner, I get an ERROR: 400 Precondition check failed. - failedPrecondition. Any ideas? The teacher who created the course had an email change a while back. Should that have killed the ability to add a teacher or owner to this course?

id: 0B-jAkn_pwtiPfnVyc1BmRTREWkZRZFRaX1ZXeENzNVc4NlJzR29VVVAtVzhlUUh6cFBCb00
 creationTime: 2017-08-28T19:33:45.009Z
 ownerEmail: 116245035089881460574
 courseState: ACTIVE
 courseGroupEmail: Starling_s_Hom...@ccsgafe.org
 ownerId: 116245035089881460574
 descriptionHeading: Starling's Homeroom
Aliases:
  StarlingMath
Participants:
 Teachers:
  Unknown user

--
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+unsubscribe...@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.



--

John Lowe

unread,
Feb 8, 2018, 6:00:19 PM2/8/18
to google-ap...@googlegroups.com
Thanks. Let me know if you have any luck. In the meantime is it possible to create a new course and transfer all the data from this course to it? 

John Lowe
Director of Technology
Clinton City Schools

"The sum of your experiences should always outweigh the sum of your bank accounts." - unknown




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.



--

--
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.

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

Ross Scroggs

unread,
Feb 8, 2018, 6:02:41 PM2/8/18
to google-ap...@googlegroups.com
John,

By all of the data, do you mean just students and teachers or do you mean course work/submissions/...?

Ross


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



--

John Lowe

unread,
Feb 8, 2018, 6:20:05 PM2/8/18
to google-ap...@googlegroups.com
The teacher would prefer coursework/submissions. The students can still access the course, just not the teacher.




--

--
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.

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

Ross Scroggs

unread,
Feb 8, 2018, 6:27:58 PM2/8/18
to google-ap...@googlegroups.com
John,

Bad news, no transfer possible. I'd talk to Google, maybe they can patch it up from the inside. 

Ross


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



--

John Lowe

unread,
Feb 8, 2018, 7:30:54 PM2/8/18
to google-ap...@googlegroups.com
Thanks for looking into it. It is just odd that you can't change the owner id to an active account somehow. 

John Lowe
Director of Technology
Clinton City Schools

"The sum of your experiences should always outweigh the sum of your bank accounts." - unknown







--

--
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.

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

+KimNilsson

unread,
Feb 10, 2018, 6:33:18 AM2/10/18
to GAM for G Suite
Yes, it's really silly that only the active teacher can change the owner, since that becomes impossible after the creator is deleted.
And, no, you can't transfer content from one course to another via API. Only course teachers can copy content, and not actually move it.

Marta de Souza

unread,
Feb 14, 2018, 7:07:27 AM2/14/18
to GAM for G Suite
I thought that only users in the same domain could be configured ate teachers in classroom, like in the same @domain  addresses. Or has this changed now?

Regards,

Marta


On Thursday, 8 February 2018 18:17:50 UTC, John Lowe wrote:
The course info is pasted below. When I try to add a teacher or update the owner, I get an ERROR: 400 Precondition check failed. - failedPrecondition. Any ideas? The teacher who created the course had an email change a while back. Should that have killed the ability to add a teacher or owner to this course?

id: 0B-jAkn_pwtiPfnVyc1BmRTREWkZRZFRaX1ZXeENzNVc4NlJzR29VVVAtVzhlUUh6cFBCb00
 creationTime: 2017-08-28T19:33:45.009Z
 ownerEmail: 116245035089881460574
 teacherGroupEmail: 
 calendarId: 
 courseGroupEmail: 

+KimNilsson

unread,
Feb 14, 2018, 8:01:59 AM2/14/18
to GAM for G Suite
Yes, since a while back. https://support.google.com/edu/classroom/answer/6173514?hl=en

Now these are the alternatives.

Who can join classes in your domain, choose an option:
  • Users in your domain only—Only G Suite for Education users in your domain can join your domain's classes
  • Users in whitelisted domains—G Suite for Education users from domains you allow can join your domain's classes. You need to whitelist these domains and domain administrators from those domains need to whitelist your domain. 
  • Any G Suite user—Any G Suite user who has access to Classroom can join your domain's classes
  • Any user—Any G Suite user who has access to Classroom or personal Google Account user can join your domain's classes
Which classes can users in your domain join, choose an option:
  • Classes in your domain only—Your domain’s users can only join classes in your domain
  • Classes in whitelisted domains—Your domain's users can join classes in a whitelisted domain
  • Any G Suite for Education class—Your domain's users can join classes in any G Suite for Education domain

Marta de Souza

unread,
Feb 14, 2018, 8:18:26 AM2/14/18
to GAM for G Suite
Hi Kim Nilsson,

Thanks for the info. It makes it a bit more difficult to comply with GDPR if we open up and allow so much sharing outside the domain. GDPR is a cloud nightmare!

Don't get me wrong! I'm all for openness and education to all and taught by those who know stuff but this GDPR business will only bring headaches with no real beneficiaries apart from lawyers!

Regards,

Marta de Souza

+KimNilsson

unread,
Feb 14, 2018, 8:57:23 AM2/14/18
to GAM for G Suite
Nah, I love GDPR.

Marta de Souza

unread,
Feb 14, 2018, 9:23:03 AM2/14/18
to GAM for G Suite
Really? :-) 

On Wednesday, 14 February 2018 13:57:23 UTC, +KimNilsson wrote:
Nah, I love GDPR.

Adam Levick

unread,
Dec 18, 2018, 8:49:23 AM12/18/18
to GAM for G Suite
As this is the only other thread I can find on this same issue I am posting this here in the hope it helps others eventually.

https://stackoverflow.com/questions/53815233/using-google-classroom-api-to-change-course-ownerid

That is the stack overflow page where I asked the same question. No replies as of yet.

I have used multiple API methods to attempt to change course owner to no avail. Eventually went with GAM.

I am currently in contact with Google Support awaiting confirmation whether the API still works or is broken as since all other API calls had similar errors.

Will post when I have an update.

Ross Scroggs

unread,
Dec 18, 2018, 9:28:32 AM12/18/18
to google-ap...@googlegroups.com
Adam,

Changing the course owner is a two step process:
1) Add the new teacher to the course
2) Change the course owner to the new teacher

1) gam course <CourseID> add teacher newte...@domain.com
2) gam update course <CourseID> owner newte...@domain.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-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
Message has been deleted

Adam Levick

unread,
Dec 18, 2018, 10:52:19 AM12/18/18
to GAM for G Suite
Hello Ross,

I've tried all that. See Screenshot.

Kind Regards,
Adam 
gamcapture2.png

Kim Nilsson

unread,
Dec 18, 2018, 10:53:03 AM12/18/18
to Google Apps Manager
Adam,

as long as the account of the creator (usually current owner) of the classroom/course hasn't been deleted, then the process described by Ross will work perfectly.

But, if the creator account has been deleted, then it is not possible to change owner of the now orphaned Classroom. It can still be used, and IIRC teachers and students can be added, but ownership can not be transferred.

/Kim
--
There is No Substitute!

+KimNilsson

unread,
Dec 18, 2018, 11:04:46 AM12/18/18
to GAM for G Suite
Nope, I was wrong. I just verified it.

If the creator account has been deleted, then it is not possible to change membership of the Classroom.
Not via API, nor via the Classroom interface (if you are a co-teacher of the orphaned course).

If is possible to activate or archive the course, but since my test is only possible with a really old Classroom it started behaving funny when resurrected, so I wouldn't bank on being able to do anything with an orphaned course.

Make sure to manage Classrooms before deleting users.

/Kim

Ross Scroggs

unread,
Dec 18, 2018, 11:31:44 AM12/18/18
to google-ap...@googlegroups.com
Adam,

Do: gam info course <CourseId>
What is the courseState?
Get the ownerId and do: gam info user uid:<ownerId>

Ross

--
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.
Visit this group at https://groups.google.com/group/google-apps-manager.

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


--

Adam Levick

unread,
Dec 19, 2018, 4:31:34 AM12/19/18
to GAM for G Suite
Hi Ross,

If what Kim says is true, the user was deleted and it was over 20 days so we couldn't restore, then there is no way to get this classroom back.

Seems weird that the ownerID field for a classroom CANNOT be edited once the original creator account has been deleted. Seems like this would just be a field in a database and if I could access that database then it could be changed?

The problem arose because we use GADS to sync with google and it doesn't confirm or warn about classrooms like the admin console does when deleting a user so we weren't aware of the issues it was going to cause.

CourseState is ACTIVE and Ive used the second command it gives me all the info for that user but nothing that helps.

I think what Kim says is true, once the original creator is unrecoverable then the classroom is effectively "locked", Google definitely need to be thinking of a way to prevent this or at least be able to manually change the owner from the admin console.

For now im going to recommend the teacher just recreate the classroom. 

Google support haven't even come up with 1 straight answer for me yet but as soon as I get something back from the API support team I will post here.

Regards,

Adam

Kim Nilsson

unread,
Dec 19, 2018, 5:55:40 AM12/19/18
to Google Apps Manager
You could change your GCDS setup to only disable users, and then manually delete users on a regular basis instead.

That would also give you the opportunity to make sure valuable Drive content isn't lost forever.

Adam Levick

unread,
Dec 19, 2018, 6:39:21 AM12/19/18
to GAM for G Suite
I will forward that information on and we will look into changing that for now.

Out of interest because the error is:

ERROR: 400: @UserInIllegalDomain Invitation cannot be created for user in this domain - failedPrecondition

Would it work changing the Classroom Setting "Who can join classes in your domain" to "Any G Suite user" might let this command run?

Almost seems like it would.

Adam

Kim Nilsson

unread,
Dec 19, 2018, 9:39:27 AM12/19/18
to Google Apps Manager
No, I don't think so.
We have ours set to Any Google User and it still doesn't work.

Adam Levick

unread,
Dec 20, 2018, 6:06:55 AM12/20/18
to GAM for G Suite
Damn that's a shame.

Thank you to everyone who tried to help it is much appreciated.

At least with this knowledge out there anyone else facing this issue can quickly get the answer they need.

Regards,

Adam
Reply all
Reply to author
Forward
Message has been deleted
0 new messages