Azure

How to create and test Azure Functions using Azure Portal

by Tuesday, August 15, 2017 comments
Azure Functions is a solution for easily running small pieces of code in the cloud. We can create, execute, and test our custom logic function without creating a VM or web applications and also without needing to install any software or infrastructure to run the function. In this article, you will learn about create and test azure functions using azure Portal

Steps to Create Azure Functions:

Step 1

Navigate to https://functions.azure.com and click on “Login in to your account".


Step 2:

We should be following two ways to create Azure Functions

Navigate to https://functions.azure.com and Provide Azure Functions details and create the Azure Functions.



Navigate to https://portal.azure.com , Click on New from Azure portal > Web + Mobile >Click on see All or Search > Function App



Step 3: Create Azure Functions App:

Provide the functions App Name and following details for create new functions
App Name – Provide your Unique functions name

Subscriptions – Select your subscription Free or any type

Resource Group -create or select existing resource group name.

Hosting Plan – You can Select default hosting plan as consumption plan, you have to pay only for the time functions code runs.

Location – Select Your nearest location (eg. South Central US).

Storage Account – You can Select or existing storage account.


Step 4:

Click on create and wait for a few minutes to deploy the new Azure Function app. Expand your new function app and click the + button next to Functions.


Step 5:

After clicking on + button, you will get the following screen, select WebHook + API, choose a language for your function, and click on Create this function.


Step 6: Azure Functions Editor

The .csx file format allows you to write a C# function. Include any assembly references and namespaces at the beginning of the file as usual in C# and write your logic in Run method, just like below.


Step 7:

Run and Test Azure Functions:

You can provide JSON string like the following in the request body and Click on the Run button for test the Azure Functions


Testing in Web Browser:

The web browser is a simple way to trigger functions via HTTP. You can use a browser for GET requests that do not require a body payload, and that use only query string parameters.

To test the function we defined earlier, copy the Function Url from the Azure function portal like below



Append the name parameter to the query string. Use an actual name for the <Enter a name here> placeholder.

https://<Your Function App>.azurewebsites.net/api/<Your Function Name>?code=<your access code>&name=<Enter a name here>, Paste the URL into your browser, and you should get a response similar to the following.


Related Article:

Getting Started with Azure Functions Using Azure Free Trial Account

Summary:

In this article, you learned about Azure Functions, how to create and test Azure Functions in Azure Portal.

If you have any questions/ feedback/ issues, please write in the comment box.
SJ
Suthahar Jegatheesan

Senior Solutions Architect · Microsoft Azure, AI & Mobile. Author of the Xamarin Q&A Book.

1 comment:

sponsored

What Colleagues Say

“Suthahar is one of the most thorough and knowledgeable cloud architects I’ve worked with. His depth on Azure and ability to make complex mobile solutions work cross-platform is remarkable. He always delivers beyond expectations.”

AT Arun T. Senior Engineering Manager · Direct Manager

“I’ve followed Suthahar’s MSDEVBUILD blog for years — practical, deep, always current. Working alongside him confirmed what I suspected: he’s as sharp in person as on paper, and a genuinely generous mentor and architect.”

RK Rajesh K. Lead Developer · Mindtree

Certifications & Recognition

AZ-300 · Azure Architect Technologies AZ-301 · Azure Architect Design AZ-104 · Azure Administrator Associate AI-100 · Designing Azure AI Solutions DP-900 · Azure Data Fundamentals MCPD · Windows Phone Certified SAFe® 4 Scrum Master

Technical Expertise

☁ Cloud Platforms Microsoft Azure — Expert · 18 yrs App Services · AKS · Functions · Cosmos DB · APIM · Entra ID AWS & Google Cloud — Advanced
๐Ÿค– AI & Automation Azure OpenAI / GenAI — Advanced · 5 yrs RAG Pipelines · Bot Framework · Cognitive Services · Vision & Speech AI · ML.NET
๐Ÿ“ฑ Mobile Architecture .NET MAUI & Xamarin — Expert · 12 yrs Flutter · Native iOS/Android · Offline-First · Secure Storage & Auth
๐Ÿ”’ Identity & Security Microsoft Entra ID — Expert OAuth 2.0 · OIDC · Zero Trust · Conditional Access · RBAC · Key Vault

Speaking & Community

Microsoft User Group Malaysia Recurring speaker on Azure architecture, AI integration and .NET mobile development across Malaysia and APAC.
Global Azure Bootcamp — Chennai Presented “AI into Xamarin Mobile Apps” at GAB Chennai, part of the worldwide Global Azure community event.
AI & Azure OpenAI Community Events Workshops and live demos on RAG pipelines, AI agents and intelligent workflow automation since 2023.
Mobile & Cloud Workshops — Coimbatore Multi-day deep-dive sessions at GRG Computer Technology, KG Microsoft Innovation Center and RVS College of Arts and Science.
500+Blog Articles
50+Conference Talks
10K+Monthly Readers
30Public Repositories
3Continents Delivered
MSDEVBUILD Assistant Ask about Suthahar, Azure, AI or mentorship
Hi! I’m a simple FAQ bot for MSDEVBUILD. Tap a question below or type your own.