Skip to content

Commit

Permalink
IE-19/list-all-users = added link for list users documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vuthikxkol committed Nov 29, 2023
1 parent 12d18d9 commit 7a96d03
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/scripts/services/user-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Error, okta.Group | okta.Client>,
listAll: boolean
Expand All @@ -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}"`)
Expand Down

0 comments on commit 7a96d03

Please sign in to comment.