How to get a list of users with a basic service?

I am trying to get a list of available users from Core Service. I looked at the available service methods for quite some time, and the most obvious was:

TrusteesFilterData trusteesFilterData = new TrusteesFilterData { BaseColumns = ListBaseColumns.IdAndTitle, IsPredefined = false, ItemType = ItemType.User }; XElement listTrustees = client.GetSystemWideListXml(trusteesFilterData); 

However, the code causes an error when calling GetSystemWideListXml - Unable to create Abstract Class . I use the right approach, and if so, what am I doing wrong? If not, what should I do instead?

+8
tridion tridion-2011
source share
1 answer

Take a look at the samples in an open source project for workflow notifications.

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 you need to use UsersFilterData , not TrusteesFilterData

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

All Articles