---
id: post/kauffmann-nl/8332
type: post
title: OAuth library for the Rest Client
summary: An OAuth library for Business Central's Rest Client module has been released on GitHub, supporting both Authorization Code Grant and Client Credentials flows with AL code, certificates, and Azure Entra ID integration. Use this when you need flexible OAuth authentication without .NET dependencies or complex function overloading.
tier: community
language: en
tags:
  - oauth
  - authentication
  - rest client
  - certificates
  - azure entra id
  - system app
  - al code
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-08T01:59:24.058Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 9f462a79d0ebf563ce6fea743667c2fa9548d9423d65d5402f441036151ec8e4
evidence:
  - kind: blog
    url: https://www.kauffmann.nl/2025/09/02/oauth-library-for-the-rest-client/
    title: OAuth library for the Rest Client
    date: "2025-09-02"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://www.kauffmann.nl/2025/09/02/oauth-library-for-the-rest-client/
    title: OAuth library for the Rest Client
    date: "2025-09-02"
    commit: null
    t: null
    quote: The OAuth library I'm introducing now uses no .NET components. It's entirely written in AL code.
  - kind: blog
    url: https://www.kauffmann.nl/2025/09/02/oauth-library-for-the-rest-client/
    title: OAuth library for the Rest Client
    date: "2025-09-02"
    commit: null
    t: null
    quote: Support for both Authorization Code Grant flow and Client Credentials flow.
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "8332"
source_id: kauffmann-nl
source_name: Kauffmann @ Dynamics 365 Business Central
url: https://www.kauffmann.nl/2025/09/02/oauth-library-for-the-rest-client/
published_at: "2025-09-02T20:19:37.000Z"
author: Arend-Jan Kauffmann
full_text: false
words: 684
quotes:
  - text: The OAuth library I'm introducing now uses no .NET components. It's entirely written in AL code.
    why_it_matters: This transparency and AL-only approach makes the code more maintainable and easier to understand compared to the existing OAuth2 module which relies on complex .NET calls.
  - text: Support for both Authorization Code Grant flow and Client Credentials flow.
    why_it_matters: This dual support covers both interactive user authentication scenarios and automated service-to-service integration patterns.
code_objects_mentioned:
  - other Rest Client module
  - other OAuth2 module
  - other Endpoint/OAuth management module
systems:
  - integration
  - development
  - administration
versions_mentioned:
  - v28
preview:
  embeddable: true
  frame_url: https://www.kauffmann.nl/2025/09/02/oauth-library-for-the-rest-client/embed/
  image: https://i0.wp.com/www.kauffmann.nl/wp-content/uploads/2025/09/HttpEndpointExample.png?fit=1200%2C1005&ssl=1
  image_alt: null
  image_w: 1200
  image_h: 1005
  site_name: Kauffmann @ Dynamics 365 Business Central
  favicon: https://i0.wp.com/www.kauffmann.nl/wp-content/uploads/2020/01/cropped-AppLogo.jpg?fit=32%2C32&ssl=1
  probed_at: "2026-10-07T11:50:57.943Z"
---

# OAuth library for the Rest Client

[Read the post](https://www.kauffmann.nl/2025/09/02/oauth-library-for-the-rest-client/) · Kauffmann @ Dynamics 365 Business Central (Arend-Jan Kauffmann, MVP) · 2025-09-02 · 684 words · tier community · reviewed (checked by Opus)

> An OAuth library for Business Central's Rest Client module has been released on GitHub, supporting both Authorization Code Grant and Client Credentials flows with AL code, certificates, and Azure Entra ID integration. Use this when you need flexible OAuth authentication without .NET dependencies or complex function overloading.

## Key points

- Pure AL implementation with no .NET components, making the code more transparent and maintainable
- Supports two OAuth flows: Authorization Code Grant (with automatic token refresh) and Client Credentials (service-to-service)
- Features certificate-based authentication with easy certificate generation and download via a dedicated page
- Includes security measures like PKCE and state parameters to prevent CSRF attacks
- Available on GitHub under MIT license with extensibility for other authorities beyond Azure Entra ID

## Quotes

- "The OAuth library I'm introducing now uses no .NET components. It's entirely written in AL code." (This transparency and AL-only approach makes the code more maintainable and easier to understand compared to the existing OAuth2 module which relies on complex .NET calls.)
- "Support for both Authorization Code Grant flow and Client Credentials flow." (This dual support covers both interactive user authentication scenarios and automated service-to-service integration patterns.)

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- other "Rest Client module"
- other "OAuth2 module"
- other "Endpoint/OAuth management module"

## Context

- Features: OAuth Authorization Code Grant flow, OAuth Client Credentials flow, Certificate-based authentication, Token automatic refresh, PKCE and state parameters, Self-hosted OAuth landing page, Azure Entra ID support, Endpoint management
- Versions: v28

Source: Kauffmann @ Dynamics 365 Business Central, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
