By Admin on Tuesday, 02 December 2025
Category: All

Azure AMQP Service Bus CBS Authentication

From sgcWebSockets 2026.1.0 Azure AMQP 1.0 supports CBS Authentication using SAS Tokens and JWT.

Azure Service Bus implements Claims-Based Security (CBS) over AMQP to authorize senders and receivers after the initial SASL handshake. The client opens a management link to the $cbs node and sends a put-token request containing either a Shared Access Signature (SAS) token or a JSON Web Token (JWT) issued by Microsoft Entra ID. Once the broker validates the token, the authorization is cached for its lifetime and the application can proceed to create sender and receiver links against queues, topics, or subscriptions.

How Azure CBS Works

Azure Service Bus implements CBS over AMQP to authorize senders and receivers after the initial SASL handshake. The client opens a management link to the $cbs node and sends a put-token request containing either a SAS token or a JWT issued by Microsoft Entra ID. Once the broker validates the token, the authorization is cached for its lifetime and the application can proceed to create sender and receiver links against queues, topics, or subscriptions.

The AMQP1 client in sgcWebSockets 2026.1.0 automates this flow through two helper methods that feel natural to Delphi developers:


Both methods require an active AMQP connection and accept the following parameters:

The following examples illustrate how to authenticate with CBS before sending messages.

The next example focuses solely on Microsoft Entra ID (Azure AD) authentication using JWTs. It shows how to request a token with the client credentials flow and publish it to $cbs before creating links to send or receive messages. 

Related Posts