---
id: object/codeunit/6700
type: object
title: Codeunit 6700 "O365 Sync. Management"
summary: Codeunit 6700 "O365 Sync. Management" in Base Application. 16 public procedures, 1 events, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC25, BC28. Obsolete (Pending since 28.0).
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "28"
  deprecated: "28.0"
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: bf6d3a149571130538b2d5ee6d2c7435a1b9a346b9283f730b8e92a27a928c21
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/O365SyncManagement.Codeunit.al
    title: src/Layers/W1/BaseApp/O365SyncManagement.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: 6700
name: O365 Sync. Management
namespace: null
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
  - "28"
source_major: "29"
obsolete:
  state: Pending
  tag: "28.0"
  reason: Contact sync has been moved to the assisted setup experience with the new Graph-based implementation.
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 32
  events: 1
  subscribers: 1
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 7
  called_by: 8
  implements: 0
---

# Codeunit 6700 "O365 Sync. Management"

> Codeunit 6700 "O365 Sync. Management" in Base Application. 16 public procedures, 1 events, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC25, BC28. Obsolete (Pending since 28.0).

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

## Properties

| Property | Value |
|---|---|
| ObsoleteState | Pending |
| ObsoleteTag | 28.0 |
| ObsoleteReason | Contact sync has been moved to the assisted setup experience with the new Graph-based implementation. |

## Events published

- `OnBeforeOnRun(var IsHandled: Boolean)` (integration)

## Event subscriptions

- SetupContactSyncJobQueue subscribes to Codeunit "Company-Initialize" OnCompanyInitialize

## Procedures

- `GetBookingMailboxes(BookingSync: Record "Booking Sync"; var TempBookingMailbox: Record "Booking Mailbox" temporary; MailboxName: Text)`
- `CreateExchangeConnection(var ExchangeSync: Record "Exchange Sync"): Boolean`
- `IsO365Setup(AddOnTheFly: Boolean): Boolean`
- `OpenSetupWindow(): Boolean`
- `SyncBookingCustomers(var BookingSync: Record "Booking Sync")` (obsolete 28.0: Deprecated not in use -Booking sync setup)
- `SyncBookingServices(var BookingSync: Record "Booking Sync")`
- `SyncExchangeContacts(ExchangeSync: Record "Exchange Sync"; FullSync: Boolean)`
- `LogActivityFailed(RecordID: Variant; UserID: Code[50]; ActivityDescription: Text; ActivityMessage: Text)`
- `BuildBookingsConnectionStringAsSecretText(var BookingSync: Record "Booking Sync"): SecretText`
- `BuildExchangeConnectionStringAsSecretText(var ExchangeSync: Record "Exchange Sync"): SecretText`
- `RegisterBookingsConnection(BookingSync: Record "Booking Sync")`
- `RegisterExchangeConnection(ExchangeSync: Record "Exchange Sync")`
- `TraceCategory(): Text`
- `ValidateExchangeConnection(AuthenticationEmail: Text[250]; var ExchangeSync: Record "Exchange Sync"): Boolean`
- `ShowProgress(Message: Text)`
- `CloseProgress()`

Plus 14 local procedures.

## 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 6300 "Azure AD Mgt."](../codeunit/6300.md) (3 calls: `GetPasswordOrToken → GetAccessTokenAsSecretText`, `GetPasswordOrToken → GetO365Resource`, `GetPasswordOrToken → GetO365ResourceName`)
- [Codeunit 6703 "Exchange Contact Sync."](../codeunit/6703.md) (2 calls: `OnRun → (object)`, `SyncExchangeContacts → SyncRecords`)
- [Codeunit 6704 "Booking Customer Sync."](../codeunit/6704.md) (2 calls: `OnRun → (object)`, `SyncBookingCustomers → SyncRecords`)
- [Codeunit 6705 "Booking Service Sync."](../codeunit/6705.md) (2 calls: `OnRun → (object)`, `SyncBookingServices → SyncRecords`)
- [Codeunit 1293 "Isolated Storage Management"](../codeunit/1293.md) (1 call: `GetPasswordOrToken → Get`)
- [Codeunit 453 "Job Queue - Enqueue"](../codeunit/453.md) (1 call: `SetupContactSyncJobQueue → (object)`)
- [Codeunit 5321 "Exchange Web Services Server"](../codeunit/5321.md) (1 call: `ValidateExchangeConnection → InitializeAndValidate`)

## Called by

- [Codeunit 6705 "Booking Service Sync."](../codeunit/6705.md) (8 calls: `GetBookingServices → LogActivityFailed`, `OnRun → SyncBookingServices`, `ProcessBookingServiceRecordSet → LogActivityFailed`, …)
- [Codeunit 6702 "O365 Contact Sync. Helper"](../codeunit/6702.md) (5 calls: `LogFailure → LogActivityFailed`, `LogFailure → TraceCategory`, `ProcessNavContactRecordSet → LogActivityFailed`, …)
- [Codeunit 6703 "Exchange Contact Sync."](../codeunit/6703.md) (5 calls: `OnRun → SyncExchangeContacts`, `ProcessExchangeContactRecordSet → TraceCategory`, `SyncRecords → CloseProgress`, …)
- [Codeunit 6704 "Booking Customer Sync."](../codeunit/6704.md) (4 calls: `OnRun → SyncBookingCustomers`, `SyncRecords → CloseProgress`, `SyncRecords → ShowProgress`, …)
- [Codeunit 6722 "Booking Manager Handler"](../codeunit/6722.md) (3 calls: `OnGetBookingMailboxes → GetBookingMailboxes`, `OnSynchronize → SyncBookingCustomers`, `OnSynchronize → SyncBookingServices`)
- [Page 6702 "Booking Sync. Setup"](../page/6702.md) (2 calls: `CheckExistingSetup → GetBookingMailboxes`, `CheckExistingSetup → IsO365Setup`)
- [Codeunit 6721 "Booking Manager"](../codeunit/6721.md) (1 call: `InvoiceItemsForCustomer → TraceCategory`)
- [Page 6701 "Contact Sync. Setup"](../page/6701.md) (1 call: `OnOpenPage → IsO365Setup`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC25, BC28
- Obsolete: Pending since 28.0, "Contact sync has been moved to the assisted setup experience with the new Graph-based implementation."

## Deprecations

- object: Pending 28.0 (#if not CLEAN28), "Contact sync has been moved to the assisted setup experience with the new Graph-based implementation."
- procedure SyncBookingCustomers: Pending 28.0, "Deprecated not in use -Booking sync setup"

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