Request a fullmakt (broker a systembruker delegation)
request_fullmaktBroker a legally-grounded, scoped company-to-agent authority via Altinn systembruker. Returns a delegation URL for company approval and persists the granted system user ID on your principal.
Instructions
Broker a fullmakt — a legally-grounded, scoped, revocable company→agent authority delegated through an Altinn systembruker. The tool brokers the delegation, persists it, and binds the returned system_user_id write-once onto the principal (pending → active). The company's signing authority must approve the returned delegation_url before the delegation is usable. Non-empty warnings[] on a 201 means the delegation exists upstream but a local follow-up degraded - reconcile, never blind-retry. Identical retries are dedup-safe (deterministic Idempotency-Key). Inputs: { agent_principal_id (uuid, YOUR OWN), org_number (9 digits), scopes (non-empty string[]), validity_days?, label? }. Failure modes: FULLMAKT_PRINCIPAL_NOT_FOUND, FULLMAKT_PRINCIPAL_NOT_ELIGIBLE, FULLMAKT_UPSTREAM_FAILED, SCOPE_INSUFFICIENT (needs read:altinn), VALIDATION_FAILED. To inspect the recorded state per principal, use check_fullmakt instead; to withdraw the delegation and retire the principal, use revoke_fullmakt instead. No sandbox mirror. Docs: https://www.apier.no/docs/fullmakt
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | No | Optional consumer-supplied label for the delegation (dashboard display only; echoed back on the response). | |
| scopes | Yes | The Altinn scopes the delegation should carry (e.g. `altinn:accessmanagement/authorizedparties.read`); at least one, each non-whitespace. | |
| org_number | Yes | 9-digit Norwegian organisasjonsnummer of the customer company granting the delegation. Plain 9 digits (no MOD-11 check), matching the route contract. | |
| validity_days | No | Optional delegation validity window in days (1–3650; the 10-year cap matches Altinn's longest supported term). Omit to use the adapter default. | |
| agent_principal_id | Yes | The agent principal (UUID) to bind this delegation to — one of YOUR OWN; an unknown or foreign id returns FULLMAKT_PRINCIPAL_NOT_FOUND. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _meta | No | ||
| result | Yes | The brokered delegation: `system_user_id`, `status`, `scopes`, `valid_until`, `delegation_url` (the approval link), the echoed `label`, the `agent_principal` snapshot, and `warnings[]` (empty on the clean path). | |
| metadata | Yes | ||
| justification | Yes |