How Applications Integrate

Microsoft Entra ID: Integrations & Access Troubleshooting

Course 1 ยท Chapter 2 ยท How Applications Integrate

"The integration expired." The word integration hides a lot. It might mean a SAML single-sign-on setup, an app registration with a client secret, a background connection that calls an API, or an automatic user-provisioning job. The four behave differently, break differently, and are fixed by different people. This chapter names the objects that exist in Entra for any integration, then walks through the four common patterns so that you can say which one you're facing.

By the end of this chapter you can
explain the difference between an app registration and an enterprise application; say whether a given integration is single-tenant or multitenant and what that means for who holds the credentials; and classify an integration as OpenID Connect sign-in, SAML single sign-on, API access or provisioning, with the settings and expiry points of each.

Why an Application Needs an Identity

Entra ID can only vouch for people to an application it knows about. Microsoft's documentation puts it this way: to delegate identity and access management to Entra ID, an application must be registered with a Microsoft Entra tenant. Registering creates an identity configuration for the application, which lets it integrate with Entra ID. That configuration is what people loosely call "the integration".

Two Objects: the Registration and the Enterprise Application

Two things appear in the portal for the same application, and they are easy to confuse. Microsoft explains them as a blueprint and an instance of it:

Application object (App registration)Service principal (Enterprise application)
What it isThe global definition of the application: the template from which common properties are takenThe local representation of the application inside one tenant
Where it livesOnly in the application's home tenant, the tenant where it was registeredIn every tenant where the application is used
How manyExactly one per applicationOne per tenant that uses it
What it describesHow tokens are issued for the application, the resources it may need, the actions it can take; you add secrets, certificates and scopes to itWhat the application can actually do in that tenant, who can access it, and what resources it can access there
Where you find it (Entra admin center)Entra ID > App registrationsEntra ID > Enterprise apps, which lists the service principals in a tenant, with permissions, user-consented permissions, who consented, and sign-in information

A registration also gives the application a globally unique application (client) ID. That is the value your system quotes when it asks Entra to sign someone in. Microsoft also notes that registering an application through the portal creates both the application object and a service principal in the home tenant automatically. (If you create the registration through Microsoft Graph, creating the service principal is a separate step.)

Three IDs people confuse
Tenant ID names the organisation's tenant (Chapter 1). Application (client) ID names the application and is the same everywhere it is used. The objects themselves (the application object and each service principal) also have their own object IDs, which differ from each other and from the client ID. When someone pastes "the ID" into a ticket, ask which one it is, and from which page.

What the service principal types mean

The enterprise applications list can contain three kinds of service principal, per Microsoft:

  • Application: the local instance of a registered application. This is the usual case for an integration.
  • Managed identity: an identity for an Azure resource to connect to services without storing credentials. It has no associated application object.
  • Legacy: represents an application created before app registrations existed, or through legacy experiences; it can only be used in the tenant where it was created.
Deleting and deactivating: what actually happens
Per Microsoft: deleting an application object also deletes its home-tenant service principal, and restoring the application object through the app registrations page does not restore the service principal. If an application is only to be switched off temporarily, it can be deactivated instead, which stops new tokens being issued while keeping the objects for investigation or reactivation. So "someone deleted the integration and then put it back" does not necessarily mean the whole thing is back, a point Chapter 7's audit logs help to verify.

Single-Tenant or Multitenant?

When an application is registered, its sign-in audience is chosen. This decides who can use it, and it determines where the pieces end up:

Audience settingTypeWho can sign in
Accounts in this directory onlySingle tenantAll user and guest accounts in the home directory only. Microsoft's guidance also says to use this option when building an app registration for a third party that tells you to build your own registration for their app.
Accounts in any Microsoft Entra directoryMultitenantUsers and guests with a work or school account from any Entra tenant
Any Entra directory and personal Microsoft accountsMultitenantWork or school accounts plus personal Microsoft accounts (such as Outlook.com or Xbox)

A single-tenant application has one service principal, in its home tenant. A multitenant application also has a service principal created in each tenant where a user or administrator from that tenant has consented to its use. Microsoft's example is a company, Adatum, that builds an "HR app" and registers it in its own tenant; Contoso and Fabrikam each use it, and each ends up with their own service principal, with the permissions their own administrator consented to.

Vendor tenant (home tenant) Client tenants --------------------------- -------------- App registration (one) Fabrikam tenant client ID, secrets/certificates ---> Enterprise app (service principal) redirect URIs, permissions consented by Fabrikam's admin Contoso tenant ---> Enterprise app (service principal) consented by Contoso's admin

Three typical arrangements, and who holds the keys

How the integration for your system was set up decides who can fix an expired credential. These are the common shapes; check with the people who built it which one applies:

ArrangementRegistration lives inCredential (secret or certificate) lives inWho must renew it
A. Your product is a multitenant appYour own tenantYour tenant's registration, shared by all clientsYou. One renewal affects every client at once.
B. The client creates a single-tenant registration for your systemThe client's tenantThe client's tenant; then copied into your systemThe client's Entra administrator, then you update your side
C. A gallery or SAML enterprise app set up in the client's tenantThe client's tenant (as an enterprise application)The SAML signing certificate in the client's enterprise applicationThe client's administrator, then the new certificate goes to you
Why this matters for the symptoms you see
If everyone at one client is locked out and others are fine, arrangements B and C are the likelier suspects, because the credential belongs to that client's tenant. If all clients fail together, suspect arrangement A, or your own side. This is a guide to where to look first, not a rule.

The Four Integration Patterns

Microsoft describes several ways to connect an application to Entra for single sign-on: OpenID Connect and OAuth, SAML, password-based, linked, header-based and Integrated Windows Authentication, with the last three mainly for on-premises apps behind Application Proxy. For a cloud system like yours, four patterns matter, and between them they cover almost every "integration expired" ticket.

PatternWhat it is forWho calls whomA person present?
1. OpenID Connect / OAuth 2.0 sign-inUsers sign in to your system with their work accountYour system sends users to Entra, then calls Entra's token endpoint with its own credentialYes
2. SAML single sign-onUsers sign in to your system, using the older, XML-based protocolEntra sends your system a signed assertion; your system trusts Entra's signing certificateYes
3. API access (client credentials)Your system reads or writes data in the client's tenant, such as through Microsoft Graph, as itselfYour system calls Entra's token endpoint with its own credential, then calls the APINo (background)
4. Provisioning (SCIM)Entra automatically creates, updates and removes users (and groups) in your systemEntra calls your system, which exposes a SCIM 2.0 endpointNo (background)

Pattern 1: OpenID Connect and OAuth 2.0 sign-in

Microsoft's guidance is to choose OpenID Connect and OAuth 2.0 if the application supports it. OpenID Connect extends OAuth 2.0 into an authentication protocol and issues an ID token to say who signed in. The application's configuration includes:

  • its application (client) ID;
  • the authority, a URL of the form https://login.microsoftonline.com/{tenant}/v2.0, where {tenant} is a tenant ID or domain name (for a single organisation), or organizations / common / consumers for wider audiences;
  • one or more redirect URIs, the exact addresses in your system where Entra is allowed to send users back;
  • the scopes it asks for (for sign-in, openid); and
  • a credential (a client secret or a certificate) that your system uses to prove its own identity to Entra when it redeems the sign-in for tokens.

Each app registration has a public OpenID Connect metadata document, found under Entra ID > App registrations > (your app) > Endpoints, which lists the endpoints and signing keys that a library needs. The credential is the part that expires; the rest only breaks when somebody changes it.

Pattern 2: SAML single sign-on

SAML is an older but widely used protocol. Microsoft says to choose SAML for existing applications that don't use OpenID Connect or OAuth. It is configured on the enterprise application (Entra ID > Enterprise apps > All applications > (the app) > Single sign-on > SAML), by a Cloud Application Administrator, an Application Administrator, or the owner of the service principal. The settings that matter:

  • Identifier (Entity ID): a name for your system, typically a URL specific to the application;
  • Reply URL (Assertion Consumer Service URL): where Entra posts the signed assertion;
  • Sign on URL: where users start from your side;
  • the SAML certificate that signs the assertions, which your system must be given (the portal lets you download it); and
  • the values your system needs from Entra: Login URL, Microsoft Entra Identifier and Logout URL.

Two facts from Microsoft's documentation matter for support. SAML SSO can only be configured on single-tenant or gallery applications; for a multitenant app, SAML is greyed out. And the signing certificate Entra creates when SAML is enabled is, by default, valid for three years (the lifetime can be customised), so the date has to be tracked and its renewal processed. Microsoft recommends naming an owner for it and a closely monitored mailing list for certificate notifications.

Pattern 3: API access with the application's own credentials

Sometimes your system acts by itself, with no user present: reading directory data, calling Microsoft Graph, syncing in the background. This is the OAuth 2.0 client credentials flow, which Microsoft describes as letting a confidential client use its own credentials, instead of impersonating a user, to call another service. The settings:

  • the client ID, the tenant it operates against, and a credential: a client secret, a certificate, or a federated credential;
  • the application permissions it has been given, which an administrator must grant (there is no user to consent), and which can be used only on that organisation's data; and
  • the resource it asks for, with the scope written as the resource identifier followed by /.default.

The reply is an access token with an expires_in value in seconds. When it expires, the application asks again; Microsoft notes that this flow never issues refresh tokens, because the client's own credentials can be used to get a new access token whenever needed. This is a good illustration of the difference between "the credential expired" and "a token expired", which is the subject of Chapter 4.

Pattern 4: Provisioning with SCIM, where the direction reverses

In provisioning, Entra is the client and your system is the server. The Microsoft Entra provisioning service connects to a SCIM 2.0 endpoint provided by the application and uses it to create, update and remove users, and for some apps groups. The channel is encrypted with HTTPS using TLS 1.2. For this to work Entra needs credentials to connect to your system's user management API, which an administrator enters when setting up provisioning, and which can be tested from the portal.

The credential here is one your system issued
In patterns 1 to 3, the credential is created in Entra and stored in your system. In provisioning it is the other way round: your system issues a credential, and the client's administrator pastes it into their tenant. If it expires or is rotated on your side, the failing end is the client's provisioning job. Microsoft says that if most or all calls to the target system keep failing, for example because of invalid admin credentials, the provisioning job goes into quarantine: its cycles gradually slow to once a day, it shows in the provisioning status and by email if notifications are configured, and if it stays in quarantine for over four weeks the job is disabled. Provisioning problems appear in the provisioning logs, not in the sign-in logs.

Which Pattern Are You Looking At?

Before you open any portal, a few questions usually settle it. Ask the person who reports the problem, or look at your own product's integration screen:

CluePoints to
Users click "Sign in with Microsoft" and are sent to a Microsoft page and backPattern 1 (OpenID Connect) or 2 (SAML)
Your configuration asks for a client ID and a client secret or certificatePattern 1 or 3
Your configuration asks for an Entity ID, ACS/Reply URL or a certificate to upload or a metadata URLPattern 2 (SAML)
It's a scheduled or background job; no user involved; fails overnightPattern 3 (API access) or 4 (provisioning)
New or leaving staff aren't appearing or being removed in your systemPattern 4 (provisioning)
The client's administrator presses a Test connection / validate button and it failsMost often pattern 4 (provisioning), where the portal tests the connection to your endpoint; it can also be a check inside your own product
Everyone at one client fails at the same instantA shared credential or certificate, or a change in that tenant (Chapter 4)
About the "validate the connection" error
Several of the patterns have something that gets "tested" or "validated", and they mean different things. The key question is where the check runs: in the Entra portal, in your product, or somewhere else. If you can note the exact wording of the message, the screen it appears on, and who clicks the button, you can usually pin down both the pattern and which end is failing. When you have a real example (redacted of IDs and secrets), Chapters 7 and 8 work through it.

Ownership Summary

Pattern 1: OpenID ConnectPattern 2: SAMLPattern 3: API accessPattern 4: SCIM
Configured in Entra onApp registration (plus enterprise app)Enterprise applicationApp registration, with admin-granted permissionsEnterprise application, provisioning tab
What can expireClient secret or certificateSAML signing certificateClient secret or certificateThe credential your system issued; or the job quarantined
Where to read the evidenceSign-in logsSign-in logsSign-in logs (service principal sign-ins)Provisioning logs
Who fixes the Entra endRegistration owner (you or the client's admin; see the arrangements above)Client's administrator, or someone with an application roleAs for pattern 1Client's administrator (entering your new credential)

The "where to read the evidence" row is a preview; Chapter 7 covers the logs in detail and checks which tab and which role each needs.

Hands-On Exercises

All three use fictional organisations and invented values. Never use real secrets or tenant details in practice notes.

Exercise 1

Classify five fictional integrations by pattern (1 to 4) and by arrangement (A, B or C, or "not applicable"), and say who is likeliest to hold the credential: (a) a nightly job that reads user records from a client's tenant; (b) staff sign in through a "Sign in with Microsoft" button; the client created the registration; (c) a client sends a SAML metadata file and a certificate; (d) new starters appear automatically in your system; (e) your multitenant product's shared sign-in for all customers.

๐Ÿ“„ View solution
Exercise 2

Below is a fictional configuration sheet. Label each value as a tenant ID, client ID, object ID, redirect URI, authority or secret, and decide which of them are safe to share on a ticket and which are not. Then explain why the same client ID can appear in two tenants but the object IDs differ.

๐Ÿ“„ View solution
Exercise 3

Write a short "first questions" checklist (six to eight questions) that you would ask a client who reports "the Entra integration has stopped working", so that by the end you know the pattern, the tenant, the arrangement and the owner. Test it against two fictional reports.

๐Ÿ“„ View solution

Chapter 2 Quick Reference

  • App registration (application object): the global definition, one per app, in its home tenant; holds secrets, certificates, redirect URIs, permissions
  • Enterprise application (service principal): the local instance in each tenant; what the app may do there and who may use it
  • Portal: Entra ID > App registrations vs Entra ID > Enterprise apps
  • Deleting an application object deletes its home-tenant service principal; restoring the object does not restore the service principal
  • Single tenant = home tenant only; multitenant = a service principal is created in each tenant that consents
  • SAML SSO can be configured only for single-tenant or gallery apps
  • Four patterns: OIDC sign-in, SAML SSO, API access (client credentials), SCIM provisioning
  • SAML signing certificate: by default valid for three years (customisable); name an owner and a monitored mailbox
  • Client credentials flow: the app's own secret/certificate/federated credential; admin-granted application permissions; no refresh tokens
  • SCIM provisioning: Entra calls your system; quarantine on repeated failures; disabled after four weeks in quarantine
  • Always ask: which pattern, which tenant, whose credential, which end is failing