---
title: "Codeunit 9871 Security Group Impl., extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/points/
object: https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/
app: "System Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/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 9871 Security Group Impl., extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/points/

26 procedures and triggers with a step in src/System Application/App/Security Groups/src/SecurityGroupImpl.Codeunit.al, in source order, read from the text, not from a run.

## ValidateGroupId

[Line 42](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L42).

- [44](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L44) calls `IsWindowsAuthentication`
- [45](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L45) calls `ValidateWindowsGroup`
- [47](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L47) calls `ValidateEntraGroup`

## Create

[Line 50](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L50).

- [69](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L69) calls `IsWindowsAuthentication`
- [70](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L70) calls `ValidateWindowsGroup`
- [76](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L76) writes [Table 2000000120 User](https://jonas-paprotka.de/ref/table/2000000120-user/) Insert
- [80](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L80) calls `ValidateEntraGroup`
- [81](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L81) calls `TryGetNameById`
- [83](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L83) raises `OnBeforeCreateAadGroupUserInSaaS`
- [89](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L89) writes [Table 9020 Security Group](https://jonas-paprotka.de/ref/table/9020-security-group/) Insert
- [91](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L91) calls [Codeunit 8703 Feature Telemetry](https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/) `LogUptake`

## Delete

[Line 96](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L96).

- [104](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L104) writes [Table 2000000053 Access Control](https://jonas-paprotka.de/ref/table/2000000053-access-control/) DeleteAll
- [106](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L106) writes [Table 2000000120 User](https://jonas-paprotka.de/ref/table/2000000120-user/) Delete
- [107](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L107) writes [Table 9020 Security Group](https://jonas-paprotka.de/ref/table/9020-security-group/) Delete(true)

## Copy

[Line 111](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L111).

- [113](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L113) calls `Create`
- [114](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L114) calls `CopyPermissions`

## CopyPermissions

[Line 117](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L117).

- [123](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L123) calls `GetGroupUserSecurityId`
- [124](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L124) calls `GetGroupUserSecurityId`
- [130](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L130) writes [Table 2000000053 Access Control](https://jonas-paprotka.de/ref/table/2000000053-access-control/) Insert

## AddPermissionSet

[Line 135](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L135).

- [148](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L148) writes [Table 2000000053 Access Control](https://jonas-paprotka.de/ref/table/2000000053-access-control/) Insert

## RemovePermissionSet

[Line 152](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L152).

- [160](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L160) writes [Table 2000000053 Access Control](https://jonas-paprotka.de/ref/table/2000000053-access-control/) Delete

## GetAvailableGroups

[Line 201](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L201).

- [218](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L218) writes [Table 9022 Security Group Buffer](https://jonas-paprotka.de/ref/table/9022-security-group-buffer/) DeleteAll
- [220](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L220) calls `IsWindowsAuthentication`
- [225](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L225) calls `GetDisallowedWindowsGroupIds`
- [228](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L228) writes [Table 9022 Security Group Buffer](https://jonas-paprotka.de/ref/table/9022-security-group-buffer/) Insert
- [232](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L232) calls `FetchAllEntraGroups`
- [233](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L233) calls `RemoveOrphanedEntraGroups`
- [241](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L241) writes [Table 9022 Security Group Buffer](https://jonas-paprotka.de/ref/table/9022-security-group-buffer/) Insert

## GetGroups

[Line 249](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L249).

- [256](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L256) writes [Table 9022 Security Group Buffer](https://jonas-paprotka.de/ref/table/9022-security-group-buffer/) DeleteAll
- [258](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L258) calls `IsWindowsAuthentication`
- [268](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L268) calls `IsWindowsAuthentication`
- [274](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L274) calls `GetName`
- [276](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L276) writes [Table 9022 Security Group Buffer](https://jonas-paprotka.de/ref/table/9022-security-group-buffer/) Insert

## GetMembers

[Line 282](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L282).

- [291](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L291) writes [Table 9021 Security Group Member Buffer](https://jonas-paprotka.de/ref/table/9021-security-group-member-buffer/) DeleteAll
- [293](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L293) calls `IsWindowsAuthentication`
- [302](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L302) calls `IsWindowsAuthentication`
- [303](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L303) calls `TryGetWindowsGroupMembers`
- [306](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L306) calls `TryGetEntraGroupMembers`
- [312](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L312) calls [Codeunit 8703 Feature Telemetry](https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/) `LogUptake`
- [313](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L313) calls [Codeunit 8703 Feature Telemetry](https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/) `LogUsage`

## GetName

[Line 319](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L319).

- [321](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L321) calls `TryGetName`

## TryGetName

[Line 327](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L327), local.

- [329](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L329) calls `TryGetNameById`
- [329](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L329) calls `GetId`

## TryGetNameById

[Line 333](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L333).

- [338](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L338) calls `IsWindowsAuthentication`
- [346](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L346) calls [Codeunit 9012 Azure AD Graph](https://jonas-paprotka.de/ref/codeunit/9012-azure-ad-graph/) `GetGroupName`

## GetId

[Line 357](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L357).

- [361](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L361) calls `IsWindowsAuthentication`

## GetCode

[Line 372](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L372).

- [378](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L378) calls `IsWindowsAuthentication`

## GetIdByName

[Line 397](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L397).

- [401](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L401) calls `TryGetIdByName`

## TryGetIdByName

[Line 408](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L408).

- [410](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L410) calls `IsWindowsAuthentication`
- [414](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L414) calls [Codeunit 9012 Azure AD Graph](https://jonas-paprotka.de/ref/codeunit/9012-azure-ad-graph/) `GetFirstGroupIdWithName`

## TryGetEntraGroupMembers

[Line 420](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L420), local.

- [426](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L426) calls [Codeunit 9012 Azure AD Graph](https://jonas-paprotka.de/ref/codeunit/9012-azure-ad-graph/) `GetMemberIdsPageForGroupId`
- [437](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L437) calls `GetName`
- [438](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L438) writes [Table 9021 Security Group Member Buffer](https://jonas-paprotka.de/ref/table/9021-security-group-member-buffer/) Insert

## ValidateWindowsGroup

[Line 444](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L444), local.

- [460](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L460) calls `GetDisallowedWindowsGroupIds`

## ValidateEntraGroup

[Line 478](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L478), local.

- [483](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L483) calls `TryGetNameById`
- [486](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L486) calls `RemoveOrphanedEntraGroups`

## FetchAllEntraGroups

[Line 492](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L492), local.

- [498](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L498) calls [Codeunit 9012 Azure AD Graph](https://jonas-paprotka.de/ref/codeunit/9012-azure-ad-graph/) `GetGroups`

## IsWindowsAuthentication

[Line 502](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L502).

- [508](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L508) raises `OnIsWindowsAuthentication`

## TryGetWindowsGroupMembers

[Line 515](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L515), local.

- [529](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L529) writes [Table 9021 Security Group Member Buffer](https://jonas-paprotka.de/ref/table/9021-security-group-member-buffer/) Insert

## SendNotificationForDeletedGroups

[Line 534](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L534).

- [554](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L554) calls `IsWindowsAuthentication`
- [559](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L559) calls `IsWindowsAuthentication`

## GetDesirableCode

[Line 569](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L569).

- [573](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L573) calls `IsWindowsAuthentication`

## RemoveOrphanedEntraGroups

[Line 588](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L588), local.

- [609](https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/#L609) writes [Table 2000000120 User](https://jonas-paprotka.de/ref/table/2000000120-user/) Delete(true)

## Source

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

JOP-AL, 2026-11-20.
