---
id: object/codeunit/9010
type: object
title: Codeunit 9010 "Azure AD User Management"
summary: Codeunit 9010 "Azure AD User Management" in System Application (System.Azure.Identity). 7 public procedures, 1 events. Present since at least BC23, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: null
  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: e18e13cfd9003a2d7f5578bd08801d1d5ca88ef51945225b34ee4712ea580245
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Azure%20AD%20User%20Management/src/AzureADUserManagement.Codeunit.al
    title: src/System Application/App/Azure AD User Management/src/AzureADUserManagement.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: 9010
name: Azure AD User Management
namespace: System.Azure.Identity
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 8
  events: 1
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 7
  implements: 0
---

# Codeunit 9010 "Azure AD User Management"

> Codeunit 9010 "Azure AD User Management" in System Application (System.Azure.Identity). 7 public procedures, 1 events. Present since at least BC23, still in BC30.

System Application · System.Azure.Identity · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Azure%20AD%20User%20Management/src/AzureADUserManagement.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |

## Events published

- `OnRestoreDefaultPermissions(UserSecurityID: Guid)` (integration): Integration event, raised from "Azure AD User Update Wizard" page when the changes are applied.

## Procedures

- `CreateNewUsersFromAzureAD()`: Retrieves all the users from Microsoft Entra. If the users already exist in the database, they are updated to match the ones from Microsoft Entra; otherwise new users are inserted in the database.
- `CreateNewUserFromGraphUser(GraphUserInfo: DotNet UserInfo)`: Creates a new user from a Microsoft Entra user.
- `SynchronizeLicensedUserFromDirectory(AuthenticationEmail: Text): Boolean`: Synchronizes a user with the Microsoft Entra user corresponding to the authentication email that is passed as a parameter. If the user record does not exist, it gets created.
- `SynchronizeAllLicensedUsersFromDirectory()`: Synchronizes all the users from the database with the ones from Microsoft Entra. Microsoft Entra users that do not exist in the database are created.
- `IsUserTenantAdmin(): Boolean`: Checks if the user is a tenant admin.
- `ArePermissionsCustomized(UserSecurityId: Guid): Boolean`: Checks whether custom permissions are assigned to the user.
- `IsUserDelegated(UserSecID: Guid): Boolean`: Checks if the user is a delegated user.

## Triggers

OnRun

## 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 9017 "Azure AD User Mgmt. Impl."](../codeunit/9017.md) (8 calls: `ArePermissionsCustomized → ArePermissionsCustomized`, `CreateNewUserFromGraphUser → CreateNewUserFromGraphUser`, `CreateNewUsersFromAzureAD → CreateNewUsersFromAzureAD`, …)

## Called by

- [Codeunit 1432 "Satisfaction Survey Impl."](../codeunit/1432.md) (1 call: `CheckExternalUser → IsUserDelegated`)
- [Codeunit 151 "System Initialization Impl."](../codeunit/151.md) (1 call: `Init → (object)`)
- [Codeunit 30004 "APIV2 - Aut. Create New Users"](../codeunit/30004.md) (1 call: `OnRun → CreateNewUsersFromAzureAD`)
- [Codeunit 9033 "Invite External Accountant"](../codeunit/9033.md) (1 call: `CreateNewUser → CreateNewUserFromGraphUser`)
- [Codeunit 9175 "User Settings Impl."](../codeunit/9175.md) (1 call: `CheckPermissionsInternal → IsUserTenantAdmin`)
- [Codeunit 9561 "Document Sharing Impl."](../codeunit/9561.md) (1 call: `ShareEnabled → IsUserDelegated`)
- [Page 3845 "Scheduled Tasks"](../page/3845.md) (1 call: `OnOpenPage → IsUserTenantAdmin`)

## Across versions

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

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: "Azure AD User Management")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
