---
title: "Codeunit 6300 Azure AD Mgt."
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/6300-azure-ad-mgt/
type: codeunit
id: 6300
name: "Azure AD Mgt."
app: "Base Application"
namespace: System.Azure.Identity
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/6300-azure-ad-mgt/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 6300 Azure AD Mgt.

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/6300-azure-ad-mgt/

| | |
| --- | --- |
| App | Base Application |
| Namespace | System.Azure.Identity |
| Versions | 17-28 |
| Source file | Modules/System/AzureADAuthentication/AzureADMgt.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| GetAuthCodeUrl | (Text) | Text | public | 17-28 | - | - |
| GetAccessToken | (Text, Text, Boolean) | Text | public | 17-27 | Pending 25.0 | Replaced by GetAccessTokenAsSecretText |
| GetGuestAccessToken | (Text, Text) | Text | public | 17-28 | - | - |
| GetOnBehalfAccessToken | (Text) | Text | public | 17-27 | Pending 25.0 | Replaced by GetOnBehalfAccessTokenAsSecretText(ResourceUrl: Text): SecretText |
| GetOnBehalfAccessTokenAndTokenCacheState | (Text, var Text) | Text | public | 17-28 | - | - |
| GetTokenFromTokenCacheState | (Text, Text, Text, var Text) | Text | public | 17-28 | - | - |
| GetAzureADAuthEndpoint | () | Text | public | 17-28 | - | - |
| GetDefaultRedirectUrl | () | Text[150] | public | 17-28 | - | - |
| GetRedirectUrl | () | Text[150] | public | 17-28 | - | - |
| GetO365Resource | () | Text | public | 17-28 | - | - |
| GetO365ResourceName | () | Text | public | 17-28 | - | - |
| IsSaaS | () | Boolean | public | 17-28 | - | - |
| GetInitialTenantDomainName | () | Text | public | 17-28 | - | - |
| IsAzureADAppSetupDone | () | Boolean | public | 17-28 | - | - |
| CreateAssistedSetup | () | - | public | 17-18 | Pending 16.0 | To add the record "Azure AD App Setup Wizard" in the Assisted Setup table use the method Add provided in the Assisted Setup codeunit |
| CreateExchangeServiceWrapperWithToken | (Text, var DotNet ExchangeServiceWrapper) | - | public | 17-27 | Pending 25.0 | Replaced by CreateExchangeServiceWrapperWithToken(Token: SecretText; var Service: DotNet ExchangeServiceWrapper) |
| AcquireTokenByAuthorizationCode | (Text, Text) | Text | public | 18-27 | Pending 25.0 | Replaced by AcquireTokenByAuthorizationCodeAsSecretText |
| GetLastErrorMessage | () | Text | public | 20-28 | - | - |
| AcquireTokenByAuthorizationCodeAsSecretText | (SecretText, Text) | SecretText | public | 25-28 | - | - |
| GetAccessTokenAsSecretText | (Text, Text, Boolean) | SecretText | public | 25-28 | - | - |
| GetOnBehalfAccessTokenAsSecretText | (Text) | SecretText | public | 25-28 | - | - |
| CreateExchangeServiceWrapperWithToken | (SecretText, var DotNet ExchangeServiceWrapper) | - | public | 25-28 | - | - |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
