codeunitAdministration & Setupofficial - Microsoftderived - from the source, no model text

Codeunit 501 "OAuth2"

System Application · System.Security.Authentication

Across versions

  1. BC23present
  2. BC2452 procedures added, 26 procedures changed
  3. BC25unchanged
  4. BC261 procedures added
  5. BC2726 procedures removed, 1 procedures added
  6. BC2817 procedures removed
  7. BC29-30unchanged

Neighbourhood 26 connected objects and pages

Codeunit 502 "OAuth2Impl" (calls, 25 links)OAuth2ImplCodeunit 7201 "CDS Integration Impl." (calls, 8 links)CDS Integration Impl.Codeunit 4507 "Email - OAuth Client" (calls, 7 links)Email - OAuth ClientCodeunit 7203 "CDS Environment" (calls, 6 links)CDS EnvironmentCodeunit 102 "Import Consolidation from API" (calls, 4 links)Codeunit 4700 "VAT Group Communication" (calls, 4 links)VAT Group CommunicationCodeunit 1686 "Email Logging OAuth Client" (calls, 3 links)Email Logging OAuth ClientCodeunit 9510 "Document Service Management" (calls, 3 links)Document Service ManagementCodeunit 560 "CrossIntercompany Connector" (calls, 2 links)CrossIntercompany ConnectorCodeunit 7247 "MDM Http Source Transport" (calls, 2 links)Codeunit 9144 "SharePoint Authorization Code" (calls, 2 links)SharePoint Authorization CodePage 7201 "CDS Connection Setup Wizard" (calls, 2 links)CDS Connection Setup WizardCodeunit 1410 "Doc. Exch. Service Mgt." (calls)Doc. Exch. Service Mgt.Codeunit 1681 "Email Logging Management" (calls)Email Logging ManagementCodeunit 2020 "Image Analysis Management" (calls)Image Analysis ManagementCodeunit 4516 "OAuth2 SMTP Authentication" (calls)OAuth2 SMTP AuthenticationCodeunit 6904 "Expense OAuth Client" (calls)Codeunit 6941 "EA Http Client" (calls)Codeunit 7802 "Azure Functions OAuth2" (calls)Codeunit 7807 "Azure Functions OAuth2 Cert" (calls)Page 4509 "Email - Outlook API Setup" (calls)Page 4705 "VAT Group Setup Guide" (calls)Page 7200 "CDS Connection Setup" (calls)Page 9861 "AAD Application Card" (calls)Page extension 4703 "VAT Report Setup Extension" (calls)Table 1680 "Email Logging Setup" (calls)

Open in the neighbourhood explorer

One hop out, from the extracted relations and call graph. Up to 40 shown; the sections below list them all.

System Application · System.Security.Authentication · BC23-30 · source at ea08af5e · facts from BC29

Properties

Property Value
Access Public

Procedures

  • AcquireTokenByAuthorizationCodeWithCertificate(ClientId: Text; Certificate: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; ResourceURL: Text; PromptInteraction: Enum "Prompt Interaction"; var AccessToken: SecretText; var AuthCodeErr: Text) Δ BC24 Δ BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC27 − BC27 − BC28 − BC28 − BC28: Gets the authorization token based on the authorization code via the OAuth2 v1.0 code grant flow.
  • AcquireTokenByAuthorizationCodeWithCertificate(ClientId: Text; Certificate: SecretText; CertificatePassword: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; ResourceURL: Text; PromptInteraction: Enum "Prompt Interaction"; var AccessToken: SecretText; var AuthCodeErr: Text) Δ BC24 Δ BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC27 − BC27 − BC28 − BC28 − BC28: Gets the authorization token based on the authorization code via the OAuth2 v1.0 code grant flow.
  • AcquireTokenByAuthorizationCode(ClientId: Text; ClientSecret: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; PromptInteraction: Enum "Prompt Interaction"; var AccessToken: SecretText; var AuthCodeErr: Text) Δ BC24 + BC24 − BC27: Gets the authorization token based on the authorization code via the OAuth2 v2.0 code grant flow.
  • AcquireTokenByAuthorizationCodeWithCertificate(ClientId: Text; Certificate: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; PromptInteraction: Enum "Prompt Interaction"; var AccessToken: SecretText; var AuthCodeErr: Text) Δ BC24 Δ BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC27 − BC27 − BC28 − BC28 − BC28: Gets the authorization token based on the authorization code via the OAuth2 v2.0 code grant flow.
  • AcquireTokenByAuthorizationCodeWithCertificate(ClientId: Text; Certificate: SecretText; CertificatePassword: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; PromptInteraction: Enum "Prompt Interaction"; var AccessToken: SecretText; var AuthCodeErr: Text) Δ BC24 Δ BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC27 − BC27 − BC28 − BC28 − BC28: Gets the authorization token based on the authorization code via the OAuth2 v2.0 code grant flow.
  • AcquireTokensByAuthorizationCode(ClientId: Text; ClientSecret: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; PromptInteraction: Enum "Prompt Interaction"; var AccessToken: SecretText; var IdToken: Text; var AuthCodeErr: Text) Δ BC24 + BC24 − BC27: Gets the authorization token based on the authorization code via the OAuth2 v2.0 code grant flow.
  • AcquireTokensByAuthorizationCodeWithCertificate(ClientId: Text; Certificate: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; PromptInteraction: Enum "Prompt Interaction"; var AccessToken: SecretText; var IdToken: Text; var AuthCodeErr: Text) Δ BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC28 − BC28: Gets the authorization token based on the authorization code via the OAuth2 v2.0 code grant flow.
  • AcquireTokensByAuthorizationCodeWithCertificate(ClientId: Text; Certificate: SecretText; CertificatePassword: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; PromptInteraction: Enum "Prompt Interaction"; var AccessToken: SecretText; var IdToken: Text; var AuthCodeErr: Text) Δ BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC28 − BC28: Gets the authorization token based on the authorization code via the OAuth2 v2.0 code grant flow.
  • AcquireTokenAndTokenCacheByAuthorizationCode(ClientId: Text; ClientSecret: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; PromptInteraction: Enum "Prompt Interaction"; var AccessToken: SecretText; var TokenCache: Text; var Error: Text) Δ BC24 + BC24 − BC27: Gets the access token and token cache state with authorization code flow.
  • AcquireTokenAndTokenCacheByAuthorizationCodeWithCertificate(ClientId: Text; Certificate: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; PromptInteraction: Enum "Prompt Interaction"; var AccessToken: SecretText; var TokenCache: Text; var Error: Text) Δ BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC28 − BC28: Gets the access token and token cache state with authorization code flow.
  • AcquireTokenAndTokenCacheByAuthorizationCodeWithCertificate(ClientId: Text; Certificate: SecretText; CertificatePassword: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; PromptInteraction: Enum "Prompt Interaction"; var AccessToken: SecretText; var TokenCache: Text; var Error: Text) Δ BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC28 − BC28: Gets the access token and token cache state with authorization code flow.
  • AcquireTokensAndTokenCacheByAuthorizationCode(ClientId: Text; ClientSecret: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; PromptInteraction: Enum "Prompt Interaction"; var AccessToken: SecretText; var IdToken: Text; var TokenCache: Text; var Error: Text) Δ BC24 + BC24 − BC27: Gets the access token and token cache state with authorization code flow.
  • AcquireTokensAndTokenCacheByAuthorizationCodeWithCertificate(ClientId: Text; Certificate: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; PromptInteraction: Enum "Prompt Interaction"; var AccessToken: SecretText; var IdToken: Text; var TokenCache: Text; var Error: Text) Δ BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC28 − BC28: Gets the access token and token cache state with authorization code flow.
  • AcquireTokensAndTokenCacheByAuthorizationCodeWithCertificate(ClientId: Text; Certificate: SecretText; CertificatePassword: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; PromptInteraction: Enum "Prompt Interaction"; var AccessToken: SecretText; var IdToken: Text; var TokenCache: Text; var Error: Text) Δ BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC28 − BC28: Gets the access token and token cache state with authorization code flow.
  • AcquireOnBehalfOfToken(RedirectURL: Text; Scopes: List of [Text]; var AccessToken: SecretText) Δ BC24 + BC24 − BC27: Gets the authentication token via the On-Behalf-Of OAuth2 v2.0 protocol flow.
  • AcquireOnBehalfOfTokens(RedirectURL: Text; Scopes: List of [Text]; var AccessToken: SecretText; var IdToken: Text) Δ BC24 + BC24 − BC27: Gets the authentication token via the On-Behalf-Of OAuth2 v2.0 protocol flow.
  • RequestClientCredentialsAdminPermissions(ClientId: Text; OAuthAuthorityUrl: Text; RedirectURL: Text; var HasGrantConsentSucceeded: Boolean; var PermissionGrantError: Text) Δ BC24: Request the permissions from a directory admin.
  • AcquireTokenWithClientCredentials(ClientId: Text; ClientSecret: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; ResourceURL: Text; var AccessToken: SecretText) Δ BC24 Δ BC24 + BC24 + BC24 − BC27 − BC27: Gets the access token via the Client Credentials OAuth2 v1.0 grant flow.
  • AcquireTokenWithClientCredentials(ClientId: Text; ClientSecret: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; var AccessToken: SecretText) Δ BC24 Δ BC24 + BC24 + BC24 − BC27 − BC27: Gets the access token via the Client Credentials OAuth2 v2.0 grant flow.
  • AcquireAuthorizationCodeTokenFromCacheWithCertificate(ClientId: Text; Certificate: SecretText; RedirectURL: Text; OAuthAuthorityUrl: Text; ResourceURL: Text; var AccessToken: SecretText) Δ BC24 Δ BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC27 − BC28 − BC28 − BC28 − BC28: Gets the access token from cache or a refreshed token via OAuth2 v1.0 protocol.
  • AcquireAuthorizationCodeTokenFromCacheWithCertificate(ClientId: Text; Certificate: SecretText; CertificatePassword: SecretText; RedirectURL: Text; OAuthAuthorityUrl: Text; ResourceURL: Text; var AccessToken: SecretText) Δ BC24 Δ BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC27 − BC28 − BC28 − BC28 − BC28: Gets the access token from cache or a refreshed token via OAuth2 v1.0 protocol.
  • AcquireAuthorizationCodeTokenFromCache(ClientId: Text; ClientSecret: SecretText; RedirectURL: Text; OAuthAuthorityUrl: Text; Scopes: List of [Text]; var AccessToken: SecretText) Δ BC24 + BC24 − BC27: Gets the access token from cache or a refreshed token via OAuth2 v2.0 protocol.
  • AcquireTokensFromCache(ClientId: Text; ClientSecret: SecretText; RedirectURL: Text; OAuthAuthorityUrl: Text; Scopes: List of [Text]; var AccessToken: SecretText; var IdToken: Text) Δ BC24 + BC24 − BC27: Gets the access token from cache or a refreshed token via OAuth2 v2.0 protocol.
  • AcquireAuthorizationCodeTokenFromCacheWithCertificate(ClientId: Text; Certificate: SecretText; RedirectURL: Text; OAuthAuthorityUrl: Text; Scopes: List of [Text]; var AccessToken: SecretText) Δ BC24 Δ BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC27 − BC28 − BC28 − BC28 − BC28: Gets the access token from cache or a refreshed token via OAuth2 v2.0 protocol.
  • AcquireAuthorizationCodeTokenFromCacheWithCertificate(ClientId: Text; Certificate: SecretText; CertificatePassword: SecretText; RedirectURL: Text; OAuthAuthorityUrl: Text; Scopes: List of [Text]; var AccessToken: SecretText) Δ BC24 Δ BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC27 − BC28 − BC28 − BC28 − BC28: Gets the access token from cache or a refreshed token via OAuth2 v2.0 protocol.
  • AcquireTokensFromCacheWithCertificate(ClientId: Text; Certificate: SecretText; RedirectURL: Text; OAuthAuthorityUrl: Text; Scopes: List of [Text]; var AccessToken: SecretText; var IdToken: Text) Δ BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC28 − BC28: Gets the access token from cache or a refreshed token via OAuth2 v2.0 protocol.
  • AcquireTokensFromCacheWithCertificate(ClientId: Text; Certificate: SecretText; CertificatePassword: SecretText; RedirectURL: Text; OAuthAuthorityUrl: Text; Scopes: List of [Text]; var AccessToken: SecretText; var IdToken: Text) Δ BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC28 − BC28: Gets the access token from cache or a refreshed token via OAuth2 v2.0 protocol.
  • AcquireTokensWithCertificate(ClientId: Text; Certificate: SecretText; RedirectURL: Text; OAuthAuthorityUrl: Text; Scopes: List of [Text]; var AccessToken: SecretText; var IdToken: Text) Δ BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC28 − BC28: Gets the access token via OAuth2 v2.0 protocol, authenticating as a service principal (as the app whose credentials you are providing).
  • AcquireTokensWithCertificate(ClientId: Text; Certificate: SecretText; CertificatePassword: SecretText; RedirectURL: Text; OAuthAuthorityUrl: Text; Scopes: List of [Text]; var AccessToken: SecretText; var IdToken: Text) Δ BC24 + BC24 + BC24 + BC24 + BC24 − BC27 − BC28 − BC28: Gets the access token via OAuth2 v2.0 protocol, authenticating as a service principal (as the app whose credentials you are providing).
  • AcquireOnBehalfAccessTokenAndTokenCache(OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; var AccessToken: SecretText; var TokenCache: Text) Δ BC24 + BC24 − BC27: Gets the access and refresh token via the On-Behalf-Of OAuth2 v2.0 protocol flow.
  • AcquireOnBehalfTokensAndTokenCache(OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; var AccessToken: SecretText; var IdToken: Text; var TokenCache: Text) Δ BC24 + BC24 − BC27: Gets the access and refresh token via the On-Behalf-Of OAuth2 v2.0 protocol flow.
  • AcquireOnBehalfOfTokenByTokenCache(LoginHint: Text; RedirectURL: Text; Scopes: List of [Text]; TokenCache: Text; var AccessToken: SecretText; var NewTokenCache: Text) Δ BC24 Δ BC24 + BC24 + BC24 − BC27 − BC27: Gets the token and token cache via the On-Behalf-Of OAuth2 v1.0 protocol flow.
  • AcquireOnBehalfOfTokensByTokenCache(LoginHint: Text; RedirectURL: Text; Scopes: List of [Text]; TokenCache: Text; var AccessToken: SecretText; var IdToken: Text; var NewTokenCache: Text) Δ BC24 Δ BC24 + BC24 + BC24 − BC27 − BC27: Gets the token and token cache via the On-Behalf-Of OAuth2 v1.0 protocol flow.
  • AcquireOnBehalfOfTokenByTokenCache(ClientId: Text; ClientSecret: SecretText; LoginHint: Text; RedirectURL: Text; Scopes: List of [Text]; TokenCache: Text; var AccessToken: SecretText; var NewTokenCache: Text) Δ BC24 Δ BC24 + BC24 + BC24 − BC27 − BC27: Gets the token and token cache via the On-Behalf-Of OAuth2 v1.0 protocol flow.
  • AcquireOnBehalfOfTokensByTokenCache(ClientId: Text; ClientSecret: SecretText; LoginHint: Text; RedirectURL: Text; Scopes: List of [Text]; TokenCache: Text; var AccessToken: SecretText; var IdToken: Text; var NewTokenCache: Text) Δ BC24 Δ BC24 + BC24 + BC24 − BC27 − BC27: Gets the token and token cache via the On-Behalf-Of OAuth2 v1.0 protocol flow.
  • AcquireAuthorizationCode(ClientId: Text; ClientSecret: SecretText; OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; PromptInteraction: Enum "Prompt Interaction"; Audience: Text; var AuthCode: Text; var AuthCodeErr: Text) + BC27: Gets the authorization token based on the authorization code via the OAuth2 v2.0 code grant flow.
  • GetClaims(JWT: SecretText): JsonObject + BC26: Gets the Claims Set from a JSON Web Token (JWT).
  • GetLastErrorMessage(): Text: Get the last error message that happened during acquiring of an access token.
  • GetDefaultRedirectURL(var RedirectUrl: Text): Returns the default Business Central redirectURL

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 502 “OAuth2Impl” (25 calls: AcquireAuthorizationCode → AcquireAuthorizationCode, AcquireAuthorizationCodeTokenFromCache → AcquireTokenFromCache, AcquireAuthorizationCodeTokenFromCacheWithCertificate → AcquireTokenFromCacheWithCertificate, …)

Called by

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"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.

Evidence 1 sources