0

I'm attempting to retrieve all organization users as shown in the code below:

            OrganizationService service = new OrganizationService(domain, applicationName);
            service.setUserCredentials(adminEmail, adminPassword);
            AppsExtendedFeed feed=service.RetrieveAllOrganizationUsers(customerID);


            foreach (AppsExtendedEntry unit in feed.Entries)
            {
                userList.Add(unit.getPropertyByName("memberId")); // Add the users to the ArrayList
            }

However, it's failing because the parameter ("memberId") being passed to getPropertyByName appears to be wrong.

Can anyone tell me what the correct parameter should be if I wish to return all users in an OU in the form of email addresses? Or is there an alternative way to retrieve all users in an organisation? Any help would be greatly appreciated. Thanks.

Regards Ryan

1 Answers1

0

I apologize in advance if I was taking this the wrong way, but if you're looking to get email addresses from Active Directory or a similar directory service, here is a list of attributes:

Common Default Attributes

It looks like the one you're looking for is "mail". Good luck!

Dave H
  • 653
  • 12
  • 22