---
title: "Codeunit 9017 Azure AD User Mgmt. Impl., extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/points/
object: https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/
app: "System Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
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/"
---

# Codeunit 9017 Azure AD User Mgmt. Impl., extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/points/

13 procedures and triggers with a step in src/System Application/App/Azure AD User Management/src/AzureADUserMgmtImpl.Codeunit.al, in source order, read from the text, not from a run.

## OnRun

[Line 24](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L24), trigger.

- [26](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L26) calls [Codeunit 4030 Client Type Management](https://jonas-paprotka.de/ref/codeunit/4030-client-type-management/) `GetCurrentClientType`
- [29](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L29) calls `Run`

## Run

[Line 55](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L55).

- [61](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L61) calls [Codeunit 457 Environment Information](https://jonas-paprotka.de/ref/codeunit/457-environment-information/) `IsSaaS`
- [64](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L64) calls [Codeunit 9026 User Login Time Tracker](https://jonas-paprotka.de/ref/codeunit/9026-user-login-time-tracker/) `UserLoggedInEnvironment`
- [67](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L67) calls [Codeunit 9024 Azure AD Graph User](https://jonas-paprotka.de/ref/codeunit/9024-azure-ad-graph-user/) `IsUserDelegatedAdmin`
- [67](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L67) calls [Codeunit 9024 Azure AD Graph User](https://jonas-paprotka.de/ref/codeunit/9024-azure-ad-graph-user/) `IsUserDelegatedHelpdesk`
- [68](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L68) calls [Codeunit 9016 Azure AD Plan](https://jonas-paprotka.de/ref/codeunit/9016-azure-ad-plan/) `AssignPlanToUserWithDelegatedRole`
- [81](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L81) calls [Codeunit 9016 Azure AD Plan](https://jonas-paprotka.de/ref/codeunit/9016-azure-ad-plan/) `DoesUserHavePlans`
- [84](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L84) calls [Codeunit 9016 Azure AD Plan](https://jonas-paprotka.de/ref/codeunit/9016-azure-ad-plan/) `RefreshUserPlanAssignments`

## CreateNewUsersFromAzureAD

[Line 88](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L88).

- [98](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L98) calls [Codeunit 9012 Azure AD Graph](https://jonas-paprotka.de/ref/codeunit/9012-azure-ad-graph/) `GetUsersPage`
- [109](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L109) calls [Codeunit 9024 Azure AD Graph User](https://jonas-paprotka.de/ref/codeunit/9024-azure-ad-graph-user/) `GetUser`
- [117](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L117) calls `CreateNewUserFromGraphUser`

## CreateNewUserFromGraphUser

[Line 129](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L129).

- [133](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L133) calls [Codeunit 9016 Azure AD Plan](https://jonas-paprotka.de/ref/codeunit/9016-azure-ad-plan/) `IsGraphUserEntitledFromServicePlan`
- [134](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L134) calls `CreateNewUserInternal`
- [138](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L138) calls `InitializeAsNewUser`

## CreateNewUserInternal

[Line 146](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L146).

- [152](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L152) calls [Codeunit 9024 Azure AD Graph User](https://jonas-paprotka.de/ref/codeunit/9024-azure-ad-graph-user/) `EnsureAuthenticationEmailIsNotInUse`
- [155](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L155) raises `OnBeforeCreateUserFromAzureADObjectId`

## IsUserTenantAdmin

[Line 163](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L163).

- [169](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L169) raises `OnIsUserTenantAdmin`
- [174](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L174) calls [Codeunit 9024 Azure AD Graph User](https://jonas-paprotka.de/ref/codeunit/9024-azure-ad-graph-user/) `GetGraphUser`

## UpdateUserFromAzureGraph

[Line 197](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L197), local.

- [201](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L201) calls [Codeunit 9024 Azure AD Graph User](https://jonas-paprotka.de/ref/codeunit/9024-azure-ad-graph-user/) `GetGraphUser`
- [202](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L202) calls [Codeunit 9024 Azure AD Graph User](https://jonas-paprotka.de/ref/codeunit/9024-azure-ad-graph-user/) `UpdateUserFromAzureGraph`

## IsUserDelegated

[Line 207](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L207).

- [211](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L211) calls [Codeunit 9016 Azure AD Plan](https://jonas-paprotka.de/ref/codeunit/9016-azure-ad-plan/) `IsPlanAssignedToUser`
- [211](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L211) calls [Codeunit 9027 Plan Ids](https://jonas-paprotka.de/ref/codeunit/9027-plan-ids/) `GetDelegatedAdminPlanId`
- [212](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L212) calls [Codeunit 9016 Azure AD Plan](https://jonas-paprotka.de/ref/codeunit/9016-azure-ad-plan/) `IsPlanAssignedToUser`
- [212](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L212) calls [Codeunit 9027 Plan Ids](https://jonas-paprotka.de/ref/codeunit/9027-plan-ids/) `GetHelpDeskPlanId`
- [213](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L213) calls [Codeunit 9016 Azure AD Plan](https://jonas-paprotka.de/ref/codeunit/9016-azure-ad-plan/) `IsPlanAssignedToUser`
- [213](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L213) calls [Codeunit 9027 Plan Ids](https://jonas-paprotka.de/ref/codeunit/9027-plan-ids/) `GetD365AdminPartnerPlanId`
- [214](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L214) calls [Codeunit 9016 Azure AD Plan](https://jonas-paprotka.de/ref/codeunit/9016-azure-ad-plan/) `IsPlanAssignedToUser`
- [214](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L214) calls [Codeunit 9027 Plan Ids](https://jonas-paprotka.de/ref/codeunit/9027-plan-ids/) `GetDelegatedBCAdminPlanId`

## InitializeAsNewUser

[Line 218](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L218), local.

- [224](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L224) calls `UpdateUserFromAzureGraph`
- [225](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L225) calls [Codeunit 9016 Azure AD Plan](https://jonas-paprotka.de/ref/codeunit/9016-azure-ad-plan/) `UpdateUserPlans`

## SynchronizeLicensedUserFromDirectory

[Line 229](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L229).

- [234](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L234) calls [Codeunit 9012 Azure AD Graph](https://jonas-paprotka.de/ref/codeunit/9012-azure-ad-graph/) `GetUser`
- [238](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L238) calls [Codeunit 9024 Azure AD Graph User](https://jonas-paprotka.de/ref/codeunit/9024-azure-ad-graph-user/) `GetUser`
- [239](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L239) calls `UpdateUserFromAzureGraph`
- [240](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L240) calls [Codeunit 9016 Azure AD Plan](https://jonas-paprotka.de/ref/codeunit/9016-azure-ad-plan/) `UpdateUserPlans`
- [242](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L242) calls `CreateNewUserFromGraphUser`

## SynchronizeAllLicensedUsersFromDirectory

[Line 248](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L248).

- [250](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L250) calls `CreateNewUsersFromAzureAD`

## OnBeforeDeleteUser

[Line 254](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L254), local.

- [262](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L262) calls [Codeunit 9026 User Login Time Tracker](https://jonas-paprotka.de/ref/codeunit/9026-user-login-time-tracker/) `UserLoggedInEnvironment`
- [268](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L268) writes [Table 2000000073 User Personalization](https://jonas-paprotka.de/ref/table/2000000073-user-personalization/) Delete

## ArePermissionsCustomized

[Line 271](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L271).

- [286](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L286) calls [Codeunit 9825 Plan Configuration](https://jonas-paprotka.de/ref/codeunit/9825-plan-configuration/) `IsCustomized`
- [287](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L287) calls [Codeunit 9825 Plan Configuration](https://jonas-paprotka.de/ref/codeunit/9825-plan-configuration/) `GetCustomPermissions`
- [289](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L289) calls [Codeunit 9825 Plan Configuration](https://jonas-paprotka.de/ref/codeunit/9825-plan-configuration/) `GetDefaultPermissions`
- [298](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L298) calls [Codeunit 9825 Plan Configuration](https://jonas-paprotka.de/ref/codeunit/9825-plan-configuration/) `IsCustomized`
- [306](https://jonas-paprotka.de/ref/codeunit/9017-azure-ad-user-mgmt-impl/source/#L306) writes [Table 2000000053 Access Control](https://jonas-paprotka.de/ref/table/2000000053-access-control/) Insert

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
