Getting a users group memberships

  • 31 December 2021
  • 1 reply
  • 0 views

hi all



 



im trying to setup a screen in order to show a full profile of a AD user



so far ive got everything working correctly except getting a few fields to return usefull values



 



the main one bothering me is the following two AD fields



memberOf



AccountExpires



 



obviously the built in AD objects cant return these fields



so ive moved to using the dynamicADSO



 



however both fields always return System.__Comobject for account expiry



and system.object[] for memberof



 



Ive tried updating the service object for xml multiline and text, but always get the same result back



 



does anyone know a solution i can use to list all the groups a user is a member of in AD?


1 reply

Userlevel 3
Badge +9

If you use the Active Directory Service 2 Service instance you can create an AD Group SmO off of that - it contains a method for GetGroupsByUser - you can bind that to a list view.



 





 



If you have a large AD this can take quite a while to return results so run some tests.



 



Cheers

Reply