How to copy files from SharePoint document library via ADF when IRM is enabled on SharePoint

Priya Jha 866 Reputation points
2021-02-09T11:14:00.82+00:00

Hi All,

I need to connect to a SubSite Document library of a SharePoint site via ServicePrincipal and copy files to blob using ADF

The Service Principal has been granted Read access on the entire SharePoint site and in normal scenario my ADF pipeline is able to copy file from sharepoint to blob

We have gone through following sites and have created our pipeline:

https://learn.microsoft.com/en-us/answers/questions/53586/copy-files-from-sharepoint-into-azure-data-lake-st.html
https://learn.microsoft.com/en-us/azure/data-factory/connector-sharepoint-online-list#copy-file-from-sharepoint-online

But when IRM property is enabled on the SharePoint Document library, ADF pipeline is failing with the error:

Failure happened on 'Sink' side. ErrorCode=HttpFileFailedToRead,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Failed to read data from http server. Check the error from http server:The remote server returned an error: (500) Internal Server Error.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Net.WebException,Message=The remote server returned an error: (500) Internal Server Error.,Source=System,'

I provided Service Principal Full Control access on SharePoint site but still pipeline failed with the same error.
My pipeline is failing whenever IRM property is enabled and is running successfully as soon as that property is disabled.

How can i proceed to read the files from SharePoint via ADF when IRM is enabled on SharePoint document library?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,763 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,875 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. MichaelHan-MSFT 18,016 Reputation points
    2021-02-10T07:17:12.403+00:00

    Hi @Priya Jha ,

    It's not supported to copy files on document libraries with IRM enabled.

    Also we cannot copy files using power automate/flow if IRM is enabled on SharePoint document library.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments