Sitemap

Simple Azure Service Entra ID App Registration Project

7 min readMay 2, 2026

--

In today’s cloud-driven applications, authentication and access control are not just optional features — they are essential. Whether you are building an internal enterprise tool or a public-facing service, you need a reliable way to ensure that only the right users can access your application and perform specific actions.

In this guide, we will walk through a real-world scenario where we deploy a simple Node.js web application on Azure App Service and secure it using Microsoft Entra ID. The goal is not just to host an application, but to integrate identity, authentication, and role-based access control in a practical and easy-to-understand way.

Scenario

Imagine you are building a web application for an organization where different users have different levels of access. Some users should only be able to view data, while others should have permission to access the application and interact with it. At the same time, you want to ensure that unauthorized users cannot even see or open the application.

To achieve this, we will:

  • Deploy a Node.js web application using Azure App Service
  • Enable authentication using Microsoft Entra ID (Azure AD)
  • Register the application and configure secure login
  • Create roles (such as Reader) to control access
  • Assign users to roles and restrict access for others

By the end of this implementation, you will have a working application where:

  • Authorized users can log in and access the app
  • Assigned users can see the app in their account
  • Unassigned users are completely blocked

What You Will Learn

  • Create and configure an Azure Web App
  • Deploy a Node.js application using Kudu
  • Integrate Microsoft Entra ID authentication (Easy Auth)
  • Configure App Registration and redirect URIs
  • Create and assign roles using Enterprise Applications
  • Control user access based on roles

Create a User in Entra ID

First, go to the user section in Microsoft Entra ID and click on Add user, then select Create new user. This user will be used later to test authentication and access control in the application.

I created two user one who will have access and other who are not authorized

Press enter or click to view image in full size

Create Azure Web App

Next, go to the Azure Portal and navigate to the App Service section. Click on Create Web App to start creating a new service. Since we are building a simple web application, select the runtime stack as Node.js and leave all other settings as default. After reviewing the configuration, click on the Create button.

Press enter or click to view image in full size

Once you click create, Azure will start validating and deploying your application. After the process is completed successfully, your web app will be ready to use.

Press enter or click to view image in full size

Deploy Node.js Application

Now we will deploy a simple Node.js application. If you already have a project on your local system, you can use it directly.

Go to your Web App and open Advanced Tools (Kudu), then click on the Go button. From there, navigate to the file manager section. Before uploading your application, remove the default hostingstart.html file. Upload your application in ZIP format, extract it, and move all files into the wwwroot folder so that your application becomes active.

Press enter or click to view image in full size
Advance Tool
Press enter or click to view image in full size
Kudo Dashboard

you have to delete the pre-defined hosting file

Press enter or click to view image in full size

Then, Drag and Drop you Zip file here.

Github: https://github.com/Amancs1541/AzureWebService.git

Get Aman Varma’s stories in your inbox

Join Medium for free to get updates from this writer.

After Adding this file in wwwroot, you need to open SSH shell

Press enter or click to view image in full size

The you need to install the package and that it for this demo app.

The Command will be look like this

Press enter or click to view image in full size

Then go to your service.

After placing the files correctly, install dependencies using the command npm install. Then start your application using the appropriate command such as node app.js. This ensures that your application is running properly in the Azure environment.

Press enter or click to view image in full size

Go to the Overview section of your Web App, where you will find the application URL. Open this URL in your browser. If everything is configured correctly, your application will load successfully. If there are issues, you can use the troubleshooting options available in Azure.

Press enter or click to view image in full size

You can also use Troubleshooting section or Log steam section for any troubleshooting

Press enter or click to view image in full size
Press enter or click to view image in full size

Integrate Microsoft Entra ID (Authentication)

Next, we will integrate an Identity Provider. Go to the Authentication section in your Web App and click on Add Identity Provider. You will see multiple options; select Microsoft.

Press enter or click to view image in full size

you will something like this.

Press enter or click to view image in full size

if you already have register the application in Entra ID then you can add or you can direclty create one from here.

Configure App Registration

To complete authentication setup, go to Certificates and Secrets in App Registration and create a new client secret. Copy both the secret value and the secret ID. Then, in the Issuer URL field, paste your tenant ID.

After that, go to Microsoft Entra ID and add the redirect URI. You can copy this URL from your Web App. Once everything is configured, try accessing your application again.

Press enter or click to view image in full size

Then you need to add URI

Press enter or click to view image in full size

Dont Forget to enable this, ID share which means service can have Easy Auth without using anything internally in web service

Press enter or click to view image in full size

Create App Role

You can create an app role to control user access. Go to App Registration and navigate to the App roles section. Create a role such as Reader, which will allow users to access the application with limited permissions.

Press enter or click to view image in full size

Role such as Task.Reader , Task.Admin

Press enter or click to view image in full size

Validate Access Control

Once the role is assigned, the selected user will be able to see and access the application. However, if another user who is not assigned tries to log in, they will not be able to access or even see the application. This confirms that access control is working correctly.

Press enter or click to view image in full size
You can use this setting
Press enter or click to view image in full size

You can include user here who can see App

One of my User Scobby which has Access

Press enter or click to view image in full size

But the User who dont have access to app they can see something

It is important to understand that My Apps (MyAccess) does not work properly in this setup because we are using Easy Auth from App Service. If you want full Single Sign-On behavior through My Apps, you need to configure authentication using MSAL in your Node.js or frontend application instead of relying only on Easy Auth.

Press enter or click to view image in full size

In this guide, we successfully deployed a Node.js application on Azure App Service and secured it using Microsoft Entra ID. We configured authentication, created roles, and controlled access so that only authorized users could interact with the application.

This approach provides a simple yet powerful way to build secure applications using Azure’s built-in capabilities, making it suitable for real-world enterprise scenarios.

--

--

Aman Varma
Aman Varma

Written by Aman Varma

SC-300 certified IAM enthusiast focused on Microsoft Entra ID, Identity Security, Non-Human Identities, and AI-driven IAM solutions.