{"title":"Codeunit 9871 Security Group Impl., extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/points/","author":"JOP-AL","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/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-05","object":{"type":"codeunit","id":9871,"name":"Security Group Impl.","app":"System Application","url":"https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/9871-security-group-impl/source/","path":"src/System Application/App/Security Groups/src/SecurityGroupImpl.Codeunit.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"table:2000000120":{"name":"User","url":"https://jonas-paprotka.de/ref/table/2000000120-user/"},"table:9020":{"name":"Security Group","url":"https://jonas-paprotka.de/ref/table/9020-security-group/"},"codeunit:8703":{"name":"Feature Telemetry","url":"https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/"},"table:2000000053":{"name":"Access Control","url":"https://jonas-paprotka.de/ref/table/2000000053-access-control/"},"table:9022":{"name":"Security Group Buffer","url":"https://jonas-paprotka.de/ref/table/9022-security-group-buffer/"},"table:9021":{"name":"Security Group Member Buffer","url":"https://jonas-paprotka.de/ref/table/9021-security-group-member-buffer/"},"codeunit:9012":{"name":"Azure AD Graph","url":"https://jonas-paprotka.de/ref/codeunit/9012-azure-ad-graph/"}},"procs":[{"name":"ValidateGroupId","line":42,"kind":"procedure","params":1,"steps":[[44,"call","IsWindowsAuthentication",0],[45,"call","ValidateWindowsGroup",1],[47,"call","ValidateEntraGroup",1]]},{"name":"Create","line":50,"kind":"procedure","params":2,"steps":[[69,"call","IsWindowsAuthentication",0],[70,"call","ValidateWindowsGroup",1],[76,"write",2000000120,"Insert"],[80,"call","ValidateEntraGroup",1],[81,"call","TryGetNameById",2],[83,"event","OnBeforeCreateAadGroupUserInSaaS",0],[89,"write",9020,"Insert"],[91,"ext","codeunit",8703,"LogUptake",3]]},{"name":"Delete","line":96,"kind":"procedure","params":1,"steps":[[104,"write",2000000053,"DeleteAll"],[106,"write",2000000120,"Delete"],[107,"write",9020,"Delete",1]]},{"name":"Copy","line":111,"kind":"procedure","params":3,"steps":[[113,"call","Create",2],[114,"call","CopyPermissions",2]]},{"name":"CopyPermissions","line":117,"kind":"procedure","params":2,"steps":[[123,"call","GetGroupUserSecurityId",1],[124,"call","GetGroupUserSecurityId",1],[130,"write",2000000053,"Insert"]]},{"name":"AddPermissionSet","line":135,"kind":"procedure","params":5,"steps":[[148,"write",2000000053,"Insert"]]},{"name":"RemovePermissionSet","line":152,"kind":"procedure","params":5,"steps":[[160,"write",2000000053,"Delete"]]},{"name":"GetAvailableGroups","line":201,"kind":"procedure","params":1,"steps":[[218,"write",9022,"DeleteAll"],[220,"call","IsWindowsAuthentication",0],[225,"call","GetDisallowedWindowsGroupIds",0],[228,"write",9022,"Insert"],[232,"call","FetchAllEntraGroups",0],[233,"call","RemoveOrphanedEntraGroups",0],[241,"write",9022,"Insert"]]},{"name":"GetGroups","line":249,"kind":"procedure","params":2,"steps":[[256,"write",9022,"DeleteAll"],[258,"call","IsWindowsAuthentication",0],[268,"call","IsWindowsAuthentication",0],[274,"call","GetName",2],[276,"write",9022,"Insert"]]},{"name":"GetMembers","line":282,"kind":"procedure","params":1,"steps":[[291,"write",9021,"DeleteAll"],[293,"call","IsWindowsAuthentication",0],[302,"call","IsWindowsAuthentication",0],[303,"call","TryGetWindowsGroupMembers",3],[306,"call","TryGetEntraGroupMembers",3],[312,"ext","codeunit",8703,"LogUptake",3],[313,"ext","codeunit",8703,"LogUsage",3]]},{"name":"GetName","line":319,"kind":"procedure","params":2,"steps":[[321,"call","TryGetName",2]]},{"name":"TryGetName","line":327,"kind":"procedure","access":"local","params":2,"steps":[[329,"call","TryGetNameById",2],[329,"call","GetId",1]]},{"name":"TryGetNameById","line":333,"kind":"procedure","params":2,"steps":[[338,"call","IsWindowsAuthentication",0],[346,"ext","codeunit",9012,"GetGroupName",1]]},{"name":"GetId","line":357,"kind":"procedure","params":1,"steps":[[361,"call","IsWindowsAuthentication",0]]},{"name":"GetCode","line":372,"kind":"procedure","params":2,"steps":[[378,"call","IsWindowsAuthentication",0]]},{"name":"GetIdByName","line":397,"kind":"procedure","params":1,"steps":[[401,"call","TryGetIdByName",2]]},{"name":"TryGetIdByName","line":408,"kind":"procedure","params":2,"steps":[[410,"call","IsWindowsAuthentication",0],[414,"ext","codeunit",9012,"GetFirstGroupIdWithName",1]]},{"name":"TryGetEntraGroupMembers","line":420,"kind":"procedure","access":"local","params":3,"steps":[[426,"ext","codeunit",9012,"GetMemberIdsPageForGroupId",3],[437,"call","GetName",2],[438,"write",9021,"Insert"]]},{"name":"ValidateWindowsGroup","line":444,"kind":"procedure","access":"local","params":1,"steps":[[460,"call","GetDisallowedWindowsGroupIds",0]]},{"name":"ValidateEntraGroup","line":478,"kind":"procedure","access":"local","params":1,"steps":[[483,"call","TryGetNameById",2],[486,"call","RemoveOrphanedEntraGroups",0]]},{"name":"FetchAllEntraGroups","line":492,"kind":"procedure","access":"local","params":0,"steps":[[498,"ext","codeunit",9012,"GetGroups",0]]},{"name":"IsWindowsAuthentication","line":502,"kind":"procedure","params":0,"steps":[[508,"event","OnIsWindowsAuthentication",0]]},{"name":"TryGetWindowsGroupMembers","line":515,"kind":"procedure","access":"local","params":3,"steps":[[529,"write",9021,"Insert"]]},{"name":"SendNotificationForDeletedGroups","line":534,"kind":"procedure","params":1,"steps":[[554,"call","IsWindowsAuthentication",0],[559,"call","IsWindowsAuthentication",0]]},{"name":"GetDesirableCode","line":569,"kind":"procedure","params":1,"steps":[[573,"call","IsWindowsAuthentication",0]]},{"name":"RemoveOrphanedEntraGroups","line":588,"kind":"procedure","access":"local","params":0,"steps":[[609,"write",2000000120,"Delete",1]]}]}