Connecting Sharepoint Document Library to ADF via managed identity

Anonymous
2021-04-28T16:23:22.417+00:00

Hello there,

I'm trying to implement a solution migrate SharePoint Document library to Azure Blob Storage via Data Factory(only). I have come across multiple solutions which implement logic apps or either postman. I also came across one solution in Microsoft documents here:
https://learn.microsoft.com/en-us/azure/data-factory/connector-sharepoint-online-list
However, in this scenario, for web activity Body field expects details like client ID, client secret mentioned in plain text. And instead that to be done is there any alternative wherein we do not need these details to be exposed or can use managed identity in the web activity to fetch token.

Any help on this would be appreciated!

@KranthiPakala-MSFT I came across your solution to this and need a little tweak to that.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
{count} votes

Accepted answer
  1. KranthiPakala-MSFT 46,642 Reputation points Microsoft Employee Moderator
    2021-04-29T20:08:34.96+00:00

    Hi anonymous user,

    Thanks for clarifying the ask. As per the current ADF SharePoint connector limitation, it uses service principal authentication to connect to SharePoint. This is limitation by design at the moment. Hence managed identity not an option

    92657-image.png

    My main query here is, after following the above mentioned link, it expects the client credentials to be written in body part. I need a workaround to that specific part for my solution to be implemented in my case. So if you can help me with that specific part, would be really appreciated.

    In order to avoid exposing client credentials in the body of the web activity while getting the access token, you can store the value of the client credentials in Azure Key Vault. Then have another web activity before GetBearerToken web activity to retrieve the client credentials from Key Vault using Get Secret API - GET {vaultBaseUrl}/secrets/{secret-name}/{secret-version}?api-version=7.1

    92733-image.png

    92630-image.png

    And use output.value of that web activity in body of the GetBearerToken web activity using a dynamic expression as below. This way you can avoid exposing the client credentials in your ADF web activity.

    92687-image.png

    Hope this info helps. Do let us know if you have further query.

    ----------

    Please don’t forget to Accept Answer and Up-Vote wherever the information provided helps you, this can be beneficial to other community members.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.