Codeunit 4509 "Email - Outlook API Helper"
Email - Outlook REST API · System.Email
Across versions
- BC23-28not present
- BC29-30present
Neighbourhood 11 connected objects and pages
Email - Outlook REST API · System.Email · BC29-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| Permissions | tabledata “Email Inbox” = ri, tabledata “Email - Outlook Account” = rimd |
Events published
OnAfterInitializeClientsV2(var OutlookAPIClient: interface "Email - Outlook API Client v2"; var OAuthClient: interface "Email - OAuth Client v2")(internal)OnAfterInitializeClientsV4(var OutlookAPIClient: interface "Email - Outlook API Client v4"; var OAuthClient: interface "Email - OAuth Client v2")(internal)OnAfterInitializeClientsV5(var OutlookAPIClient: interface "Email - Outlook API Client v5"; var OAuthClient: interface "Email - OAuth Client v2")(internal)OnAfterInitializeClientsV6(var OutlookAPIClient: interface "Email - Outlook API Client v6"; var OAuthClient: interface "Email - OAuth Client v2")(internal)
Event subscriptions
- OnDeleteOutlookAPIAccount subscribes to Table “Email - Outlook API Setup” OnBeforeDeleteEvent
- ClearCompanyConfigGeneral subscribes to Codeunit “Environment Cleanup” OnClearCompanyConfig
Procedures
GetAccounts(Connector: Enum "Email Connector"; var Accounts: Record "Email Account")DeleteAccount(AccountId: Guid): BooleanEmailMessageToJson(EmailMessage: Codeunit "Email Message"; Account: Record "Email - Outlook Account"): JsonObjectEmailMessageToReplyJson(EmailMessage: Codeunit "Email Message"; ReplyBody: Text; AsHtml: Boolean): JsonObjectEmailMessageToJson(EmailMessage: Codeunit "Email Message"): JsonObjectAddEmailAttachments(EmailMessage: Codeunit "Email Message"; var MessageJson: JsonObject)GetClientIDAndSecret(var ClientId: Text; var ClientSecret: SecretText)SetupAzureAppRegistration()GetRedirectURL(): TextIsAzureAppRegistrationSetup(): BooleanInitializeClients(var OutlookAPIClient: interface "Email - Outlook API Client v2"; var OAuthClient: interface "Email - OAuth Client v2")(obsolete 28.0: Update OutlookAPIClient to v5.)InitializeClients(var OutlookAPIClient: interface "Email - Outlook API Client v4"; var OAuthClient: interface "Email - OAuth Client v2")(obsolete 28.0: Update OutlookAPIClient to v5.)InitializeClients(var OutlookAPIClient: interface "Email - Outlook API Client v5"; var OAuthClient: interface "Email - OAuth Client v2")InitializeClients(var OutlookAPIClient: interface "Email - Outlook API Client v6"; var OAuthClient: interface "Email - OAuth Client v2")Send(EmailMessage: Codeunit "Email Message"; AccountId: Guid)Send(EmailMessage: Codeunit "Email Message")RetrieveEmails(AccountId: Guid; var EmailInbox: Record "Email Inbox")RetrieveEmails(AccountId: Guid; var EmailInbox: Record "Email Inbox"; var Filters: Record "Email Retrieval Filters")GetEmailFolders(AccountId: Guid; var EmailFolders: Record "Email Folders")MarkEmailAsRead(AccountId: Guid; ExternalMessageId: Text)GetEmailCategories(AccountId: Guid; var EmailCategories: Record "Email Categories" temporary)CreateEmailCategory(AccountId: Guid; CategoryDisplayName: Text; CategoryColor: Text): TextApplyEmailCategory(AccountId: Guid; ExternalId: Text; Categories: List of [Text])ReplyEmail(AccountId: Guid; var EmailMessage: Codeunit "Email Message")DefaultEmailRateLimit(): Integer
Plus 23 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 8904 “Email Message” (18 calls:
AddAttachmentsToMessage → AddAttachment,AddEmailAttachments → Attachments_First,AddEmailAttachments → Attachments_GetContentBase64, …) - Codeunit 4100 “Temp Blob” (2 calls:
AddAttachmentsToMessage → CreateInStream,AddAttachmentsToMessage → CreateOutStream) - Codeunit 457 “Environment Information” (2 calls:
GetClientIDAndSecret → IsSaaSInfrastructure,SetupAzureAppRegistration → IsSaaSInfrastructure) - Codeunit 8894 “Email Account” (2 calls:
EmailOutlookAccountAddressValidation → ValidateEmailAddress,GetEmailAddressFromEmailAccounts → GetAllAccounts) - Codeunit 4110 “Base64 Convert” (1 call:
AddAttachmentsToMessage → FromBase64) - Codeunit 8901 “Email” (1 call:
CreateEmailInboxFromJsonObject → FindRetrievedEmail) - Page 4509 “Email - Outlook API Setup” (1 call:
SetupAzureAppRegistration → (object))
Called by
- Codeunit 4500 “Current User Connector” (14 calls:
ApplyEmailCategory → ApplyEmailCategory,CreateEmailCategory → CreateEmailCategory,DeleteAccount → DeleteAccount, …) - Codeunit 4503 “Microsoft 365 Connector” (12 calls:
ApplyEmailCategory → ApplyEmailCategory,CreateEmailCategory → CreateEmailCategory,DeleteAccount → DeleteAccount, …) - Codeunit 4507 “Email - OAuth Client” (2 calls:
Initialize → GetClientIDAndSecret,Initialize → GetRedirectURL) - Page 4500 “Current User Email Account” (1 call:
OnOpenPage → GetAccounts) - Page 4509 “Email - Outlook API Setup” (1 call:
OnOpenPage → IsAzureAppRegistrationSetup)
Recent changes
- 2026-09-21 #11612 Multiple runs of email retrieval on the same emails don’t persist again (main, BC30, fix)
- 2026-07-29 #9744 [Email - Outlook REST API] Skip attachments without contentBytes in RetrieveEmails (main, BC30, fix)
Deprecations
- procedure OnAfterInitializeClientsV2: guarded (#if not CLEAN28)
- procedure OnAfterInitializeClientsV4: guarded (#if not CLEAN28)
- procedure InitializeClients: Pending 28.0 (#if not CLEAN28), “Update OutlookAPIClient to v5.”
- procedure InitializeClients: Pending 28.0 (#if not CLEAN28), “Update OutlookAPIClient to v5.”
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: "Email - Outlook API Helper"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.