Hopp til innhold

Denne siden finnes foreløpig bare på engelsk. Innholdet nedenfor vises derfor på engelsk.

Knowledge Catalog

Altinn vs Maskinporten: which does what

Maskinporten authenticates which organization's software calls; an Altinn 3 System User delegation says on whose behalf it may act. Apier offers neither.

Jurisdiction: Norway · Verified against Digitaliseringsdirektoratet / Altinn as of 2026-10-21

Two different questions

Maskinporten is authentication infrastructure: an OAuth2 layer where a client signs a JWS assertion with its organization certificate and receives a scope-bound access token identifying the integrating organization. Altinn is the government's digital services platform where actions actually happen, and its System User model is authorization infrastructure: an explicit, revocable grant from the target company to the integrating party. Authenticating successfully and being authorized to act are separate questions with separate failure modes.

How they compose

Altinn 3 is API-first and built on the same Maskinporten OAuth2 layer as the rest of Norwegian government infrastructure. A delegated Altinn call carries a Maskinporten token (proving which organization calls) while Altinn checks the System User delegation (proving the target company allowed it). The three-leg setup interlocks them: a Maskinporten client, Samarbeidsportalen onboarding, and the Altinn System Register registration plus per-target delegation. Each leg is the vendor's own relationship with Digdir and Altinn.

The classic pitfall

A System User that exists but has no rights granted authenticates successfully (the Maskinporten leg is fine), yet every action fails, because the Altinn delegation leg is missing. When debugging, always separate the question of whether the token is valid (Maskinporten) from whether the delegation grants this right for this target company (Altinn).

Altinn 2 vs Altinn 3

Altinn 3 replaced Altinn 2, which was deprecated on 19 June 2026. Identifiers and resource URIs differ: an Altinn 2 service code or role code cannot be reused against Altinn 3 without translation, and delegation moved from organization roles plus Altinn-internal rights to the System User model. Apier publishes a static Altinn 2 to Altinn 3 access-package map at GET /api/v1/tools/altinn-migration; it is public Digdir documentation and reads no data about any party.

What Apier does and does not do

Apier does not hold a Maskinporten client or an Altinn System User on a customer's behalf, does not check Altinn rights or delegations, and does not act for a company in Altinn. Digdir's terms of use restrict Altinn data to public task performance, and Altinn Servicedesk confirmed in writing on 2026-10-21 that a commercial service may not be built on it; the former permissions and acting-capacity routes answer HTTP 410 CAPABILITY_WITHDRAWN. Apier keeps its own Maskinporten client for its own reads only. For the register's coded signing rules for a company, use GET /api/v1/company/{org}/authority, which reads signaturrett and prokura from Brønnøysundregistrene.

Use cases

  • Decide whether a failing government call is an authentication problem (Maskinporten) or an authorization problem (the Altinn delegation)
  • Plan the credential and delegation setup a software vendor must complete directly with Digdir and Altinn
  • Translate an Altinn 2 integration's assumptions to the Altinn 3 model with the public migration map
  • Read the register's coded signing rules for a company from Brønnøysund instead of inferring them from Altinn rights

Requirements

  • For authentication: a Maskinporten client bound to a virksomhetssertifikat, onboarded in Samarbeidsportalen by the vendor itself
  • For authorization: an Altinn System Register entry plus a per-target delegation granted by each target company in its own Altinn portal
  • For the Apier signing authority read: an API key with the read:brreg scope; the migration map needs no key

Authentication

Method: api_key · Scopes: read:brreg, read:digdir

Apier holds neither layer for customers. The signing authority read uses a consumer API key; the Altinn 2 to Altinn 3 migration map is keyless.

Common errors

  • CAPABILITY_WITHDRAWN

    The permissions, acting-capacity or delegation route is withdrawn (HTTP 410); Apier reads no Altinn delegation data.

    Fix: Do not retry. Read the register's coded signing rules for the company from GET /api/v1/company/{org}/authority, or resolve the vendor's own Maskinporten and Altinn setup directly with Digdir and Altinn.

  • INVALID_CODE

    The Altinn 2 code passed to the migration map is not in the published mapping.

    Fix: Check the code against Altinn's own Altinn 2 to Altinn 3 documentation and retry with a listed code.

Related topics

Related APIs

These are capability ids; resolve each against the machine-readable manifest at /api/v1/capabilities for the endpoint, auth mode, and tier.

  • company.authority
  • tools.altinn_migration

Related MCP tools

Registered tools on the Apier MCP server.

  • get_company_authority
  • get_altinn_migration_guidance