Audit Logs
Audit Logs is a feature of Temporal Cloud that provides forensic access information for a variety of operations in the Temporal Cloud Control Plane.
Audit Logs answers "who, when, and what" questions about Temporal Cloud resources. These answers can help you evaluate the security of your organization, and they can provide information that you need to satisfy audit and compliance requirements.
You need the Account Owner or Global Administrator role to view Audit Logs via UI, use the API, or to configure an Audit Log Integration with AWS Kinesis or GCP Pub/Sub.
Audit Logs do not capture data plane events, such as Workflow Start, Workflow Terminate, and Schedule Create. Instead, explore the Export feature, which does let you send closed Workflow Histories to external storage.
Which events are supported by Audit Logs?
The operation field can contain the following event values:
- Account
ChangeAccountPlanType: Change Account Plan TypeCreateAccountAuditLogSink: Create Account Audit Log SinkDeleteAccountAuditLogSink: Delete Account Audit Log SinkOffboardAccount: Offboard AccountSelfServiceOffboardAccount: Self-Service Offboard AccountUpdateAccount: Update AccountUpdateAccountAuditLogSink: Update Account Audit Log Sink
- API keys
CreateAPIKey: Create API KeyCreateApiKey: Create API KeyCreateServiceAccountAPIKey: Create Service Account API KeyDeleteAPIKey: Delete API KeyDeleteApiKey: Delete API KeyUpdateAPIKey: Update API KeyUpdateApiKey: Update API Key
- Billing
CreateBillingReport: Create Billing Report
- Connectivity rules
CreateConnectivityRule: Create Connectivity RuleDeleteConnectivityRule: Delete Connectivity Rule
- Custom roles
CreateCustomRole: Create Custom RoleDeleteCustomRole: Delete Custom RoleUpdateCustomRole: Update Custom Role
- Namespace
CreateNamespace: Create NamespaceDeleteNamespace: Delete NamespaceFailoverNamespaces: Failover NamespacesRenameCustomSearchAttribute: Rename Custom Search AttributeUpdateNamespace: Update NamespaceUpdateNamespaceTags: Update Namespace TagsUpdateSearchAttributes: Update Search Attributes
- Namespace export
CreateNamespaceExportSink: Create Namespace Export SinkDeleteNamespaceExportSink: Delete Namespace Export SinkUpdateNamespaceExportSink: Update Namespace Export SinkValidateNamespaceExportSink: Validate Namespace Export Sink
- Nexus endpoints
CreateNexusEndpoint: Create Nexus EndpointDeleteNexusEndpoint: Delete Nexus EndpointUpdateNexusEndpoint: Update Nexus Endpoint
- Projects
CreateProject: Create ProjectDeleteProject: Delete ProjectSetServiceAccountProjectAccess: Set Service Account Project AccessSetUserGroupProjectAccess: Set User Group Project AccessSetUserProjectAccess: Set User Project AccessUpdateProject: Update Project
- Security
SecretFound: Detect Exposed API Key
- Service accounts
CreateServiceAccount: Create Service AccountDeleteServiceAccount: Delete Service AccountSetServiceAccountNamespaceAccess: Set Service Account Namespace AccessUpdateServiceAccount: Update Service Account
- Users
CreateJITUser: Create JIT UserCreateUser: Create UserDeleteUser: Delete UserInviteUsers: Invite UsersSetUserNamespaceAccess: Set User Namespace AccessUpdateIdentityNamespacePermissions: Update Identity Namespace PermissionsUpdateUser: Update UserUpdateUserNamespacePermissions: Update User Namespace PermissionsUserAcceptInvitation: User Accept InvitationUserLogin: User LoginUserSignup: User Signup
- User groups
AddUserGroupMember: Add User Group MemberCreateUserGroup: Create User GroupDeleteUserGroup: Delete User GroupRemoveUserGroupMember: Remove User Group MemberSetUserGroupNamespaceAccess: Set User Group Namespace AccessUpdateUserGroup: Update User Group
Audit log format
The audit log schema is defined in Protocol Buffers (protobuf).
The public LogRecord and Principal definitions specify the fields and types.
The format you receive depends on how you access the logs:
| Source | Format | Field names | Timestamp representation |
|---|---|---|---|
| AWS Kinesis or GCP Pub/Sub sink | Newline-separated JSON objects | snake_case, such as log_id | RFC 3339 string in emit_time |
| Cloud Ops API over HTTP | JSON response containing a logs array | camelCase, such as logId | RFC 3339 string in emitTime |
| Cloud Ops API over gRPC | Protobuf response containing repeated LogRecord messages | Defined by the generated client for your language | Protobuf Timestamp |
| Temporal Cloud UI download | JSON array of the UI's protobuf objects | camelCase, such as logId | Object containing seconds and nanos in emitTime |
For sink delivery and HTTP responses, Temporal converts protobuf messages to JSON internally using ProtoJSON.
The sink serializer uses protojson with UseProtoNames: true, which preserves the original protobuf field names in snake_case.
The HTTP API uses ProtoJSON's default camelCase field names; see the GetAuditLogs HTTP reference and its OpenAPI schema.
The UI download serializes the browser's protobuf objects directly, so its JSON representation differs from both sink delivery and the HTTP API.
Consume sink JSON
AWS Kinesis and GCP Pub/Sub use the same audit log JSON format. Each stream message can contain multiple events separated by newlines. Parse each line as a separate JSON object.
The following table uses the sink's field names.
Fields with default values can be omitted.
The raw_details object contains request details whose keys depend on the operation; those keys are not renamed by the sink serializer.
| Field | JSON type | Description |
|---|---|---|
operation | String | Operation that was performed. |
principal | Object | Who initiated the operation, with type, id, name, and api_key_id fields. |
raw_details | Object | Details about the request. |
x_forwarded_for | String | IP addresses making the call, in X-Forwarded-For format. |
emit_time | String | Time the operation was recorded, in RFC 3339 format. |
log_id | String | Unique identifier of the log entry. |
async_operation_id | String | Request or async operation identifier for correlation. |
status | String | Outcome of the API call, such as OK or ERROR. |
version | Integer | Internal version of the log entry. |
How to interpret the status
For supported Control Plane operations, the status field describes the outcome of the Temporal Cloud API call:
OK: The API call returned successfully.ERROR: The API call returned an error. This includes authorization failures, such as when the authenticated principal does not have permission to perform the operation.
Audit logs do not capture authentication failures.
For an asynchronous operation, OK means that Temporal Cloud accepted the API call.
The operation can fail after the audit log event is emitted, and the event is not updated with the final outcome.
Use GetAsyncOperation to check the operation state and failure reason.
The async_operation_id field can contain a request identifier or an async operation identifier.
Its presence does not indicate that the API call started an asynchronous operation.
The X-Forwarded-For format is a comma-separated list of IP addresses which should be evaluated from the last to the first, until meeting the first untrusted IP address of the list. This allows for instance to consider proxies in the path.
Temporal provides the caller IP address in that format to allow customers to identify a caller IP address even if one (or more proxies) are in the network path to reach Temporal Cloud.
Example of an audit log
The following example shows one JSON event delivered to an AWS Kinesis or GCP Pub/Sub sink.
It uses snake_case field names and an RFC 3339 timestamp.
{
"emit_time": "2025-10-02T20:23:37.048Z",
"operation": "UserLogin",
"status": "OK",
"version": 2,
"log_id": "edb3aa3e-78c4-48fc-9c7e-2078c6989775",
"principal": {
"type": "user",
"name": "user@example.com"
},
"x_forwarded_for": "10.1.2.3"
}
How to configure an audit log integration
Audit Logs can be configured in AWS Kinesis or GCP Pub/Sub. All Azure audit events are included in existing Audit Logs, including AWS Kinesis and GCP Pub/Sub sinks. An Azure-native streaming sink is not available during the Azure public preview.
How to troubleshoot an audit log sink
The Audit Logs page of the Temporal Cloud UI provides the current status of an Audit Log Integration.
- If an error is detected, a summary of the error appears below the page title.
- If the Audit Log Integration is functioning normally, an On badge appears next to the page heading.
After an Admin Operation is performed, users can see Audit Log messages flow through the stream.
Upon successful configuration of the Audit Log sink and set up of a stream, you will receive events within the hour of setup. Temporal is able to retain Audit Log information for up to 30 days. To retrieve logs up to the past 30 days, you will need to file a request.
If you experience an issue with an Audit Log sink, we can provide the missing audit information. Open a support ticket to request assistance.
How to delete an audit log sink
To delete an Audit Log sink, follow these steps:
- In the Temporal Cloud UI, select Settings.
- On the Settings page, select Audit Logs.
- In the Audit Logs Integration card, select Edit.
- At the bottom of the Audit Logs Integration page, choose Delete.
After you confirm the deletion, the Audit Log Sink is removed from your account and logs stop flowing to your stream.
View an audit log
An Audit Log can be viewed in the Temporal Cloud UI.
- In the Temporal Cloud UI, select Settings.
- On the Settings page, select Audit Logs.
Up to 1,000 events can be downloaded from the Audit Log UI to a local JSON file.
The download contains an array with camelCase field names and emitTime objects containing seconds and nanos.
See Audit log format to compare the download with sink delivery and Cloud Ops API responses.
Access an audit log via API
An Audit Log can be accessed using the Temporal Cloud Ops API. Use the API to access an Audit Log if you wish to make dashboards for viewing an Audit Log outside of Temporal Cloud. If your goal is to export an Audit Log, it is better to use an Audit Log sink and capture each entry as it is generated.
The gRPC API returns protobuf messages, and the HTTP API returns JSON with camelCase field names.
See Audit log format for the differences between these representations.
Audit Logs are accessible for the past 30 days using the API.
The API allows:
- StartTimeInclusive: Filter for UTC time >= (defaults to 30 days ago) - optional
- EndTimeExclusive: Filter for UTC time < (defaults to current time) - optional
- PageSize: Cannot exceed 1000. Defaults to 100. - optional
- PageToken: The page token if this is continuing from another response - optional