In this article, we will discuss how to create Azure Functions in C# using Azure Portal.
Table of Contents
Azure Functions C# Example
Before Starting the Azure Functions in C#, Assuming, you have some idea on Azure Function. Follow the below steps.
Log in to the Azure Portal (https://portal.azure.com/)
Once, log in to the Portal, search for the Function App, and then click on the Search result.

Now, On the Function App window, click on the + Add button to create the new function App.

On the Create Function App window, Provide the below Details.
On the Basics Tab, you will have to provide the below details
- Subscription: Select your Azure Subscription.
- Resource Group: You can either choose your existing Resource Group or If you do not have a Resource Group, you can create a new Resource Group by clicking on the Create new link.
- Function App name: Provide a unique name for your Azure Function App.
- Publish: Choose the Code option for this.
- Runtime stack: Choose the .NET Core for this option.
- Version: Choose version 3.1.
- Region: Choose the Region for your Azure Function App.
Now, click on the Next: Hosting > button to go to the Hosting tab.

Now on the Hosting tab, provide the below details
- Storage account: Choose your existing Storage Account or you can create a new storage account by clicking on the Create new button.
- Operating System: Choose Windows as your Operating System.
- Plan Type: You can choose the Plan type based on your Subscription.
Now click on the Next: Monitoring > button to navigate to the Monitoring tab.

On the Monitoring tab, Provide the below details
- Enable Application Insights: You can select the Yes option here.
- Application Insights: Choose application Insights. The Region of the Application insight should be the same as the Storage account.
Then click on the Review + Create button

Finally, click on the Create Button to create the Azure Function App.
Now if you can able to see the Azure Function App is deployed successfully without any issues.

Now click on the Go to Resource button to navigate to the Azure Function App that we have created. So now our Function App is ready so the next step is to create the Function. You can create that in two ways
Click on the Functions link from the left side on the Function App page and then click on the + Add button (Modern Experience)

.Or, Another way is to click on the Switch to classic experience —> Continue to classic experience

Now click on the + Add New Function button

Now if we will consider the first option (Modern Experience)
Once you will click on the + Add button, Click on HTTP trigger, You can select the type of trigger based on your business need.

On the New Function window, You need to provide the Function name and Authorization level as Function. But can choose Anonymous or Admin based on your requirement. Then click on the Create Function button to create the Azure Function.

Now you can able to see the function got created Successfully without any issues.

Now if you want to check whether the Azure function is working properly or not, You can click on the Code + Test link from the left-side navigation. If you want to modify or add any code then you can do that on the Editor and then run it to check if the function is working.

Now, choose the HTTP method and provide the name parameter value in body in JSON format as mentioned below, and then click on the Run button to execute the function.

Now see here, the function executed successfully with the expected output and with proper response code i.e 200 OK.
One more thing, Let’s you want to check whether this function is working or not using the Postman app, then you can click on the Get function URL button from the top. It will provide you with the function URL.

Now click on the Copy button from the below window to copy the Azure Function URL.
You will get the URL below

Now, Open the Postman app, Select the HTTP method, paste the Azure Function URL, Provide the name parameter value in JSON format in the body, and then click on the Send button. You can able to see it Provided us the expected output with the Proper response code 200 OK.

You may also like following the below articles
Wrapping Up
In this article, we discussed how to create Azure Functions in C# using Azure Portal. Thanks for reading this article !!!