---
title: "Codeunit 9871 Security Group Impl."
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/
type: codeunit
id: 9871
name: "Security Group Impl."
app: "System Application"
namespace: System.Security.AccessControl
versions: "22-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/24/ https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/25/ https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/26/ https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/27/ https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/28/ https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 9871 Security Group Impl.

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/

| | |
| --- | --- |
| App | System Application |
| Namespace | System.Security.AccessControl |
| Versions | 22-28 |
| Source file | Security Groups/src/SecurityGroupImpl.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| ValidateGroupId | (Text) | - | public | 22-28 | - | - |
| Create | (Code[20], Text) | - | public | 22-28 | - | - |
| Delete | (Code[20]) | - | public | 22-28 | - | - |
| Copy | (Code[20], Code[20], Text) | - | public | 22-28 | - | - |
| CopyPermissions | (Code[20], Code[20]) | - | public | 22-28 | - | - |
| AddPermissionSet | (Code[20], Code[20], Text[30], Option, Guid) | - | public | 22-28 | - | - |
| RemovePermissionSet | (Code[20], Code[20], Text[30], Option, Guid) | Boolean | public | 22-28 | - | - |
| GetGroupUserSecurityId | (Code[20]) | Guid | public | 22-28 | - | - |
| Export | (List, OutStream) | - | public | 22-28 | - | - |
| Import | (InStream) | - | public | 22-28 | - | - |
| GetAvailableGroups | (var Record Security Group Buffer) | - | public | 22-28 | - | - |
| GetGroups | (var Record Security Group Buffer) | - | public | 22-23 | - | - |
| GetMembers | (var Record Security Group Member Buffer) | List | public | 22-28 | - | - |
| GetName | (Code[20], var Text[250]) | Boolean | public | 22-28 | - | - |
| TryGetNameById | (Text, var Text[250]) | Boolean | public | 22-28 | - | - |
| GetId | (Code[20]) | Text[250] | public | 22-28 | - | - |
| GetIdByName | (Text) | Text | public | 22-28 | - | - |
| IsWindowsAuthentication | () | Boolean | public | 22-28 | - | - |
| SendNotificationForDeletedGroups | (var Record Security Group Buffer) | - | public | 22-28 | - | - |
| GetDesirableCode | (Text) | Code[20] | public | 22-28 | - | - |
| TryGetIdByName | (Text, var Text) | Boolean | public | 23-28 | - | - |
| GetGroups | (var Record Security Group Buffer, Boolean) | - | public | 24-28 | - | - |
| GetCode | (Text[250], var Code[20]) | Boolean | public | 24-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Internal event | OnIsWindowsAuthentication | (var Boolean, var Boolean) | 22-28 | - | - |
| Internal event | OnBeforeCreateAadGroupUserInSaaS | (var Record Security Group, Text, Text, var Boolean) | 22-28 | - | - |

## Source

Symbols: Microsoft.SystemApplication.symbols.63ca2fa4-4f03-4f2b-a480-172fef340d3f, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 24: https://github.com/microsoft/BCApps, MIT, releases/24.x at fe14d3e6db00d28df3a69c7bba830813d70794e2.
AL source 25: https://github.com/microsoft/BCApps, MIT, releases/25.x at 68d52c129129c83b2e396a473aaa5b2ce61d2eed.
AL source 26: https://github.com/microsoft/BCApps, MIT, releases/26.x at 78c4acf0d64a8eee157ea80164fa8fc2acffc9eb.
AL source 27: https://github.com/microsoft/BCApps, MIT, releases/27.x at 1749020b4c9445a43e4f7f540e89b7fa76ec25fd.
AL source 28: https://github.com/microsoft/BCApps, MIT, releases/28.x at 740f59156b249f8ed7cba2e28423f03ae7b07233.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
