Directory API moving an organization unit using google api for java to another organization unit

后端 未结 1 1234
自闭症患者
自闭症患者 2021-01-27 15:44

I am testing moving an organization unit from under one parent to another. Right now i have a following OUs:

YourDomain.com
-Middle Schools
--Grade07
-Elementar         


        
相关标签:
1条回答
  • 2021-01-27 16:30

    I tried this and it worked. I realize you only need to update the parentOrgUnitPath. So the above code looks ike this:

    List<String> list = new ArrayList<String>();
        list.add("Middle Schools");
        list.add("Grade 07");
        OrgUnit ou = sDirectory.orgunits().get("my_customer", list).execute();
        ou.setParentOrgUnitPath("/Elementary Schools");
        sDirectory.orgunits().update("my_customer", list, ou).execute(); 
    
    0 讨论(0)
提交回复
热议问题