javativoli-identity-manager

groups accociated with user in ITIM


I am working in JAVA application and authenticating user through ITIM api. How to get groups accociated with user through ITIM api?


Solution

  • The system user will have an attribute of ‘erroles’ through which we can get information of user groups/Roles.

    Get DistinguishedName from Person object. Make PersonMO object having constructor like new PersonMO(platform, subject, person.getDistinguishedName());

    Make new AccountManager(platform, subject);

    This will give accounts collection accountManager.getAccounts(personMO, LocaleCreator.getLocale());

    Get getSystemUserDN(userId);. PersonDao class will help in getting this.

    Make new SystemUserMO(m_platform, m_subject, new DistinguishedName(systemUserDN));

    Get the roles/Groups from systemUserMO.getData().getRoles()

    Cheers Imran Tariq