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.
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 is | The global definition of the application: the template from which common properties are taken | The local representation of the application inside one tenant |
| Where it lives | Only in the application's home tenant, the tenant where it was registered | In every tenant where the application is used |
| How many | Exactly one per application | One per tenant that uses it |
| What it describes | How tokens are issued for the application, the resources it may need, the actions it can take; you add secrets, certificates and scopes to it | What 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 registrations | Entra 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.)
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.
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 setting | Type | Who can sign in |
|---|---|---|
| Accounts in this directory only | Single tenant | All 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 directory | Multitenant | Users and guests with a work or school account from any Entra tenant |
| Any Entra directory and personal Microsoft accounts | Multitenant | Work 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.
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:
| Arrangement | Registration lives in | Credential (secret or certificate) lives in | Who must renew it |
|---|---|---|---|
| A. Your product is a multitenant app | Your own tenant | Your tenant's registration, shared by all clients | You. One renewal affects every client at once. |
| B. The client creates a single-tenant registration for your system | The client's tenant | The client's tenant; then copied into your system | The client's Entra administrator, then you update your side |
| C. A gallery or SAML enterprise app set up in the client's tenant | The client's tenant (as an enterprise application) | The SAML signing certificate in the client's enterprise application | The client's administrator, then the new certificate goes to you |
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.
| Pattern | What it is for | Who calls whom | A person present? |
|---|---|---|---|
| 1. OpenID Connect / OAuth 2.0 sign-in | Users sign in to your system with their work account | Your system sends users to Entra, then calls Entra's token endpoint with its own credential | Yes |
| 2. SAML single sign-on | Users sign in to your system, using the older, XML-based protocol | Entra sends your system a signed assertion; your system trusts Entra's signing certificate | Yes |
| 3. API access (client credentials) | Your system reads or writes data in the client's tenant, such as through Microsoft Graph, as itself | Your system calls Entra's token endpoint with its own credential, then calls the API | No (background) |
| 4. Provisioning (SCIM) | Entra automatically creates, updates and removes users (and groups) in your system | Entra calls your system, which exposes a SCIM 2.0 endpoint | No (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), ororganizations/common/consumersfor 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.
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:
| Clue | Points to |
|---|---|
| Users click "Sign in with Microsoft" and are sent to a Microsoft page and back | Pattern 1 (OpenID Connect) or 2 (SAML) |
| Your configuration asks for a client ID and a client secret or certificate | Pattern 1 or 3 |
| Your configuration asks for an Entity ID, ACS/Reply URL or a certificate to upload or a metadata URL | Pattern 2 (SAML) |
| It's a scheduled or background job; no user involved; fails overnight | Pattern 3 (API access) or 4 (provisioning) |
| New or leaving staff aren't appearing or being removed in your system | Pattern 4 (provisioning) |
| The client's administrator presses a Test connection / validate button and it fails | Most 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 instant | A shared credential or certificate, or a change in that tenant (Chapter 4) |
Ownership Summary
| Pattern 1: OpenID Connect | Pattern 2: SAML | Pattern 3: API access | Pattern 4: SCIM | |
|---|---|---|---|---|
| Configured in Entra on | App registration (plus enterprise app) | Enterprise application | App registration, with admin-granted permissions | Enterprise application, provisioning tab |
| What can expire | Client secret or certificate | SAML signing certificate | Client secret or certificate | The credential your system issued; or the job quarantined |
| Where to read the evidence | Sign-in logs | Sign-in logs | Sign-in logs (service principal sign-ins) | Provisioning logs |
| Who fixes the Entra end | Registration owner (you or the client's admin; see the arrangements above) | Client's administrator, or someone with an application role | As for pattern 1 | Client'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.
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 solutionBelow 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 solutionWrite 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 solutionChapter 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