From 7a96d0311eb5ea9e65b7a6114332f7c01b957ae4 Mon Sep 17 00:00:00 2001 From: Vuthik Kol Date: Wed, 29 Nov 2023 14:22:24 +1100 Subject: [PATCH] IE-19/list-all-users = added link for list users documentation --- src/scripts/services/user-service.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/scripts/services/user-service.ts b/src/scripts/services/user-service.ts index a54071b5..a91045d5 100644 --- a/src/scripts/services/user-service.ts +++ b/src/scripts/services/user-service.ts @@ -134,6 +134,13 @@ export class OktaUserService { (group) => this.privateListUsers(group, listAll) ); + /** + * Lists all users in a group or client. + * @param groupOrClient - Either a group or a client + * @param listAl - Whether to list all users or just non-deprovisioned users + * @link https://developer.okta.com/docs/reference/api/users/#list-all-users + * @returns a list of users + */ readonly privateListUsers = ( groupOrClient: TE.TaskEither, listAll: boolean @@ -150,6 +157,8 @@ export class OktaUserService { return ( maybeGroupOrClient .listUsers({ + // Without this filter, Okta will only return non-deprovisioned users. + // link: https://developer.okta.com/docs/reference/api/users/#list-all-users filter: listAll ? Object.keys(okta.UserStatus) .map((status) => `status eq "${status}"`)