Skip to content

Register the app in Microsoft Entra ID

This page describes how to create the Microsoft Entra app registration that lets Xago Calendar sign users in and access Business Central on their behalf.

You need permission to create app registrations in the tenant. Use the same Microsoft tenant as the Business Central environment belongs to. The wording and layout of the Microsoft Entra admin center change over time, so the labels below may differ slightly from what you see.

Setting Value
Name Xago Calendar
Supported account types Accounts in this organizational directory only (single tenant)
Platform Mobile and desktop applications
Redirect URIs http://127.0.0.1 and http://localhost:8080/callback
Client secret None
  1. Sign in to the Microsoft Entra admin center and check that you are in the right tenant.
  2. Go to Microsoft Entra ID → App registrations and select New registration.
  3. In Name, enter Xago Calendar, or another name your organisation will recognise.
  4. Under Supported account types, select Accounts in this organizational directory only.
  5. Leave Redirect URI empty. The redirect URIs are added in the next step.
  6. Select Register.

You now see the app’s Overview page. Keep it open; you copy the Application (client) ID from it later.

  1. In the app registration, open Manage → Authentication.

  2. Under Platform configurations, select Add a platform.

  3. Choose Mobile and desktop applications.

  4. Add these two redirect URIs, exactly as shown:

    http://127.0.0.1
    http://localhost:8080/callback
  5. Select Configure or Save, depending on which the portal shows.

Redirect URI Used when
http://127.0.0.1 Xago Calendar signs the user in through the embedded browser, using a local loopback address.
http://localhost:8080/callback The user has to sign in through the standard system browser instead.

The URIs must use http, have the port and path shown, and have no trailing slash. Even small differences can cause the sign-in to be rejected.

Microsoft Entra redirect URIs normally require HTTPS. http is permitted for localhost and loopback addresses because the traffic stays on the local machine.

Microsoft’s documentation states that an http://127.0.0.1 loopback URI cannot be entered through the redirect URI text box in the portal. If the portal rejects it, add it through the app registration’s Manifest instead, in the replyUrlsWithType value. See Redirect URI best practices and limitations on Microsoft Learn.

Do not replace the URI with something else. If you cannot add it, contact Xago at support@xago.no.

Xago Calendar needs five delegated permissions.

  1. Open Manage → API permissions and select Add a permission.
  2. Select APIs my organization uses and search for Dynamics 365 Business Central.
  3. Select Delegated permissions.
  4. Tick user_impersonation.
  5. Select Add permissions.

user_impersonation lets the application call Business Central on behalf of the signed-in user.

  1. Select Add a permission again.
  2. Choose Microsoft Graph → Delegated permissions.
  3. Tick openid, offline_access, profile and User.Read.
  4. Select Add permissions.
API Type Permission Purpose
Dynamics 365 Business Central Delegated user_impersonation Call Business Central on behalf of the signed-in user
Microsoft Graph Delegated openid Sign the user in
Microsoft Graph Delegated offline_access Maintain access through refresh tokens
Microsoft Graph Delegated profile Read the user’s basic profile information
Microsoft Graph Delegated User.Read Sign in and read the user’s basic profile

The API permissions page shows whether any of the permissions require admin consent in your tenant.

  • If the tenant’s consent policy lets users consent to these permissions, tenant-wide admin consent is normally not needed.
  • If users cannot consent to applications themselves, a tenant administrator must approve the permissions with Grant admin consent for <tenant name>, following your organisation’s security routines.

Xago Calendar is a user-facing desktop application with delegated authentication: the user signs in interactively. It does not need a client secret. Do not create one unless Xago specifically asks for it, and do not send one to Xago.

  1. Open Overview in the app registration.
  2. Copy the whole Application (client) ID. It is a GUID that looks like 00000000-0000-0000-0000-000000000000.

This is the client ID used in Business Central. Do not copy the Object ID or the Directory (tenant) ID in its place.

Enter the client ID in Business Central.