Delete a file in sharepoint using Azure Data Factory Delete Activity

Arghya 1 Reputation point
2022-09-02T16:11:12.597+00:00

I am trying to delete a file that is located in a sharepoint directory after successful copy activity. The Delete Activity is having the following properties:

Linked Service : HTTP  
DataSet : Excel  
Additional Header: @{concat('Authorization: Bearer ', activity('GetToken').output.access_token)}   
                                Here, GetToken is the Web Activity in ADF that generates a token number for accessing   
                                SharePoint.  

When I am running the pipeline, I am getting the below error:

     Invalid delete activity payload with 'folderPath' that is required and cannot be empty.  

I have no clue on how to tackle this.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
6,659 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 35,366 Reputation points Microsoft Employee
    2022-09-02T18:44:11.057+00:00

    Hello @Arghya ,

    Thanks for the question and using MS Q&A platform.

    As per my understanding you are trying to delete a file in Sharepoint online using Azure Data Factory. Please correct if I'm not accurate.

    Currently delete activity in ADF only supports the below data stores and not sharepoint online. which is why you are receiving the above error.

    237422-image.png
    Ref: Delete activity supported data sources

    As a workaround you may try exploring HTTP connector. OR you can use custom activity and write your own code to delete files from SharePoint.

    Hope this info helps.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how