Questions tagged [azure-functions]

Azure Functions is an event-driven serverless compute platform in Azure and Azure Stack. Its open-source runtime also works on multiple destinations including Kubernetes, Azure IoT Edge, on-premises, and other clouds.

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. You can write just the code you need for the problem at hand, without worrying about a whole application or the infrastructure to run it. Functions can make development even more productive, and you can use your development language of choice, such as C#, F#, Node.js, Java, or PHP. Pay only for the time your code runs and trust Azure to scale as needed. Azure Functions lets you develop serverless applications on Microsoft Azure.


###Getting Started

15299 questions
22
votes
4 answers

OpenAPI (aka Swagger) in Azure Functions V2

I'm creating a V2 Function App and want to use Swagger/Open API for docs, however it is not yet supported in the Azure Portal for V2 Functions. Any suggestions on how I can use Swagger with V2 Functions in VSTS to create the docs on each build?
Albert
  • 255
  • 1
  • 2
  • 8
22
votes
4 answers

How to remove the word ‘api’ from Azure functions url

When you create an Http triggered API, Azure function hosts it on https://[function-app-name].azurewebsites.net/api/[Route-configured-in-application] Is there any way of getting rid of the term api from the URL and make it look…
Mayank
  • 908
  • 9
  • 14
22
votes
4 answers

How to upload a large file through an Azure function?

I am exploring Azure Functions. The scenarios I have tested so far work great. I am at a point where I am trying to figure out a way to upload files (20MB+) through an Azure Function. The idea is that the Azure Function would first validate whether…
Kzryzstof
  • 7,688
  • 10
  • 61
  • 108
22
votes
3 answers

How can I bind output values to my async Azure Function?

How can I bind my outputs to an async function? The usual method of setting the parameter to out doesn't work with async functions. Example using System; public static async void Run(string input, TraceWriter log, out string blobOutput) { …
Zain Rizvi
  • 23,586
  • 22
  • 91
  • 133
21
votes
1 answer

The type initializer for 'Microsoft.EntityFrameworkCore.Query.QueryableMethods' threw an exception

I've got one function app which throws following error when I run it with azure-functions-core-tools@4.0.3780 start command. func start System.Private.CoreLib: Exception while executing function: Test. Microsoft.EntityFrameworkCore: The type…
Józef Podlecki
  • 10,453
  • 5
  • 24
  • 50
21
votes
3 answers

Delete files older than X number of days from Azure Blob Storage using Azure function

I want to create an Azure function that deletes files from azure blob storage when last modifed older than 30 days. Can anyone help or have a documentation to do that?
Dani
  • 231
  • 1
  • 2
  • 5
21
votes
6 answers

Azure functions: return JSON object

Consider: import logging import azure.functions as func def main(req: func.HttpRequest) -> func.HttpResponse: logging.info('Python HTTP trigger function processed a request.') name = {"test":"jjj"} return func.HttpResponse(name) Above…
maswadkar
  • 1,502
  • 1
  • 13
  • 23
21
votes
10 answers

Azure Functions not showing up in Function app in portal

I've got a solution that contains a web app and class libraries. I added two Azure function projects to this, the first is version 1 and the second version 2. Both run fine locally. This code is in an online repository (Visual Studio Online, now…
nmit026
  • 3,024
  • 2
  • 27
  • 53
21
votes
9 answers

Azure Function with AD auth results in 401 Unauthorized when using Bearer tokens

I have a very simple Azure function in C# for which I've setup Azure AD Auth. I've just used the Express settings to create an App registration in the Function configuration. public static class IsAuthenticated { …
Staeff
  • 4,994
  • 6
  • 34
  • 58
21
votes
7 answers

How to add configuration values in AppSettings.json in Azure functions. Is there any structure for it?

What is the standard structure to add keys to appsettings.json? Also, how to read those values in our run.csx? Normally in app.config, we had ConfigurationManager.GetSettings["SettingName"]; Is there any similar implementation in Azure Function?
Harshit Agarwal
  • 323
  • 1
  • 2
  • 6
21
votes
5 answers

How do I use external assemblies with Microsoft Azure Function Apps?

The documentation says that you can put a DLL in a bin folder and reference it using a special #r syntax, however in the Azure portal I cannot find how to upload these DLLs. Is this possible, and if so, how is that supposed to be accomplished?
Josh
  • 6,944
  • 8
  • 41
  • 64
20
votes
11 answers

port 7071 is unavailable. Close the process using that port, or specify another port using --port [-p]

I try to run the azure function app (Http Triggerd API) from my local (using VS code). But I'm getting an error "port 7071 is unavailable. Close the process using that port, or specify another port using --port [-p]." I checked the list of ports…
20
votes
3 answers

Azure Function App = run single Azure Function locally to debug

In visual studio I have created an Azure Function App with several Function. When I launch the Function App debugger from the tool bar all Functions are triggered. Is there a way to trigger a single function from the App within Visual Studio 2017?…
Creggdev
  • 261
  • 4
  • 9
20
votes
5 answers

Using JSON Web Tokens (JWT) with Azure Functions (WITHOUT using Active Directory)

I am sure someone out there has already done this, but I have yet to find any documentation with regard to the Microsoft implementation of JWT. The official documentation from Microsoft for their JWT library is basically an empty page,…
bdcoder
  • 3,280
  • 8
  • 35
  • 55
20
votes
1 answer

Azure Function execution speed is extremely slow and inconsistent

I am writing few Azure Functions script that reads and write from/to an internal database and display relevant information into a webpage. I noticed extreme slowness or even timeout in the web UI when loading the web page which calls the Azure…
Eyad
  • 13,440
  • 6
  • 26
  • 43