---
id: object/codeunit/104061
type: object
title: Codeunit 104061 "Upgrade User Groups"
summary: Codeunit 104061 "Upgrade User Groups" in Base Application (System.Security.AccessControl). 3 public procedures, 2 events. Present since at least BC23, still in BC30, changed in BC25.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "25"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 43f62ebc98142489b92cb94c8f11617e0f0432c1ac2ce2507eba7fbd8a2a3700
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/UserGroups/Transition/UpgradeUserGroups.Codeunit.al
    title: src/Layers/W1/BaseApp/System/UserGroups/Transition/UpgradeUserGroups.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 104061
name: Upgrade User Groups
namespace: System.Security.AccessControl
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 9
  events: 2
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 1
  calls: 7
  called_by: 1
  implements: 0
---

# Codeunit 104061 "Upgrade User Groups"

> Codeunit 104061 "Upgrade User Groups" in Base Application (System.Security.AccessControl). 3 public procedures, 2 events. Present since at least BC23, still in BC30, changed in BC25.

Base Application · System.Security.AccessControl · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/UserGroups/Transition/UpgradeUserGroups.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Subtype | Upgrade |

## Events published

- `OnMigrateUserGroups()` (integration)
  - subscribers: [Codeunit 9032 "Upgrade Custom User Groups"](../codeunit/9032.md) TransferCustomPermissionsPerPlan
- `OnBeforeUpgradeUserGroups()` (integration)

## Procedures

- `IsUserGroupObsoleteStateRemoved(): Boolean` (internal)
- `RunUpgrade()` (internal)
- `MigrateUserGroups(UserGroupsToConvert: List of [Code[20]])` (internal)

Plus 4 local procedures.

## Triggers

OnUpgradePerDatabase

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 104030 "Upgrade Plan Permissions"](../codeunit/104030.md) (2 calls: `CreateTenantPermissionSetsForSelectedGroups → ReplaceUserGroupPermissionSets`, `RunUpgrade → RunUpgrade`)
- [Codeunit 9999 "Upgrade Tag"](../codeunit/9999.md) (2 calls: `OnUpgradePerDatabase → HasUpgradeTag`, `OnUpgradePerDatabase → SetUpgradeTag`)
- [Codeunit 104042 "Upgrade Permission Sets"](../codeunit/104042.md) (1 call: `RunUpgrade → RunUpgrade`)
- [Codeunit 104060 "Upgrade App ID Permissions"](../codeunit/104060.md) (1 call: `RunUpgrade → RunUpgrade`)
- [Codeunit 6060 "Hybrid Deployment"](../codeunit/6060.md) (1 call: `OnUpgradePerDatabase → VerifyCanStartUpgrade`)
- [Codeunit 9825 "Plan Configuration"](../codeunit/9825.md) (1 call: `TransferDefaultPermissionsPerPlan → AddDefaultPermissionSetToPlan`)
- [Codeunit 9998 "Upgrade Tag Definitions"](../codeunit/9998.md) (1 call: `OnUpgradePerDatabase → GetUserGroupsMigrationUpgradeTag`)

## Called by

- [Codeunit 104030 "Upgrade Plan Permissions"](../codeunit/104030.md) (2 calls: `RunUserGroupUpgrade → IsUserGroupObsoleteStateRemoved`, `SetAutomateActionPermissions → IsUserGroupObsoleteStateRemoved`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC25

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Upgrade User Groups")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
