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.
What you will end up with
Section titled “What you will end up with”| 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. Create the app registration
Section titled “1. Create the app registration”- Sign in to the Microsoft Entra admin center and check that you are in the right tenant.
- Go to Microsoft Entra ID → App registrations and select New registration.
- In Name, enter Xago Calendar, or another name your organisation will recognise.
- Under Supported account types, select Accounts in this organizational directory only.
- Leave Redirect URI empty. The redirect URIs are added in the next step.
- Select Register.
You now see the app’s Overview page. Keep it open; you copy the Application (client) ID from it later.
2. Configure authentication
Section titled “2. Configure authentication”-
In the app registration, open Manage → Authentication.
-
Under Platform configurations, select Add a platform.
-
Choose Mobile and desktop applications.
-
Add these two redirect URIs, exactly as shown:
http://127.0.0.1http://localhost:8080/callback -
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.
If the portal rejects http://127.0.0.1
Section titled “If the portal rejects http://127.0.0.1”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.
3. Add API permissions
Section titled “3. Add API permissions”Xago Calendar needs five delegated permissions.
Dynamics 365 Business Central
Section titled “Dynamics 365 Business Central”- Open Manage → API permissions and select Add a permission.
- Select APIs my organization uses and search for Dynamics 365 Business Central.
- Select Delegated permissions.
- Tick user_impersonation.
- Select Add permissions.
user_impersonation lets the application call Business Central on behalf of the signed-in user.
Microsoft Graph
Section titled “Microsoft Graph”- Select Add a permission again.
- Choose Microsoft Graph → Delegated permissions.
- Tick openid, offline_access, profile and User.Read.
- Select Add permissions.
The finished list
Section titled “The finished list”| 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 |
4. Check admin consent
Section titled “4. Check admin consent”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.
5. Do not create a client secret
Section titled “5. Do not create a client secret”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.
6. Copy the client ID
Section titled “6. Copy the client ID”- Open Overview in the app registration.
- 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.
Next step
Section titled “Next step”Enter the client ID in Business Central.
