CData Python Connector for Microsoft SharePoint

Build 25.0.9539

DeleteAttachment

Removes an attachment from a SharePoint list item. Helps manage file storage and remove outdated or unnecessary attachments.

Stored Procedure-Specific Information

The DeleteAttachment stored procedure deletes an attachment from a list item in SharePoint. The URL parameter specifies the full URL to the attachment, and the List parameter specifies the list name.

To execute this procedure, enter:

EXEC DeleteAttachment URL = 'https://mysite.sharepoint.com/Lists/Test List 1/Attachments/5/Test Document 2.txt', List = 'Test List 1';

Input

Name Type Required Description
URL String True The full URL of the attachment to be deleted. Example: 'https://company.sharepoint.com/sites/documents/attachment1.jpg'.
List String False The name of the SharePoint list where the attachment is stored. Example: 'ProjectFiles'.

Result Set Columns

Name Type Description
Success Boolean Indicates whether the deletion operation was successful. Returns 'true' if the attachment was deleted successfully, otherwise 'false'.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 25.0.9539