What should be 'Resource ID' value in Azure function linked service in data factory for managed identity access?

Sanal Kumar Parakkad 156 Reputation points
2021-08-30T14:13:56.81+00:00

I have an azure function app with Microsoft AD authentication enabled. I have configured Azure data factory pipeline to access an anonymous function through Azure function linked service.
I want to use Managed identity authentication from data factory to Azure function. I have added data factory managed identity to a role in Azure function AD application.

What should be 'Resource ID' value while creating Azure function linked service in data factory for managed identity access?
I tried giving the value 'api://<ADApplicationID>' and resource id (/subscription/xxxx/reourcegroup/xxx/provider/xx....', but both didnt work, which keeps throwing a 401 Unauthorized error.
The same works by hitting the azure function URL with Web activity in ADF pipeline with managed identity authentication without any issues.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. HimanshuSinha 19,547 Reputation points Microsoft Employee Moderator
    2021-08-31T20:35:16.167+00:00

    Hello @Sanal Kumar Parakkad ,
    Thanks for the ask and using the Microsoft Q&A platform .
    When you create a Azure function , the deployment process creates a app id . You can see the same

    127980-image.png

    Now navigate to the AAD search with the app name .

    128073-image.png

    Please use the application ID In the resource id and it should work . I just tested that on my side .

    128042-image.png

    128037-image.png

    Please do let me know how it goes .
    Thanks
    Himanshu
    Please do consider clicking on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members

    1 person found this answer helpful.

Your answer

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