Google Apps Provisioning API Version 2 - Adding an Owner to a Group
Another aspect of the Google Apps Provisioning API that I’ve discovered has to do with adding an owner to a group.
In my last post I talked about paging the results retrieved from the list of groups. Here it has to do with adding an owner to a group.
So I’ve gotten my implementation done. How’d I know I got it right? Well, considering that I’ve got the implementation for adding/removing/retrieving members done and working correctly, my implementation for owner is more than likely to be correct as well.
So after I’ve gotten the code done up, I tried it but to no avail. The owner wasn’t added to the group. After a few moments of pondering, I began to wonder if it was my code that was wrong, and then it struck me – the function only works on added members! So I added a member then called the function on the member, and it worked!
Conversely, removing an owner from a group does not remove the user from the group. It removes the status of owner from the user in the group i.e. an owner of the group becomes a member of the group.
The documentation on the API did not mention anything about it at all. I’m just glad I didn’t waste 3 hours trying to debug my code. Phew!