How to get the Deactivated users c# SDK

hi guys,

Please help me how get the Deactivated users using c# SDK. how to write filters for active users

samplecode
List lstUsers = oktaClient.GetUsersClient().GetList(null, 10000, null, SearchType.Filter, null, null, null).Results.AsEnumerable().OrderBy(x => x.Profile.LastName).ToList();

Can you use the status property?

user.status = “DEPROVISIONED”

No answer and I have searched the internet everywhere. It took me some time, but figured it out.

In ASP.NET core I used this and it works:

var deprovisionedOktaUsers = await client.Users.ListUsers(filter: $"status eq \"DEPROVISIONED\"").ToListAsync();

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.