2017/10/09 - By default, Login-AzureRmAccount does an interactive login, which won't work in an Azure Function. Instead, you'll need to log in using a Service Principal, e.g.. Login-AzureRmAccount -ServicePrincipal -ApplicationId .