---
id: object/codeunit/9843
type: object
title: Codeunit 9843 "User Selection"
summary: Codeunit 9843 "User Selection" in System Application (System.Security.User). 6 public procedures. Present since at least BC23, still in BC30, changed in BC26.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: "26"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 0892ab23dfd5663dee75412cac23d902c6fc9e71ccb9fec53da6e309b62a704f
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/User%20Selection/src/UserSelection.Codeunit.al
    title: src/System Application/App/User Selection/src/UserSelection.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 9843
name: User Selection
namespace: System.Security.User
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "26"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 6
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 8
  implements: 0
---

# Codeunit 9843 "User Selection"

> Codeunit 9843 "User Selection" in System Application (System.Security.User). 6 public procedures. Present since at least BC23, still in BC30, changed in BC26.

System Application · System.Security.User · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/User%20Selection/src/UserSelection.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |

## Procedures

- `Open(var SelectedUser: Record User): Boolean`: Opens the user lookup page with external and system users (application, agent, etc.) filtered out and assigns the selected users on the parameter.
- `OpenWithSystemUsers(var SelectedUser: Record User): Boolean`: Opens the user lookup page with only external users filtered out and assigns the selected users on the parameter.
- `ValidateUserName(UserName: Code[50])`: Displays an error if there is no user with the given username and the user table is not empty.
- `HideExternalUsers(var User: Record User)`: Sets Filter on the given User Record to exclude external and system (application, agent, etc.) users.
- `FilterSystemUserAndAADGroupUsers(var User: Record User)`: Sets Filter on the given User Record to exclude the system user and Microsoft Entra group users.
- `FilterSystemUserAndGroupUsers(var User: Record User)`: Sets Filter on the given User Record to exclude the system user, Microsoft Entra group users and Windows Group users.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 9844 "User Selection Impl."](../codeunit/9844.md) (6 calls: `FilterSystemUserAndAADGroupUsers → FilterSystemUserAndAADGroupUsers`, `FilterSystemUserAndGroupUsers → FilterSystemUserAndGroupUsers`, `HideExternalUsers → HideExternalAndSystemUsers`, …)

## Called by

- [Page 9816 "Permission Set by User"](../page/9816.md) (3 calls: `FindUsers → FilterSystemUserAndGroupUsers`, `OnOpenPage → FilterSystemUserAndGroupUsers`, `SetColumnPermission → FilterSystemUserAndGroupUsers`)
- [Codeunit 9029 "Azure AD User Sync Impl."](../codeunit/9029.md) (2 calls: `FetchUpdatesForSkippedUsers → FilterSystemUserAndAADGroupUsers`, `HandleRemovedUsers → FilterSystemUserAndAADGroupUsers`)
- [Codeunit 9175 "User Settings Impl."](../codeunit/9175.md) (2 calls: `EditUserID → Open`, `GetAllUsersSettings → HideExternalUsers`)
- [Codeunit 9002 "Permission Manager"](../codeunit/9002.md) (1 call: `ResetUsersToIntelligentCloudPermissions → FilterSystemUserAndAADGroupUsers`)
- [Page 9200 "Personalized Pages"](../page/9200.md) (1 call: `GenerateUserSidFilter → HideExternalUsers`)
- [Page 9800 "Users"](../page/9800.md) (1 call: `OnOpenPage → HideExternalUsers`)
- [Page 9876 "Perm. Set Assignments Part"](../page/9876.md) (1 call: `FilterOutSpecialUsers → FilterSystemUserAndGroupUsers`)
- [Table 9062 "User Security Status"](../table/9062.md) (1 call: `LoadUsers → FilterSystemUserAndGroupUsers`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC26

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "User Selection")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
