---
title: "Codeunit 9874 User Security Groups PBT, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/points/
object: https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/
app: "Base Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 9874 User Security Groups PBT, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/points/

7 procedures and triggers with a step in src/Layers/W1/BaseApp/System/SecurityGroups/Factboxes/UserSecurityGroupsPBT.Codeunit.al, in source order, read from the text, not from a run.

## OnRun

[Line 17](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L17), trigger.

- [21](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L21) calls `GetBackgroundTaskResult`

## GetBackgroundTaskResult

[Line 25](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L25).

- [30](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L30) calls `GetUserSecurityIdParameterKey`
- [31](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L31) calls `FetchEntraGroups`
- [32](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L32) calls `GetUserSecurityIdParameterKey`

## FetchEntraGroups

[Line 36](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L36), local.

- [43](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L43) calls [Codeunit 9024 Azure AD Graph User](https://jonas-paprotka.de/ref/codeunit/9024-azure-ad-graph-user/) `GetGraphUser`

## ShouldEnqueueBackgroundTask

[Line 56](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L56).

- [61](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L61) calls `IsFetchingGroupsPerUserAvailable`
- [64](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L64) calls `IsAnySecurityGroupPresent`
- [67](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L67) calls `ShouldFetchUserMemberships`
- [70](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L70) calls `GetUserSecurityIdParameterKey`

## IsFetchingGroupsPerUserAvailable

[Line 74](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L74).

- [78](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L78) calls [Codeunit 9031 Security Group](https://jonas-paprotka.de/ref/codeunit/9031-security-group/) `IsWindowsAuthentication`

## GetSecurityGroupMemberBuffer

[Line 81](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L81).

- [88](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L88) calls `GetUserSecurityIdParameterKey`
- [89](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L89) calls `GetUserSecurityIdParameterKey`
- [91](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L91) calls `ShouldFetchUserMemberships`
- [94](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L94) calls `SetUserMembershipsFetched`
- [97](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L97) calls [Codeunit 9031 Security Group](https://jonas-paprotka.de/ref/codeunit/9031-security-group/) `GetCode`
- [101](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L101) writes [Table 9021 Security Group Member Buffer](https://jonas-paprotka.de/ref/table/9021-security-group-member-buffer/) Insert

## IsAnySecurityGroupPresent

[Line 108](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L108), local.

- [113](https://jonas-paprotka.de/ref/codeunit/9874-user-security-groups-pbt/source/#L113) calls [Codeunit 9031 Security Group](https://jonas-paprotka.de/ref/codeunit/9031-security-group/) `GetGroups`

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
