---
title: "Create the audit logging storage integration"
method: POST
path: "/v2/organizations/settings/storageIntegration/auditLogging"
tags: ["Organizations"]
---

# Create the audit logging storage integration

`POST /v2/organizations/settings/storageIntegration/auditLogging`

## Request

- Base URL: `https://api.sigmacomputing.com`
- URL: `https://api.sigmacomputing.com/v2/organizations/settings/storageIntegration/auditLogging`
- Auth: HTTP bearer

Configure the cloud storage destination to use for audit log exports for an organization. 
### Usage notes
- To perform this operation, you must use API credentials owned by a user assigned the Admin account type.
- To read or update this setting for a tenant organization, use [impersonation](/docs/impersonate-users) to obtain a token for that tenant, then call this endpoint with that token.
- Create, update, and delete requests may return before the storage integration is actually provisioned or removed. Call [GET /v2/organizations/settings/storageIntegration/auditLogging](/reference/get-audit-logging-storage-integration) afterward to confirm the change has taken effect.

## Request body

- union
  - OrganizationsCreateAuditLoggingStorageIntegrationRequest0: AWS audit logging storage integration.
    - `provider` 'aws', required: Cloud storage provider to store audit log exports in an AWS S3 bucket.
    - `allowedLocation` string, required: S3 URI audit logs must export to. For example, `s3://my-bucket/audit-logs`.
    - `storageAwsRoleArn` string, required: AWS IAM role ARN Sigma assumes to write audit logs to the destination bucket.
  - OrganizationsCreateAuditLoggingStorageIntegrationRequest1: Azure audit logging storage integration.
    - `provider` 'azure', required: Cloud storage provider to store audit log exports in Azure Blob Storage.
    - `allowedLocation` string, required: Azure Blob Storage URI audit logs must export to. For example, `azure://myaccount.blob.core.windows.net/audit-logs`.
    - `tenantId` string, required: Azure AD tenant ID that owns the destination storage account.
  - OrganizationsCreateAuditLoggingStorageIntegrationRequest2: GCP audit logging storage integration.
    - `provider` 'gcp', required: Cloud storage provider to store audit log exports in a GCS bucket.
    - `allowedLocation` string, required: GCS URI audit logs must export to. For example, `gcs://my-bucket/audit-logs`.

## Response `202`

The storage integration settings after accepting the create request.

- OrganizationsCreateAuditLoggingStorageIntegrationResponse202: The storage integration settings after accepting the create request.
  - `provider` 'aws' | 'azure' | 'gcp', required: Cloud storage provider for the audit log exports.
  - `allowedLocation` string, required: Cloud storage URI for the audit log exports.
  - `storageAwsRoleArn` string: AWS IAM role ARN Sigma assumes to write to the destination bucket.
  - `tenantId` string: Azure AD tenant ID that owns the destination storage account.

---

[API](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api.md) - [All operations](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/revisions/fb6036208c49?raw)
