Azure Function access private resources

1.8k Views Asked by At

We have setup an infrastructure on Azure containing Azure AD , VM's etc. We use Azure Active Directory Domain Services to have the servers domain-joined and alsoo for local AD-authentication for some specific applications.

I would like to write some custom Azure functions that access the Azure Active Directory Domain Services for querying some specific AD-properties like msDS-UserPasswordExpiryTimeComputed. Those properties are not exposed in Azure AD.

Can an Azure function access resources that are only exposed into a Virtual Network? It is sufficient to have an App Service plan (Basic or Premium) to access these internal resources? Or is this not supported?

Best regards, Jens

2

There are 2 best solutions below

1
On BEST ANSWER

It should be possible using the VNET integration feature of App Service, or App Service Environments (ASE). See here for more information. Note that this document has not been updated for Azure Functions but the same process should work as long as you are creating Azure Functions on your standard/premium App Service plan or on an ASE. Please note that this won't work if you are trying to use the consumption (previously known as dynamic) plan for your function apps.

0
On

This can be done when deploy a function app and choose App Service plan. Like Paul said that consumption plan won't work.

Refer to https://learn.microsoft.com/en-us/azure/azure-functions/functions-infrastructure-as-code#deploy-a-function-app-on-the-app-service-plan