Delete a file in sharepoint using Azure Data Factory Delete Activity

Arghya 1 Reputation point

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   

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.
9,755 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,427 Reputation points Microsoft Employee

    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.

    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