Adding logic to obtain the base dn values.