I can get the name ("cn") of the group but I am getting null for hubId ("adm-CustomAttributeText1"). What am I doing wrong here?
var parentContainer = (IADsContainer)admService.OpenObject("Adaxes://OU=All Field Users,OU=01_RCX Users,DC=railcrewxpress,DC=local", null, null, 0);
parentContainer.Filter = new object[] { "organizationalunit" };
foreach (IADs orgUnit in parentContainer)
{
var container = (IADsContainer)admService.OpenObject(orgUnit.ADsPath, null, null, 0);
container.Filter = new object[] { "group" };
foreach (IADs group in container)
{
try
{
var name = group.Get("cn").ToString();
var hubId = group.Get("adm-CustomAttributeText1").ToString();
}
catch
{ }
}
}
Thanks!