Codeunit 4516 "OAuth2 SMTP Authentication"
Email - SMTP Connector · System.Email
Across versions
- BC23-28not present
- BC29-30present
Neighbourhood 7 connected objects and pages
Email - SMTP Connector · System.Email · BC29-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| Access | Internal |
Event subscriptions
- OnSMTPOAuth2Authenticate subscribes to Codeunit “SMTP Authentication” OnSMTPOAuth2Authenticate
Procedures
GetOAuth2Credentials(var UserName: Text; var AccessToken: SecretText)(internal): Provide the credentials to authenticate using OAuth 2.0 for Exchange Online mailboxes.AuthenticateWithOAuth2()(internal): Authenticate the current user. Disregard the token cache and show the authentication dialog.AuthenticateWithOAuth2CustomAppReg(var SMTPAccount: Record "SMTP Account")(internal)CheckOAuth2Authentication()(internal): Verify if the current user is successfully authenticated. If there is token cache, it will be used. Otherwise, the authentication dialog will be shown.GetUserName(AccessToken: SecretText; var UserName: Text)(internal): Get user’s email address by the access token.
Plus 2 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 6300 “Azure AD Mgt.” (9 calls:
AuthenticateWithOAuth2 → AcquireTokenByAuthorizationCodeAsSecretText,AuthenticateWithOAuth2 → GetO365Resource,AuthenticateWithOAuth2 → GetO365ResourceName, …) - Codeunit 4513 “SMTP Connector Impl.” (2 calls:
OnSMTPOAuth2Authenticate → CheckIfCustomizedSMTPOAuth,OnSMTPOAuth2Authenticate → GetO365SmtpServer) - Codeunit 4620 “SMTP Authentication” (2 calls:
OnSMTPOAuth2Authenticate → GetAccountId,OnSMTPOAuth2Authenticate → SetOAuth2AuthInfo) - Codeunit 4110 “Base64 Convert” (1 call:
GetUserName → FromBase64) - Codeunit 457 “Environment Information” (1 call:
AuthenticateWithOAuth2CustomAppReg → IsOnPrem) - Codeunit 501 “OAuth2” (1 call:
AuthenticateWithOAuth2CustomAppReg → RequestClientCredentialsAdminPermissions)
Called by
- Page 4511 “SMTP Account Wizard” (1 call:
AuthenticateWithOAuth2CustomAppReg → AuthenticateWithOAuth2CustomAppReg)
Recent changes
- 2026-10-01 #12140 [Email - SMTP Connector] Fix OAuth Base64URL token parsing (main, BC30, fix)
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: "OAuth2 SMTP Authentication"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.