none
OpenLdap Export - how to create users with more than one objectClass in ldap

    Question

  • Hello All,

    For all users, I have to create 6 object classes in openldap. They are "top, person, organizationperson, inetorgPerson, posixAccount, eduPerson".  The external object type in portal sync rule is "inetOrgPerson". Whenever a try to export a new user from FIM to ldap, it is creating just one objectclass -"inetOrgPerson.

    How can I create users with multiple object classes?

    Please help! Thanks.


    • Edited by fim_sc Friday, March 15, 2013 8:23 PM
    Friday, March 15, 2013 7:38 PM

All replies

  • Hi Fim_SC,

    You can add the additional types after object creation if you use an MVRules extension to provision users.

    public void provisionINETOrgP(MVEntry mventry)
            {
                ValueCollection values;
                CSEntry csentry = null;
                if (
                    ((DestMA.Connectors.Count == 0) && (SourceMA.Connectors.Count == 1))
                    && mventry["AccountStatus"].Values.Contains("ENABLED")
                    )
                {
                    string newDnStr = "uid=" + mventry["accountName"].StringValue + DestOU;
                    values = Utils.ValueCollection("inetOrgPerson");
                    csentry = DestMA.Connectors.StartNewConnector("inetOrgPerson", values);
                    csentry["uid"].StringValue = mventry["accountName"].StringValue;
                    csentry.DN = DestMA.CreateDN(newDnStr);
                    try
                    {
                        csentry.CommitNewConnector();
                        values.Add("posixAccount");
                        values.Add("eduPerson");
                        csentry.ObjectClass = values;
                    }
                    catch (ObjectAlreadyExistsException) { }
                    catch (Exception)
                    {
                        throw;
                    }
                }
            }


    Visit My Blog: http://theidentityguy.blogspot.com/


    • Edited by Jssting Monday, March 18, 2013 6:13 AM
    Monday, March 18, 2013 6:10 AM