You have 2 alternatives to achieve what you want to achieve :
Option 1: Using Power Automate to trigger Azure Data Factory
- Create Power Automate Flow:
- Use Power Automate to monitor a SharePoint document library.
- Add a trigger such as "When a file is created or modified (properties only)" to watch for changes in SharePoint.
- Add a step for file approval (e.g., using "Start and wait for an approval" action). The flow will wait until the file is approved.
- Trigger ADF Pipeline from Power Automate:
- After the file is approved, you can add a step to call an Azure Data Factory pipeline.
- Use the "HTTP" action in Power Automate to invoke the ADF REST API to trigger the pipeline that pulls data from SharePoint.
- Security: You can use a managed identity (from the ADF pipeline) to authenticate and access Azure resources securely.
Option 2: Using Azure Data Factory to Directly Access SharePoint Files
- Create an ADF Pipeline:
- In ADF, use the Copy Activity to copy files from SharePoint Online to Azure Storage.
- For this, you need to set up a Linked Service in ADF for SharePoint Online. This connection can be authenticated using OAuth2, preferably via a service principal or a managed identity.
- Set up Authentication with Managed Identity:
- If you are using a managed identity, ensure that the ADF’s managed identity has been granted the necessary permissions in SharePoint and Azure.
- On the SharePoint side, configure app registration with API permissions (for Graph API or SharePoint API), and assign the ADF’s managed identity the required role to access the files.
- Ensure Secure Transfer to Azure Storage:
- Once you’ve connected to SharePoint and can read files, the next step in the ADF pipeline is to write them to your Azure Storage Account.
- Use a Managed Identity for the Azure Storage connection as well, ensuring no credentials are hardcoded.
- Schedule the ADF Pipeline:
- The pipeline can be scheduled or triggered automatically via Power Automate or Logic Apps once the file is approved in the SharePoint workflow.