How do I get a list of users with the Core Service?

tridion, tridion-2011

Solution

Take a look at the samples in the open source project for workflow notification

http://code.google.com/p/tridion-notification-framework/source/browse/NotificationService/NotificationService/Worker.cs

Lines 22 - 26 in the DoWork() method should do what you need - I think need to use `UsersFilterData` rather than `TrusteesFilterData`

var users = client.GetSystemWideList(new UsersFilterData { BaseColumns = ListBaseColumns.IdAndTitle, IsPredefined = false });

Problem

I'm trying to get a list of the available users from the Core Service. I spend quite some time looking at the available service methods and the most obvious seemed to be this: ``` TrusteesFilterData trusteesFilterData = new TrusteesFilterData { BaseColumns = ListBaseColumns.IdAndTitle, IsPredefined = false, ItemType = ItemType.User }; XElement listTrustees = client.GetSystemWideListXml(trusteesFilterData); ``` However, the code throws an error when calling GetSystemWideListXml - `Unable to create Abstract Class`. Am I using the correct approach and, if so what am I doing wrong? If not, what should I be doing instead?

Original source