Blog

Registering an application in Entra ID: step by step

Microsoft sign-in, account sync, mailboxes: how to register an application in Entra ID step by step, with only the permissions you need.

A tool that connects to Microsoft 365 almost always does so through an application registered in Entra ID. That covers users signing in with their Microsoft account, reading accounts and groups, collecting email from a mailbox and sending messages. The subject is becoming urgent: at the end of December 2026, Microsoft disables password-based SMTP AUTH by default on existing tenants. Any tool that still sends email with a password will have to move to OAuth, and therefore to a registered application.

Before you start

  • Roles: registering an application requires at least the Application Developer role. Consenting to application permissions requires an administrator account.
  • One registration per use and per environment: one for user sign-in, one for synchronisation, one for email, with separate registrations for test and production. Each one keeps the minimum rights, and an expired secret stops only one use.
  • Three values to note along the way: the application (client) ID, the directory (tenant) ID and the secret value.

Step 1: register the application

  1. Sign in to the Microsoft Entra admin centre (entra.microsoft.com).
  2. Go to Entra ID > App registrations, then New registration.
  3. Choose a name that states the use and the environment, for example “SD PROD Sync”.
  4. Under Supported account types, keep single tenant: only your organisation will be able to use it.
  5. Select Register. The Overview page shows the application (client) ID and the directory (tenant) ID.

Step 2: create the client secret

  1. Open Certificates & secrets > Client secrets > New client secret.
  2. Add a description and choose a lifetime. It cannot exceed 24 months, and Microsoft recommends less than 12.
  3. Select Add and copy the value straight away, not the secret ID. It will never be displayed again.

Record the expiry date wherever your team tracks deadlines. An expired secret gives no warning: the connection simply stops, and tickets stop arriving.

Step 3: grant the permissions

Open API permissions > Add a permission. There are two kinds. A delegated permission acts on behalf of the signed-in person. An application permission acts with no user present, for a service running in the background. User sign-in (step 4) needs no application permission; the other uses do:

Use API Application permission
Read accounts and groups Microsoft Graph User.Read.All, Group.Read.All
Collect a mailbox over IMAP Office 365 Exchange Online IMAP.AccessAsApp
Collect a mailbox through Graph Microsoft Graph Mail.ReadWrite
Send over SMTP Office 365 Exchange Online SMTP.SendAsApp
Send through Graph Microsoft Graph Mail.Send

The Office 365 Exchange Online API is listed under the APIs your organisation uses. If the tool marks collected messages as read, Mail.Read is not enough. Finish with Grant admin consent and check that every line shows the green tick.

Step 4: user sign-in

For colleagues to sign in with their Microsoft account, the tool needs a return address. Under Authentication, add a Web platform and paste the redirect URI that the tool gives you. It must match character for character; otherwise sign-in fails with error AADSTS50011. In the tool, enter your tenant ID rather than a value shared by all tenants: only accounts from your organisation will get in.

Step 5: mailboxes on the Exchange side

For IMAP and SMTP, the permission in Entra ID is not enough: Exchange Online must know the application and which mailboxes it may open. In PowerShell, after Connect-ExchangeOnline:

  1. New-ServicePrincipal -AppId <application ID> -ObjectId <object ID>. The object ID is that of the enterprise application (Entra ID > Enterprise applications), not of the registration: this is the most common mistake.
  2. Add-MailboxPermission -Identity <mailbox> -User <object ID> -AccessRights FullAccess, for each mailbox. A shared mailbox, with no licence, is fine.
  3. For sending, check that SMTP AUTH is allowed on the mailbox: Set-CASMailbox -Identity <mailbox> -SmtpClientAuthenticationDisabled $false.

Allow up to an hour for the rights to take effect. With Graph, the permission covers every mailbox in the tenant by default. To narrow it, Microsoft now recommends Role Based Access Control for Applications in Exchange Online, which replaces application access policies.

The most common mistakes

  • Copying the secret ID instead of its value.
  • Using the registration’s object ID instead of the enterprise application’s.
  • Forgetting admin consent after adding a permission.
  • SMTP AUTH disabled on the mailbox or the tenant, with error 535 5.7.139.
  • Testing too early, before the rights have taken effect.

What a tool can do

Ecaldima uses these registrations for all four uses described here. Colleagues sign in with their Microsoft 365 account. Accounts and groups are synchronised from Entra ID. Mailboxes collected over IMAP or through Graph feed the Service Desk. Notifications go out over SMTP with OAuth or through Graph. Each screen offers a test before saving, and secrets are never shown again. The fields to fill in on the Ecaldima side are described in the knowledge base: sign-in, Microsoft 365 synchronisation, mailbox collection and notification sending. Other connections are presented on the Integrations page.

Preparing for the end of passwords over SMTP, or a first connection to Microsoft 365? Let’s talk.

Sources

Article up to date as of 21 November 2026.

Back to the blog

Let’s begin by understanding what needs to work.

Bring a defined process or simply a situation that deserves better organisation.

Talk to the ZAPP team