Forum Discussion
Find members of O365 Group with vba?
Hello. More info. When I try
SELECT CN, memberOf FROM 'LDAP://blah.com' WHERE objectCategory="User"
Do Until objResultSet.EOF
currName=objResultSet.Fields("CN").Value
If currName="Joe Smith" Then
grpNameArray=objRecordSet.Fields("memberOf").Value
Forall thingies in grpNameArray
Print thingies
End Forall
End If
The grpNameArray above, for Joe Smith memberOf, contains four items with CN=..., O=..., OU=...etc attributes.
However, these don't match the three groups which are listed under Member Of tab when I right click Joe Smith and select properties in the GAL. They seem related but the CN doesn't exactly match the GAL name and the code returns four items when only three groups are listed under his properties. Could somebody explain this and is it possible to access the, presumably, O365 groups listed in his GAL account. thank you so much again.