---
title: "Codeunit 5323 Exchange Add-in Setup, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/points/
object: https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/
app: "Base Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/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 5323 Exchange Add-in Setup, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/points/

10 procedures and triggers with a step in src/Layers/W1/BaseApp/System/Exchange/ExchangeAddinSetup.Codeunit.al, in source order, read from the text, not from a run.

## Initialize

[Line 57](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L57), local.

- [65](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L65) calls [Codeunit 6300 Azure AD Mgt.](https://jonas-paprotka.de/ref/codeunit/6300-azure-ad-mgt/) `GetAccessTokenAsSecretText`
- [65](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L65) calls [Codeunit 6300 Azure AD Mgt.](https://jonas-paprotka.de/ref/codeunit/6300-azure-ad-mgt/) `GetO365Resource`
- [65](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L65) calls [Codeunit 6300 Azure AD Mgt.](https://jonas-paprotka.de/ref/codeunit/6300-azure-ad-mgt/) `GetO365ResourceName`
- [68](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L68) calls [Codeunit 5321 Exchange Web Services Server](https://jonas-paprotka.de/ref/codeunit/5321-exchange-web-services-server/) `InitializeWithOAuthToken`
- [68](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L68) calls [Codeunit 5321 Exchange Web Services Server](https://jonas-paprotka.de/ref/codeunit/5321-exchange-web-services-server/) `GetEndpoint`
- [69](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L69) calls `ValidateCredentials`
- [76](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L76) calls [Codeunit 5321 Exchange Web Services Server](https://jonas-paprotka.de/ref/codeunit/5321-exchange-web-services-server/) `InitializeWithCertificate`
- [79](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L79) calls [Codeunit 5321 Exchange Web Services Server](https://jonas-paprotka.de/ref/codeunit/5321-exchange-web-services-server/) `SetImpersonatedIdentity`

## InitializeServiceWithCredentials

[Line 87](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L87).

- [101](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L101) calls [Codeunit 5321 Exchange Web Services Server](https://jonas-paprotka.de/ref/codeunit/5321-exchange-web-services-server/) `Initialize`
- [101](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L101) calls [Codeunit 5321 Exchange Web Services Server](https://jonas-paprotka.de/ref/codeunit/5321-exchange-web-services-server/) `GetEndpoint`
- [102](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L102) calls `ValidateCredentials`
- [108](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L108) calls [Codeunit 5321 Exchange Web Services Server](https://jonas-paprotka.de/ref/codeunit/5321-exchange-web-services-server/) `Initialize`
- [108](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L108) calls `ValidateCredentials`

## CredentialsRequired

[Line 123](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L123).

- [125](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L125) calls `Initialize`

## ImpersonateUser

[Line 129](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L129).

- [134](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L134) calls `Initialize`
- [136](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L136) calls [Codeunit 5321 Exchange Web Services Server](https://jonas-paprotka.de/ref/codeunit/5321-exchange-web-services-server/) `SetImpersonatedIdentity`

## SampleEmailsAvailable

[Line 139](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L139).

- [144](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L144) calls [Codeunit 1306 Company Information Mgt.](https://jonas-paprotka.de/ref/codeunit/1306-company-information-mgt/) `IsDemoCompany`
- [144](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L144) calls [Codeunit 457 Environment Information](https://jonas-paprotka.de/ref/codeunit/457-environment-information/) `IsSaaS`

## DeployAddin

[Line 148](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L148).

- [158](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L158) calls [Codeunit 1652 Add-in Manifest Management](https://jonas-paprotka.de/ref/codeunit/1652-add-in-manifest-management/) `GenerateManifest`
- [161](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L161) calls [Codeunit 5321 Exchange Web Services Server](https://jonas-paprotka.de/ref/codeunit/5321-exchange-web-services-server/) `InstallApp`
- [163](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L163) calls [Codeunit 1330 Instruction Mgt.](https://jonas-paprotka.de/ref/codeunit/1330-instruction-mgt/) `OfficeUpdateNotificationCode`
- [165](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L165) writes [Table 1306 User Preference](https://jonas-paprotka.de/ref/table/1306-user-preference/) DeleteAll

## DeployAddins

[Line 169](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L169).

- [171](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L171) calls [Table 1610 Office Add-in](https://jonas-paprotka.de/ref/table/1610-office-add-in/) `GetAddins`
- [173](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L173) calls `DeployAddin`

## TryDeployAddins

[Line 179](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L179).

- [181](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L181) calls `DeployAddins`

## DeploySampleEmails

[Line 185](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L185).

- [206](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L206) calls `GetFromEmail`
- [215](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L215) calls [Codeunit 1655 Office Add-In Sample Emails](https://jonas-paprotka.de/ref/codeunit/1655-office-add-in-sample-emails/) `GetHTMLSampleMsg`
- [216](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L216) calls [Codeunit 5321 Exchange Web Services Server](https://jonas-paprotka.de/ref/codeunit/5321-exchange-web-services-server/) `SaveHTMLEmailToInbox`

## ValidateCredentials

[Line 223](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L223), local.

- [225](https://jonas-paprotka.de/ref/codeunit/5323-exchange-add-in-setup/source/#L225) calls [Codeunit 5321 Exchange Web Services Server](https://jonas-paprotka.de/ref/codeunit/5321-exchange-web-services-server/) `ValidCredentials`

## Source

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

JOP-AL, 2026-11-20.
