Multi-tenant Entra apps
ION workloads call customer-tenant APIs (Microsoft Graph, Microsoft Defender for
Endpoint, Exchange mailbox content, and customer-owned Azure resources) through
multi-tenant Entra applications registered in ontinue.com. The customer
administrator consents to an app, which creates its service principal in the
customer tenant; ION workloads then obtain customer-tenant tokens for that
service principal through Workload Identity Federation with their own managed
identity. No secret or certificate is involved for new integrations.
This page covers outbound workload access only. Inbound apps that customers sign in to (the Customer Portal app and the advisor OBO app) are covered in the Customer Portal workflow.
Applicable architecture decisions
Split access apps by permission shape so a customer consents to exactly what they need and each app has its own blast radius.
ADR-0010A zero-permission app whose service principal receives customer-assigned Azure roles on specific resources.
ADR-0011ontinue.com hosts the app registrations; customer tenants host the consented service principals.
ADR-0009Architecture principles
Every new access app authenticates with federated credentials from workload managed identities.
Each calling workload's UAMI is a federated identity credential on the app. Existing Key Vault secrets are transitional and are migrated; no new secret or certificate is created.
Nothing works in a customer tenant until the customer administrator consents.
Deleting the enterprise application or removing a role assignment revokes ION immediately. ION treats that as a capability change, not as an error to work around.
Permissions are chosen by consenting the narrowest app, not by toggling scopes.
Exactly one of the four intent-shape apps is consented per customer. Purpose apps (phishing, hollow Azure RBAC) are added only when the customer opts in.
The customer tenant ID used for a token always comes from the onboarding record.
Workloads never accept a tenant ID from a request payload, event, or user input when acquiring a customer-tenant token.
App catalogue
| App (prod) | Intent | Consent | Further scoping |
|---|---|---|---|
azsp-ontinue-ion-access-read-all-prd-01 | Read All (default) | Exactly one of the four intent-shape apps | None |
azsp-ontinue-ion-access-mde-write-prd-01 | Read All plus MDE response actions | Replaces Read All | None |
azsp-ontinue-ion-access-graph-write-prd-01 | Read All plus Graph identity actions | Replaces Read All | None |
azsp-ontinue-ion-access-write-all-prd-01 | Read All plus MDE and Graph actions | Replaces Read All | None |
azsp-ontinue-ion-access-phishing-write-prd-01 | Phishing mailbox analysis | Opt-in, in addition | Exchange Online RBAC for Applications restricts Mail.Read to agreed mailboxes |
azsp-ontinue-ion-access-azure-rbac-prd-01 | Customer Azure resources (hollow) | Opt-in, in addition | Customer assigns Azure RBAC on specific resources |
Exact permission sets are listed in ADR-0010 and the Entra ID application catalogue.
Phishing app
The phishing app holds Mail.Read, which Entra grants tenant-wide. The customer
restricts it with Exchange Online RBAC for Applications (a management scope or an
administrative unit) and ION does not process any mailbox until that scope is
validated. Runbook: Mailbox-scoped access.
Hollow Azure RBAC app
azsp-ontinue-ion-access-azure-rbac-prd-01 declares no API permissions. Consent
only creates the service principal; the customer then assigns Azure roles to it on
specific resources. ION recommends the roles; the customer decides scope, role, and
lifetime. This fills the gaps that Azure Lighthouse
cannot: DataActions, custom roles, and customer-owned per-resource scoping.
| Use case | Customer resource | Recommended role |
|---|---|---|
| SOAR integration | Customer-owned Service Bus queues (outgoing and incoming) | Azure Service Bus Data Sender / Data Receiver at queue scope |
| Dark web monitoring incidents | Data collection rule for the custom Log Analytics table | Monitoring Metrics Publisher at DCR scope |
The full role catalogue and customer steps are in Customer Azure RBAC.
Developer integration
Token flow
using Azure.Core;
using Azure.Identity;
// Tenant and app come from the onboarding record, never from request input.
string customerTenantId = customer.TenantId;
string appClientId = accessApps.ReadAll.ClientId;
var managedIdentity = new ManagedIdentityCredential(workloadIdentityClientId);
var credential = new ClientAssertionCredential(
customerTenantId,
appClientId,
async cancellationToken =>
{
var request = new TokenRequestContext(new[] { "api://AzureADTokenExchange/.default" });
var token = await managedIdentity.GetTokenAsync(request, cancellationToken);
return token.Token;
});
// Graph: https://graph.microsoft.com/.default
// MDE: https://api.securitycenter.microsoft.com/.default
// Azure: https://management.azure.com/.default or the data-plane audience
// (for example https://servicebus.azure.net/.default, https://monitor.azure.com/.default)
Cache one credential per customer tenant and app; let the SDK cache and refresh tokens. Federated credentials are configured per calling workload UAMI; an app holds at most 20, so add a workload deliberately (see Workload Identity Federation).
Admin consent
Use the organizations endpoint, never common, and never pre-fill a tenant:
https://login.microsoftonline.com/organizations/adminconsent?client_id={appClientId}&redirect_uri={registeredRedirect}&state={onboardingState}
On the callback, verify that state matches the issued onboarding state and that
the returned tenant matches the tenant on the onboarding record before recording
the consent. Reject and alert on any mismatch.
Errors and degradation
| Error | Meaning | Handling |
|---|---|---|
AADSTS7000229 | No service principal in the customer tenant (not consented, or the enterprise app was deleted) | Mark the capability as not consented; stop calls for that customer; raise an onboarding task |
AADSTS65001 | Consent missing for the requested permission | Same as above; the customer may have consented to a narrower app |
AADSTS70021 | No matching federated credential for this UAMI | Configuration error on the Ontinue side; fail closed and alert the service owner |
401 from the API | Token audience or tenant wrong | Fix the audience; do not retry with another app |
403 from the API | Permission or Azure role not granted, or mailbox outside the RBAC for Applications scope | Fail closed for that operation; record the missing capability |
429 / 503 with Retry-After | Graph or MDE throttling | Back off as indicated with jitter; pace per tenant and per app |
When a capability is missing, degrade gracefully: disable the dependent feature for that customer and show it as unavailable. Never fall back to a broader app, a human token, or a Lighthouse identity to complete the call.
Revocation
| Trigger | Effect |
|---|---|
| Customer deletes the enterprise application | All tokens for that app fail with AADSTS7000229 |
| Customer removes an Azure role assignment or narrows the Exchange scope | Affected calls return 403; other capabilities continue |
| Workload retired | Remove its federated credential from every access app |
| Customer offboarding | Ask the customer to delete the enterprise applications; remove the tenant from the onboarding record so workloads stop requesting tokens |