Developer Q&A
Retrieving only internal Users
I'm attempting to retrieve only my company's users and their respective roles via the API.
I'm making use of the Employee entity, but it ends up returning over 150 employees rather than the 29 users that I see when logging into the dashboard and viewing the User List page.
What criteria should I use when querying to ensure I only bring in my company's users?
Here is the service call and property set that I'm pulling.
service.RetrieveMultiple(
new QueryByProperty()
{
EntityType = EntityType.Employee,
PropertySet = new PropertySet
{
Properties = new string[]
{
"FirstName",
"LastName",
"DisplayAs",
"Role.DisplayAs",
"Role.Rank",
"Role.UnlimitedNte",
"Role.SsoLoginOnly",
"Role.Id",
"AccessToAllWorkZones",
"Username",
"DtPwdChange",
"ForcePasswordReset",
},
},
})