---
id: object/codeunit/10680-no
type: object
title: Codeunit 10680 "Elec. VAT OAuth Mgt." (NO)
summary: Codeunit 10680 "Elec. VAT OAuth Mgt." (NO) in the NO country layer (Microsoft.Finance.VAT.Reporting). 17 public procedures, 9 event subscribers. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - no layer
versions:
  introduced: "29"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 8ef6a2ca1e8cba12a6d9e8b1f57c682dcd6b439be57152180fc53cd80946641a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/NO/ElectronicVATSubmission/app/src/Connection/ElecVATOAuthMgt.Codeunit.al
    title: src/Apps/NO/ElectronicVATSubmission/app/src/Connection/ElecVATOAuthMgt.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/no
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 10680
name: Elec. VAT OAuth Mgt.
namespace: Microsoft.Finance.VAT.Reporting
app: ElectronicVATSubmission
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
country: "NO"
counts:
  fields: 0
  procedures: 38
  events: 0
  subscribers: 9
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
---

# Codeunit 10680 "Elec. VAT OAuth Mgt." (NO)

> Codeunit 10680 "Elec. VAT OAuth Mgt." (NO) in the NO country layer (Microsoft.Finance.VAT.Reporting). 17 public procedures, 9 event subscribers. Introduced in BC29, still in BC30.

NO country layer · Microsoft.Finance.VAT.Reporting · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/NO/ElectronicVATSubmission/app/src/Connection/ElecVATOAuthMgt.Codeunit.al) · facts from BC29

An object of the [NO localization](../../localizations/no.md), not part of W1.

## Event subscriptions

- OnBeforeDeleteEvent subscribes to Table "OAuth 2.0 Setup" OnBeforeDeleteEvent
- OnBeforeRequestAuthoizationCode subscribes to Table "OAuth 2.0 Setup" OnBeforeRequestAuthoizationCode
- OnBeforeRequestAccessToken subscribes to Table "OAuth 2.0 Setup" OnBeforeRequestAccessToken
- OnBeforeRefreshAccessToken subscribes to Table "OAuth 2.0 Setup" OnBeforeRefreshAccessToken
- OnBeforeInvokeRequest subscribes to Table "OAuth 2.0 Setup" OnBeforeInvokeRequest
- OnAfterRequestAccessToken subscribes to Table "OAuth 2.0 Setup" OnAfterRequestAccessToken
- OnBeforeCheckEncryption subscribes to Codeunit "OAuth 2.0 Mgt." OnBeforeCheckEncryption
- OnRegisterServiceConnection subscribes to Table "Service Connection" OnRegisterServiceConnection
- OnBeforeGetServiceUrlForAuthorizationURL subscribes to Codeunit "OAuth 2.0 Mgt." OnBeforeGetServiceUrlForAuthorizationURL

## Procedures

- `OpenOAuthSetupPage()`
- `InitOAuthSetup(var OAuth20Setup: Record "OAuth 2.0 Setup")`
- `CheckOAuthConfigured(OpenSetup: Boolean)`
- `GetOAuthSetup(var OAuth20Setup: Record "OAuth 2.0 Setup"): Boolean`
- `UpdateElecVATOAuthSetupRecordsWithClientIDAndSecret(ClientID: Guid; ClientSecret: Guid)`
- `UpdateElecVATOAuthSetupRecordsWithAuthenticationURL(AuthenticationURL: Text[250])`
- `UpdateElecVATOAuthSetupRecordsWithRedirectURL(RedirectURL: Text[250])`
- `IsElectronicVATOAuthSetup(OAuth20Setup: Record "OAuth 2.0 Setup"): Boolean`
- `RefreshAccessToken(var HttpError: Text): Boolean`
- `InvokePostRequest(var ResponseJson: Text; var HttpLogError: Text; RequestPath: Text; ContentType: Text; Request: Text; ActivityLogContext: Text): Boolean`
- `InvokePostRequestTextXml(var ResponseJson: Text; var HttpLogError: Text; RequestPath: Text; ContentType: Text; Request: Text; ActivityLogContext: Text): Boolean`
- `InvokePostRequestJsonContentType(var ResponseJson: Text; var HttpLogError: Text; RequestPath: Text; Request: Text; ActivityLogContext: Text): Boolean`
- `InvokeGetRequest(var ResponseJson: Text; var HttpLogError: Text; RequestPath: Text; ContentType: Text; Request: Text; ActivityLogContext: Text): Boolean`
- `InvokePutRequest(var ResponseJson: Text; var HttpLogError: Text; RequestPath: Text; ContentType: Text; Request: Text; ActivityLogContext: Text): Boolean`
- `IsError408Timeout(ResponseJson: Text): Boolean`
- `SetToken(var TokenKey: Guid; TokenValue: SecretText; TokenDataScope: DataScope): Boolean` (internal)
- `SaveAltinnToken(TokenValue: Text)` (internal)

Plus 12 local procedures.

## Triggers

OnRun

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

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). 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: "Elec. VAT OAuth Mgt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.

A NO country object, not part of W1: the default corpus does not have it; `bcatlas_list_countries` shows which countries the atlas has.
