AI agents: use the documentation index at llms.txt to locate machine-readable pages. This section is indexed by https://docs.particular.net/servicecontrol/llms.txt. The markdown version of this page is served as plain text. An MCP server at /mcp serves the same content via the search_docs and read_doc tools; it is read-only and needs no credentials. Markdown versions of documentation pages are available by appending .md to the page URL. Directory URLs use index.md. They are served as text/plain because some retrieval backends reject text/markdown.

Azure Blob Storage Message Body Storage

Component:
ServiceControl

Azure Blob Storage saves message bodies in a blob container. Set ServiceControl/MessageBody/StorageType on an Error instance, or ServiceControl.Audit/MessageBody/StorageType on an Audit instance, to AzureBlob when the instance uses SQL Server or PostgreSQL storage.

Authentication

Azure Blob Storage supports two mutually exclusive authentication methods. Configure exactly one:

  • Connection string — authenticates with shared key or shared access signature (SAS) credentials.
  • Service URI with Microsoft Entra credentials — authenticates using the Azure SDK's DefaultAzureCredential, which can use managed identity. Set ManagedIdentityClientId to select a user-assigned managed identity.

Required settings

ServiceControl/MessageBody/Azure/ConnectionString

Added in version 7.0.0

The Azure Storage connection string used to authenticate with shared key or shared access signature (SAS) credentials when MessageBody/StorageType is AzureBlob. Configure either this setting or ServiceControl/MessageBody/Azure/ServiceUri, but not both.

ContextName
Environment variableSERVICECONTROL_MESSAGEBODY_AZURE_CONNECTIONSTRING
App config keyServiceControl/MessageBody/Azure/ConnectionString
SCMU fieldN/A
TypeDefault value
stringNone

ServiceControl.Audit/MessageBody/Azure/ConnectionString

Added in version 7.0.0

The Azure Storage connection string used to authenticate with shared key or shared access signature (SAS) credentials when MessageBody/StorageType is AzureBlob. Configure either this setting or ServiceControl.Audit/MessageBody/Azure/ServiceUri, but not both.

ContextName
Environment variableSERVICECONTROL_AUDIT_MESSAGEBODY_AZURE_CONNECTIONSTRING
App config keyServiceControl.Audit/MessageBody/Azure/ConnectionString
SCMU fieldN/A
TypeDefault value
stringNone

ServiceControl/MessageBody/Azure/ServiceUri

Added in version 7.0.0

The Azure Blob Storage service URI used with managed identity when MessageBody/StorageType is AzureBlob. Configure either this setting or ServiceControl/MessageBody/Azure/ConnectionString, but not both.

ContextName
Environment variableSERVICECONTROL_MESSAGEBODY_AZURE_SERVICEURI
App config keyServiceControl/MessageBody/Azure/ServiceUri
SCMU fieldN/A
TypeDefault value
stringNone

ServiceControl.Audit/MessageBody/Azure/ServiceUri

Added in version 7.0.0

The Azure Blob Storage service URI used with managed identity when MessageBody/StorageType is AzureBlob. Configure either this setting or ServiceControl.Audit/MessageBody/Azure/ConnectionString, but not both.

ContextName
Environment variableSERVICECONTROL_AUDIT_MESSAGEBODY_AZURE_SERVICEURI
App config keyServiceControl.Audit/MessageBody/Azure/ServiceUri
SCMU fieldN/A
TypeDefault value
stringNone

ServiceUri must be an absolute URI.

Optional settings

ServiceControl/MessageBody/Azure/ContainerName

Added in version 7.0.0

The Azure Blob Storage container used to store message bodies.

ContextName
Environment variableSERVICECONTROL_MESSAGEBODY_AZURE_CONTAINERNAME
App config keyServiceControl/MessageBody/Azure/ContainerName
SCMU fieldN/A
TypeDefault value
stringerror-bodies

ServiceControl.Audit/MessageBody/Azure/ContainerName

Added in version 7.0.0

The Azure Blob Storage container used to store message bodies. Every Audit instance has the same default, so set a different container name for each Audit instance that uses the same storage account. The exception is Audit instances that share a database, which must all use the same container.

ContextName
Environment variableSERVICECONTROL_AUDIT_MESSAGEBODY_AZURE_CONTAINERNAME
App config keyServiceControl.Audit/MessageBody/Azure/ContainerName
SCMU fieldN/A
TypeDefault value
stringaudit-bodies

ServiceControl/MessageBody/Azure/ManagedIdentityClientId

Added in version 7.0.0

The client ID of the user-assigned managed identity used to access Azure Blob Storage. When this setting is not specified, the default Azure credential chain is used.

ContextName
Environment variableSERVICECONTROL_MESSAGEBODY_AZURE_MANAGEDIDENTITYCLIENTID
App config keyServiceControl/MessageBody/Azure/ManagedIdentityClientId
SCMU fieldN/A
TypeDefault value
stringNone

ServiceControl.Audit/MessageBody/Azure/ManagedIdentityClientId

Added in version 7.0.0

The client ID of the user-assigned managed identity used to access Azure Blob Storage. When this setting is not specified, the default Azure credential chain is used.

ContextName
Environment variableSERVICECONTROL_AUDIT_MESSAGEBODY_AZURE_MANAGEDIDENTITYCLIENTID
App config keyServiceControl.Audit/MessageBody/Azure/ManagedIdentityClientId
SCMU fieldN/A
TypeDefault value
stringNone

ServiceControl/MessageBody/Azure/AuthorityHost

Added in version 7.0.0

The Microsoft Entra authority host URI used for managed identity authentication in sovereign clouds. When this setting is not specified, the Azure SDK uses the AZURE_AUTHORITY_HOST environment variable or its default authority host.

ContextName
Environment variableSERVICECONTROL_MESSAGEBODY_AZURE_AUTHORITYHOST
App config keyServiceControl/MessageBody/Azure/AuthorityHost
SCMU fieldN/A
TypeDefault value
stringNone

ServiceControl.Audit/MessageBody/Azure/AuthorityHost

Added in version 7.0.0

The Microsoft Entra authority host URI used for managed identity authentication in sovereign clouds. When this setting is not specified, the Azure SDK uses the AZURE_AUTHORITY_HOST environment variable or its default authority host.

ContextName
Environment variableSERVICECONTROL_AUDIT_MESSAGEBODY_AZURE_AUTHORITYHOST
App config keyServiceControl.Audit/MessageBody/Azure/AuthorityHost
SCMU fieldN/A
TypeDefault value
stringNone

Setup and runtime

Setup creates the configured container if it does not exist. The identity used for setup needs permission to create the container, and the runtime identity needs read, write, and delete permissions on blobs in the container:

  • Service URI with Microsoft Entra ID: assign the Storage Blob Data Contributor role on the storage account, or on the container if it is created in advance. This role covers both setup and normal operation.
  • Connection string: the account key, or the shared access signature's permissions, must allow creating the container during setup, and reading, writing, and deleting blobs at runtime. Setup always sends a create request, even when the container already exists, so a SAS scoped to a single container cannot be used for setup; use the account key or an account SAS that allows creating containers. The retention sweeper deletes body blobs before removing the corresponding database records.

Set these variables in the instance's environment to use a connection string. Replace the account and credential placeholders with values supplied by the deployment environment:

SERVICECONTROL_MESSAGEBODY_STORAGETYPE=AzureBlob
SERVICECONTROL_MESSAGEBODY_AZURE_CONNECTIONSTRING="DefaultEndpointsProtocol=https;AccountName=storageaccount;AccountKey=..."

Example environment variables using a service URI with managed identity:

SERVICECONTROL_MESSAGEBODY_STORAGETYPE=AzureBlob
SERVICECONTROL_MESSAGEBODY_AZURE_SERVICEURI=https://storageaccount.blob.core.windows.net

Audit instances use the same settings with the SERVICECONTROL_AUDIT_ prefix. Set a container name for each Audit instance that uses the same storage account, except Audit instances that share a database:

SERVICECONTROL_AUDIT_MESSAGEBODY_STORAGETYPE=AzureBlob
SERVICECONTROL_AUDIT_MESSAGEBODY_AZURE_SERVICEURI=https://storageaccount.blob.core.windows.net
SERVICECONTROL_AUDIT_MESSAGEBODY_AZURE_CONTAINERNAME=audit-bodies-instance1

See the external message body storage overview for shared configuration, retention, and backup guidance.