

Amazon Q Business will no longer be open to new customers starting on July 31, 2026. If you would like to use the service, please sign up prior to July 30. For capabilities similar to Q Business, explore Amazon Quick. [Learn more](https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/qbusiness-availability-change.html).

# Connecting Amazon Q Business to Microsoft OneDrive using AWS CloudFormation
<a name="onedrive-v2-cfn"></a>

You use the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-qbusiness-datasource.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-qbusiness-datasource.html) resource to connect a data source to your Amazon Q application.

Use the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-qbusiness-datasource.html#cfn-qbusiness-datasource-applicationid](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-qbusiness-datasource.html#cfn-qbusiness-datasource-applicationid) property to provide a JSON or YAML schema with the necessary configuration details specific to your data source connector.

To learn more about AWS CloudFormation, see [What is AWS CloudFormation?](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html) in the *CloudFormation User Guide*.

**Topics**
+ [Microsoft OneDrive JSON schema for using the configuration property with AWS CloudFormation](#onedrive-v2-cfn-json)
+ [Microsoft OneDrive YAML schema for using the configuration property with AWS CloudFormation](#onedrive-v2-cfn-yaml)

## Microsoft OneDrive JSON schema for using the configuration property with AWS CloudFormation
<a name="onedrive-v2-cfn-json"></a>

The following is the Microsoft OneDrive JSON schema and examples for the configuration property for AWS CloudFormation.

**Topics**
+ [Microsoft OneDrive JSON schema for using the configuration property with AWS CloudFormation](#onedrive-v2-cfn-json-schema)
+ [Microsoft OneDrive JSON schema example for using the configuration property with AWS CloudFormation](#onedrive-v2-cfn-json-example)

### Microsoft OneDrive JSON schema for using the configuration property with AWS CloudFormation
<a name="onedrive-v2-cfn-json-schema"></a>

The following is the Microsoft OneDrive JSON schema for the configuration property for CloudFormation.

```
{
    "type": "object",
    "properties": {
        "version": {
            "type": "string"
        },
        "type": {
            "type": "string",
            "enum": ["ONEDRIVEV3"]
        },
        "connectionConfiguration": {
            "type": "object",
            "properties": {
                "secretArn": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 2048
                },
                "tenantId": {
                    "type": "string",
                    "minLength": 36,
                    "maxLength": 36
                },
                "authType": {
                    "type": "string",
                    "enum": ["OAUTH2"]
                }
            },
            "required": ["secretArn", "tenantId", "authType"]
        },
        "dataEntityConfiguration": {
            "type": "object",
            "properties": {
                "crawlPersonalDrives": {
                    "anyOf": [{
                            "type": "boolean"
                        },
                        {
                            "type": "string",
                            "enum": ["true", "false"]
                        }
                    ]
                }
            }
        },
        "filterConfiguration": {
            "type": "object",
            "properties": {
                "inclusionUserEmailAddresses": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                    }
                },
                "userFilterPath": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024
                },
                "exclusionDriveItems": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                    }
                },
                "inclusionDriveItems": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                    }
                },
                "absoluteDateBefore": {
                    "type": "string",
                    "description": "ISO 8601 date-time format (e.g., 2024-12-31T23:59:59Z)"
                },
                "absoluteDateAfter": {
                    "type": "string",
                    "description": "ISO 8601 date-time format (e.g., 2024-12-31T23:59:59Z)"
                },
                "maxFileSizeInMegaBytes": {
                    "type": "string"
                }
            }
        },
        "deletionProtectionConfiguration": {
            "type": "object",
            "properties": {
                "enableDeletionProtection": {
                    "anyOf": [{
                            "type": "boolean"
                        },
                        {
                            "type": "string",
                            "enum": ["true", "false"]
                        }
                    ]
                },
                "deletionProtectionThreshold": {
                    "type": "string",
                    "description": "percentage value of range (0-100)" 
                }
            }
        },
        "crawlIdentities": {
            "anyOf": [{
                    "type": "boolean"
                },
                {
                    "type": "string",
                    "enum": ["true", "false"]
                }
            ]
        },
        "accessControlConfiguration": {
            "type": "object",
            "properties": {
                "crawlAcl": {
                    "anyOf": [{
                            "type": "boolean"
                        },
                        {
                            "type": "string",
                            "enum": ["true", "false"]
                        }
                    ]
                }
            }
        },
        "identityLoggingStatus": {
            "type": "string",
            "enum": ["ENABLED", "DISABLED"]
        },
    },
    "required": ["connectionConfiguration", "dataEntityConfiguration", "type"]
}
```

### Microsoft OneDrive JSON schema example for using the configuration property with AWS CloudFormation
<a name="onedrive-v2-cfn-json-example"></a>

The following is the Microsoft OneDrive JSON example for the Configuration property for CloudFormation.

```
{
    "type": "ONEDRIVEV3",
    "crawlIdentities": false,
    "connectionConfiguration": {
      "secretArn": "arn:aws:secretsmanager:us-west-2:123456789012:secret:my-one-drive-secret",
      "tenantId": "1234a12c-1234-1234-1abc-1234ab12a12a",
      "authType": "OAUTH2"
    },
    "dataEntityConfiguration": {
      "crawlPersonalDrives": true
    },
    "accessControlConfiguration": {
      "crawlAcl": false
    },
    "filterConfiguration": {
      "inclusionUserEmailAddresses": ["user123@amazon.com"],
      "maxFileSizeInMegaBytes": "50",
      "exclusionDriveItems": ["path/to/folder1","path/to/file1"],
       "inclusionDriveItems": ["path/to/folder2","path/to/file2"],
       "userFilterPath": "s3://bucket/prefix/object.txt",
       "absoluteDateBefore": "2025-08-02T00:00:00Z",
       "absoluteDateAfter": "2025-08-01T00:00:00Z"
    },
    "deletionProtectionConfiguration": {
      "enableDeletionProtection": true,
      "deletionProtectionThreshold": "10"
    },
    "version": "3.0.0", 
    "identityLoggingStatus": "DISABLED"
}
```

## Microsoft OneDrive YAML schema for using the configuration property with AWS CloudFormation
<a name="onedrive-v2-cfn-yaml"></a>

The following is the Microsoft OneDrive YAML schema and examples for the configuration property for AWS CloudFormation:

**Topics**
+ [Microsoft OneDrive YAML schema for using the configuration property with AWS CloudFormation](#onedrive-v2-cfn-yaml-schema)
+ [Microsoft OneDrive YAML schema example for using the configuration property with AWS CloudFormation](#onedrive-v2-cfn-yaml-example)

### Microsoft OneDrive YAML schema for using the configuration property with AWS CloudFormation
<a name="onedrive-v2-cfn-yaml-schema"></a>

The following is the Microsoft OneDrive YAML schema for the configuration property for CloudFormation.

```
configuration:
  type: object
  properties:
    version:
      type: string
    type:
      type: string
      enum:
        - ONEDRIVEV3
    connectionConfiguration:
      type: object
      properties:
        secretArn:
          type: string
          minLength: 20
          maxLength: 2048
        tenantId:
          type: string
          minLength: 36
          maxLength: 36
        authType:
          type: string
          enum:
            - OAUTH2
      required:
        - secretArn
        - tenantId
        - authType
    dataEntityConfiguration:
      type: object
      properties:
        crawlPersonalDrives:
          anyOf:
            - type: boolean
            - type: string
              enum:
                - 'true'
                - 'false'
    filterConfiguration:
      type: object
      properties:
        inclusionUserEmailAddresses:
          type: array
          maxItems: 100
          items:
            type: string
            minLength: 1
            maxLength: 1024
        userFilterPath:
          type: string
          minLength: 1
          maxLength: 1024
        exclusionDriveItems:
          type: array
          maxItems: 100
          items:
            type: string
            minLength: 1
            maxLength: 1024
        inclusionDriveItems:
          type: array
          maxItems: 100
          items:
            type: string
            minLength: 1
            maxLength: 1024
        absoluteDateBefore:
          type: string
          description: 'ISO 8601 date-time format (e.g., 2024-12-31T23:59:59Z)'
        absoluteDateAfter:
          type: string
          description: 'ISO 8601 date-time format (e.g., 2024-12-31T23:59:59Z)'
        maxFileSizeInMegaBytes:
          type: string
    deletionProtectionConfiguration:
      type: object
      properties:
        enableDeletionProtection:
          anyOf:
            - type: boolean
            - type: string
              enum:
                - 'true'
                - 'false'
        deletionProtectionThreshold:
          type: string
          description: 'percentage value of range (0-100)'
    crawlIdentities:
      anyOf:
        - type: boolean
        - type: string
          enum:
            - 'true'
            - 'false'
    accessControlConfiguration:
      type: object
      properties:
        crawlAcl:
          anyOf:
            - type: boolean
            - type: string
              enum:
                - 'true'
                - 'false'
    identityLoggingStatus:
      type: string
      enum:
        - ENABLED
        - DISABLED
  required:
    - connectionConfiguration
    - dataEntityConfiguration
    - type
```

### Microsoft OneDrive YAML schema example for using the configuration property with AWS CloudFormation
<a name="onedrive-v2-cfn-yaml-example"></a>

The following is the Microsoft OneDrive YAML example for the Configuration property for CloudFormation:

```
configuration:
  type: ONEDRIVEV3
  crawlIdentities: false
  connectionConfiguration:
    secretArn: 'arn:aws:secretsmanager:us-west-2:123456789012:secret:my-one-drive-secret'
    tenantId: '1234a12c-1234-1234-1abc-1234ab12a12a'
    authType: OAUTH2
  dataEntityConfiguration:
    crawlPersonalDrives: true
  accessControlConfiguration:
    crawlAcl: false
  filterConfiguration:
    inclusionUserEmailAddresses:
      - 'user123@amazon.com'
    maxFileSizeInMegaBytes: '50'
    exclusionDriveItems:
      - 'path/to/folder1'
      - 'path/to/file1'
    inclusionDriveItems:
      - 'path/to/folder2'
      - 'path/to/file2'
    userFilterPath: 's3://bucket/prefix/object.txt'
    absoluteDateBefore: '2025-08-02T00:00:00Z'
    absoluteDateAfter: '2025-08-01T00:00:00Z'
  deletionProtectionConfiguration:
    enableDeletionProtection: true
    deletionProtectionThreshold: '10'
  version: '3.0.0'
  identityLoggingStatus: DISABLED
```