# Recuperate organisation groups and roles

**URL:** <https://community.ofelia.com/t/recuperate-organisation-groups-and-roles/4823>\
**Category:** Q&A\
**Created:** [4 July 2014 10:39 UTC](https://community.ofelia.com/t/recuperate-organisation-groups-and-roles/4823 "2014-07-04T10:39:59Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![rahmi.hichem](https://avatars.discourse-cdn.com/v4/letter/r/e0b2c6/32.png) [@rahmi.hichem](https://community.ofelia.com/u/rahmi.hichem)\
**Post date:** [9 July 2014 12:33 UTC](https://community.ofelia.com/t/recuperate-organisation-groups-and-roles/4823/21 "2014-07-09T12:33:35Z")

</div>

The error was caused by the fact that i had sub-groups in my organisation. And as apparently he don’t hundle this . So i deleted all sub-groups and left just groups, and it works . Thank you 🙂

---

<div class="post-metadata">

**Author:** ![rahmi.hichem](https://avatars.discourse-cdn.com/v4/letter/r/e0b2c6/32.png) [@rahmi.hichem](https://community.ofelia.com/u/rahmi.hichem)\
**Post date:** [9 July 2014 12:34 UTC](https://community.ofelia.com/t/recuperate-organisation-groups-and-roles/4823/22 "2014-07-09T12:34:41Z")

</div>

And for profil i did this :

if (field\_priv\_choix=="Administrateur") { apiAccessor.getProfileAPI().createProfileMember(2, user.getId(), group.getId(), role.getId()) } else if (field\_priv\_choix=="Utilisateur") { apiAccessor.getProfileAPI().createProfileMember(1, user.getId(), group.getId(), role.getId()) }

[Previous page](https://community.ofelia.com/t/recuperate-organisation-groups-and-roles/4823.md?page=1)
