Register an app and find its service principal

Azure Portal, Hands On10 minutesFreeSteps checked 23 October 2026By Cloud Hands On

In this task you'll register an application in Entra ID.

An app registration tells Entra ID about an application, such as a website that lets people sign in with their work account, or a script that runs outside Azure. It gives the app an application (client) ID.

Registering an app also creates a service principal in your tenant: the account the app actually signs in as, listed under Enterprise applications. Apps running inside Azure should use a managed identity instead, because then there's no secret to look after.

Example. Ironbridge Payments has a reporting script that runs on a server in its own office. The team registers app-ironbridge-reports, adds a certificate for it to sign in with, and gives its service principal Reader on one resource group.

Before you start

You need: Application Developer in Entra ID (by default, members can register apps too). Time: 10 minutes.

Where to look

  1. Microsoft Entra ID
  2. Manage
  3. App registrations
  4. + New registration

Steps

  1. Search App registrations and select + New registration.
  2. Name it app-portal-practice. Under Supported account types, keep Single tenant only (followed by your directory's name). Leave Redirect URI empty and select Register.A redirect URI is only needed for apps that sign people in.
  3. On Overview, note the Application (client) ID and Directory (tenant) ID. Select the link next to Managed application in local directory.That opens the service principal, under Enterprise applications.
  4. Back in the registration, open Certificates & secrets. Look at the three tabs: Certificates, Client secrets and Federated credentials.If you add a client secret, its value is shown only once. Don't add one for practice unless you delete it straight after.
  5. Open API permissions. New registrations have User.Read for Microsoft Graph, which lets the app read the signed-in user's profile.
  6. To let the app manage Azure resources, you'd give its service principal a role in a resource group's Access control (IAM), searching for app-portal-practice as the member. Look, but don't save.

Commands

# Register an app and create its service principal
az ad app create --display-name app-portal-practice
APPID=$(az ad app list --display-name app-portal-practice --query "[0].appId" --output tsv)
az ad sp create --id $APPID

# Clean up
az ad app delete --id $APPID

Watch out for

Cost
App registrations are free.
Security
Treat a client secret like a password: never put it in code or a repository, give it a short expiry, and prefer certificates, federated credentials or managed identities. Delete registrations nobody uses.
Common mistakes
Copying the secret ID instead of the secret value. Letting secrets expire unnoticed, which breaks the app. Confusing the app registration (the definition) with the service principal (what gets the roles).

Clean up

  1. App registrations
  2. app-portal-practice
  3. Delete

Delete app-portal-practice. It moves to Deleted applications for 30 days, where you can restore or permanently delete it.

Words to know

App registration
The definition of an app in Entra ID: its name, client ID, sign-in settings and credentials.
Service principal
The identity of an app in one tenant. Roles are given to the service principal.
Client secret
A password for an app. It's shown once and expires. Certificates are safer.
Federated credential
Lets an app outside Azure, such as GitHub Actions, sign in without any secret.

Tick off each step and track your progress in the guide.

Open this task in Azure Portal, Hands On

Keep going