---
title: "Codeunit 6303 Azure AD Auth Flow, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/points/
object: https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/
app: "Base Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/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 6303 Azure AD Auth Flow, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/points/

14 procedures and triggers with a step in src/Layers/W1/BaseApp/Modules/System/AzureADAuthentication/AzureADAuthFlow.Codeunit.al, in source order, read from the text, not from a run.

## Initialize

[Line 41](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L41).

- [48](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L48) calls `CanHandle`
- [51](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L51) raises `OnInitialize`

## AcquireTokenByAuthorizationCodeAsSecretText

[Line 56](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L56).

- [60](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L60) calls `CheckProvider`
- [61](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L61) calls `CanHandle`
- [64](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L64) raises `OnAcquireTokenByAuthorizationCode`

## AcquireTokenByAuthorizationCodeWithCredentialsAsSecretText

[Line 71](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L71).

- [75](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L75) calls `CheckProvider`
- [76](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L76) calls `CanHandle`
- [79](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L79) raises `OnAcquireTokenByAuthorizationCodeWithCredentials`

## AcquireTokenFromCacheAsSecretText

[Line 85](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L85).

- [90](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L90) calls `CheckProvider`
- [91](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L91) calls `CanHandle`
- [94](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L94) raises `OnAcquireTokenFromCache`

## AcquireTokenFromCacheState

[Line 101](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L101).

- [103](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L103) calls `CheckProvider`
- [104](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L104) calls `CanHandle`
- [107](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L107) raises `OnAcquireTokenFromCacheState`

## AcquireGuestToken

[Line 112](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L112).

- [114](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L114) calls `CheckProvider`
- [115](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L115) calls `CanHandle`
- [118](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L118) raises `OnAcquireGuestToken`

## AcquireOnBehalfOfTokenAsSecretText

[Line 122](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L122).

- [127](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L127) calls `CheckProvider`
- [128](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L128) calls `CanHandle`
- [131](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L131) raises `OnAcquireAcquireOnBehalfOfToken`

## AcquireOnBehalfOfTokenAndTokenCacheState

[Line 138](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L138).

- [140](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L140) calls `CheckProvider`
- [141](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L141) calls `CanHandle`
- [144](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L144) raises `OnAcquireOnBehalfOfTokenAndTokenCacheState`

## AcquireTokenFromCacheWithCredentialsAsSecretText

[Line 149](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L149).

- [153](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L153) calls `CheckProvider`
- [154](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L154) calls `CanHandle`
- [157](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L157) raises `OnAcquireTokenFromCacheWithCredentials`

## AcquireApplicationToken

[Line 164](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L164).

- [166](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L166) calls `CheckProvider`

## GetSaasClientId

[Line 172](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L172).

- [174](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L174) calls `CheckProvider`
- [175](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L175) calls `CanHandle`
- [178](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L178) raises `OnGetSaasClientId`

## GetInitialTenantDomainName

[Line 182](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L182).

- [184](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L184) calls `CheckProvider`
- [185](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L185) calls `CanHandle`

## CreateExchangeServiceWrapperWithToken

[Line 191](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L191).

- [195](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L195) calls `CanHandle`
- [198](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L198) raises `OnCreateExchangeServiceWrapperWithToken`

## CheckProvider

[Line 209](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L209), local.

- [213](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L213) calls `CanHandle`
- [216](https://jonas-paprotka.de/ref/codeunit/6303-azure-ad-auth-flow/source/#L216) raises `OnCheckProvider`

## Source

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

JOP-AL, 2026-11-20.
