---
title: "Codeunit 9002 Permission Manager"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/9002-permission-manager/
type: codeunit
id: 9002
name: "Permission Manager"
app: "Base Application"
namespace: System.Security.AccessControl
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/9002-permission-manager/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 9002 Permission Manager

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/9002-permission-manager/

| | |
| --- | --- |
| App | Base Application |
| Namespace | System.Security.AccessControl |
| Versions | 17-28 |
| Source file | Modules/System/PermissionSets/PermissionManager.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| AddUserToUserGroup | (Guid, Code[20], Text[30]) | - | public | 17-24 | Pending 22.0 | User groups are replaced with security groups, where group membership is specified in M365 admin portal. |
| AddUserToDefaultUserGroups | (Guid) | Boolean | public | 17-24 | Pending 22.0 | Replaced with the AssignDefaultPermissionsToUser procedure. |
| AddUserToDefaultUserGroupsForCompany | (Guid, Text[30]) | Boolean | public | 17-24 | Pending 22.0 | Replaced with the AssignDefaultPermissionsToUser procedure. |
| ResetUserToDefaultUserGroups | (Guid) | - | public | 17-24 | Pending 22.0 | Replaced with the ResetUserToDefaultPermissions procedure. |
| GetOfficePortalUserAdminUrl | () | Text | public | 17-28 | - | - |
| UpdateUserAccessForSaaS | (Guid) | Boolean | public | 17-28 | - | - |
| AddUserGroupFromExtension | (Code[20], Code[20], Guid) | - | public | 17-24 | Pending 22.0 | User groups are replaced with security groups, use the method Add on the Security Group codeunit. |
| GetDefaultProfileID | (Guid, var Record All Profile) | - | public | 17-28 | Pending 26.0 | This procedure has been moved into codeunit "Conf./Personalization Mgt." |
| CanCurrentUserManagePlansAndGroups | () | Boolean | public | 17-28 | - | - |
| CanManageUsersOnTenant | (Guid) | Boolean | public | 17-18 | Pending 16.0 | Procedure is now part of codeunit User Permissions (System Application) |
| GenerateHashForPermissionSet | (Code[20]) | Text[250] | public | 17-22 | - | - |
| UpdateHashForPermissionSet | (Code[20]) | - | public | 17-20 | Pending 18.0 | The Permission Set table will be read only in the new permission system. The hash is no longer stored but recalculates every time. |
| IsFirstPermissionHigherThanSecond | (Option, Option) | Boolean | public | 17-28 | - | - |
| ResetUsersToIntelligentCloudUserGroup | () | - | public | 17-24 | Pending 22.0 | Use the ResetUsersToIntelligentCloud procedure instead. |
| IsIntelligentCloud | () | Boolean | public | 17-28 | - | - |
| SetTestabilityIntelligentCloud | (Boolean) | - | public | 17-28 | - | - |
| CheckCurrentUserCanModifyUser | (var Record User, var Record User, Boolean) | - | public | 17-28 | - | - |
| AssignDefaultPermissionsToUser | (Guid) | Boolean | public | 22-28 | - | - |
| AssignDefaultPermissionsToUser | (Guid, Text[30]) | Boolean | public | 22-28 | - | - |
| ResetUserToDefaultPermissions | (Guid) | - | public | 22-28 | - | - |
| ResetUsersToIntelligentCloudPermissions | () | - | public | 22-28 | - | - |
| GenerateHashForPermissionSet | (Code[30]) | Text[250] | public | 23-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAssignCustomPermissionsToUser | (Guid, Guid, var Boolean) | 20-24 | Pending 22.0 | Custom permissions are handled within BaseApp and System Application. |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
