---
id: object/codeunit/9018
type: object
title: Codeunit 9018 "Azure AD Plan Impl."
summary: Codeunit 9018 "Azure AD Plan Impl." in System Application (System.Azure.Identity). 26 public procedures, 2 events, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC24, BC28-29.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: "29"
  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: 7c85c2deb18cdbe3261bbd5cb4c1ee5e52c40e5be100749dfafa6e23e16c0fd8
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Azure%20AD%20Plan/src/AzureADPlanImpl.Codeunit.al
    title: src/System Application/App/Azure AD Plan/src/AzureADPlanImpl.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/9717
object_type: codeunit
object_id: 9018
name: Azure AD Plan Impl.
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:
  - "24"
  - "28"
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 46
  events: 2
  subscribers: 1
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 9
  called_by: 1
  implements: 0
---

# Codeunit 9018 "Azure AD Plan Impl."

> Codeunit 9018 "Azure AD Plan Impl." in System Application (System.Azure.Identity). 26 public procedures, 2 events, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC24, BC28-29.

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

## Properties

| Property | Value |
|---|---|
| Access | Internal |
| Permissions | tabledata Company = r, tabledata Plan = rimd, tabledata User = r, tabledata "User Personalization" = rm, tabledata "User Plan" = rimd |

## Events published

- `OnBeforeIsBcServicePlan(var Skip: Boolean)` (internal)
- `OnInitializeRoleCenter(var RoleCenterId: Integer; var Handled: Boolean)` (internal)

## Event subscriptions

- OnAfterDeleteUser subscribes to Table "User" OnAfterDeleteEvent

## Procedures

- `IsPlanAssigned(PlanGUID: Guid): Boolean`
- `IsPlanAssignedToUser(PlanGUID: Guid): Boolean`
- `IsPlanAssignedToUser(PlanGUID: Guid; UserGUID: Guid): Boolean`
- `IsGraphUserEntitledFromServicePlan(var GraphUserInfo: DotNet UserInfo): Boolean`
- `UpdateUserPlans(UserSecurityId: Guid; var GraphUserInfo: DotNet UserInfo; AppendPermissionsOnNewPlan: Boolean; RemovePermissionsOnDeletePlan: Boolean)`
- `UpdateUserPlans(UserSecurityId: Guid; AppendPermissionsOnNewPlan: Boolean; RemovePermissionsOnDeletePlan: Boolean; RemovePlansOnDeleteUser: Boolean)`
- `UpdateUserPlans()`
- `RefreshUserPlanAssignments(UserSecurityID: Guid)`
- `TryGetAzureUserPlanRoleCenterId(var RoleCenterID: Integer; UserSecurityID: Guid)`
- `DoPlansExist(): Boolean`
- `DoUserPlansExist(): Boolean`
- `DoesPlanExist(PlanGUID: Guid): Boolean`
- `DoesUserHavePlans(UserSecurityId: Guid): Boolean`
- `GetAvailablePlansCount(): Integer`
- `GetAllPlanIds(): List of [Guid]`
- `GetUserPlanExperience(): Enum "User Plan Experience"`
- `CheckMixedPlansExist(): Boolean`
- `CheckMixedPlansExist(PlanNamesPerUserFromGraph: Dictionary of [Text, List of [Text]]): Boolean`
- `MixedPlansExist(): Boolean`
- `MixedPlansExist(PlanNamesPerUserFromGraph: Dictionary of [Text, List of [Text]]): Boolean`
- `IsBCServicePlan(ServicePlanId: Guid): Boolean`
- `AssignPlanToUserWithDelegatedRole(UserSID: Guid; SkipUpdateUserAccess: Boolean)`
- `GetPlanIDs(GraphUserInfo: DotNet UserInfo; var PlanIDs: List of [Guid])`
- `GetPlanNames(GraphUserInfo: DotNet UserInfo; var PlanNames: List of [Text])`
- `GetPlanNames(UserSecID: Guid; var PlanNames: List of [Text])`
- `CheckIfPlansDifferent(GraphUserInfo: DotNet UserInfo; UserSecID: Guid): Boolean`

Plus 17 local procedures.

## 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 9027 "Plan Ids"](../codeunit/9027.md) (23 calls: `AssignPlanToUserWithDelegatedRole → GetDelegatedAdminPlanId`, `AssignPlanToUserWithDelegatedRole → GetHelpDeskPlanId`, `GetDevicesPlanInfo → GetDevicePlanId`, …)
- [Codeunit 9024 "Azure AD Graph User"](../codeunit/9024.md) (8 calls: `AssignPlanToUserWithDelegatedRole → IsUserDelegatedAdmin`, `AssignPlanToUserWithDelegatedRole → IsUserDelegatedHelpdesk`, `GetAuthenticationEmailFromAuthenticationObjectID → GetAuthenticationEmail`, …)
- [Codeunit 9012 "Azure AD Graph"](../codeunit/9012.md) (6 calls: `GetAuthenticationEmailFromAuthenticationObjectID → GetUserByObjectId`, `GetGraphUserPlans → GetEnvironmentSecurityGroupId`, `GetGraphUserPlans → IsEnvironmentSecurityGroupDefined`, …)
- [Codeunit 9822 "Plan Configuration Impl."](../codeunit/9822.md) (4 calls: `AddNewlyAssignedUserPlans → ConfigurationContainsSuper`, `AddNewlyAssignedUserPlans → IsCustomized`, `AssignPlanToUserWithDelegatedRole → ConfigurationContainsSuper`, …)
- [Codeunit 9825 "Plan Configuration"](../codeunit/9825.md) (3 calls: `RemoveUnassignedUserPlans → IsCustomized`, `RemoveUnassignedUserPlans → RemoveCustomPermissionsFromUser`, `RemoveUnassignedUserPlans → RemoveDefaultPermissionsFromUser`)
- [Codeunit 152 "User Permissions"](../codeunit/152.md) (2 calls: `AddNewlyAssignedUserPlans → RemoveSuperPermissions`, `AssignPlanToUserWithDelegatedRole → RemoveSuperPermissions`)
- [Codeunit 9016 "Azure AD Plan"](../codeunit/9016.md) (2 calls: `AddNewlyAssignedUserPlans → OnUpdateUserAccessForSaaS`, `AssignPlanToUserWithDelegatedRole → OnUpdateUserAccessForSaaS`)
- [Codeunit 457 "Environment Information"](../codeunit/457.md) (1 call: `ShouldCheckMixedPlans → IsSaaS`)
- [Codeunit 9026 "User Login Time Tracker"](../codeunit/9026.md) (1 call: `UpdateUserPlans → UserLoggedInEnvironment`)

## Called by

- [Codeunit 9016 "Azure AD Plan"](../codeunit/9016.md) (20 calls: `AssignPlanToUserWithDelegatedRole → AssignPlanToUserWithDelegatedRole`, `CheckIfPlansDifferent → CheckIfPlansDifferent`, `CheckMixedPlansExist → CheckMixedPlansExist`, …)

## Recent changes

- 2026-07-29 [#9717 Fix internal admin losing SUPER during customized plan provisioning](../../changes/bcapps/9717.md) (main, BC30, fix)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24, BC28-29

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 Plan Impl.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
