Forum Discussion

mariellecespedes's avatar
mariellecespedes
Copper Contributor
Oct 29, 2020

Execute Azure Function using ADF activity and AAD Login

We are trying to execute an Azure Function (HTTP type) using Azure Data Factory (ADF). The Function App has the App Service Authentication set as "On" and the action to take when request is not authenticated is set as "Log in with Azure Active Directory". 

 

 

If we have this configuration in the Function App, is it possible to execute the Azure Function from ADF?

 

We configured the Azure Function and Active Directory App by following this documentation:
Configure your App Service or Azure Functions app to use Azure AD login

 

We aren’t using a web app and maybe that’s the confusing part when trying to follow the steps from the documentation. ADF is the one that needs to authenticate when trying to access/execute the function. Do you know anything about this type of configuration?

    • mariellecespedes's avatar
      mariellecespedes
      Copper Contributor

      Nills Franssens 

      Yes, we have Managed Identity in ADF.

       

      The response when we get after the execution is a 401 Error type (unauthorized). 

       

      We used the Advanced settings configuration in the Function App and used the following information from the App Service app:

      • Client ID
      • Tenant ID
      • Client secret
      • Application ID URI

      We retrieved the information from the Overview tab from the App Service app. Copy-pasted it into the Function App configuration and followed the steps from the documentation.

       

      We aren’t using a web app (in this case it is ADF) and maybe that’s the confusing part when following the steps from the documentation, as ADF is the one who is calling the function.

Resources