Enrollment outcomes
enroll() resolves for every outcome — a failure is data, not an exception, and the promise only rejects for programming errors. Eleven outcomes are possible and exactly one resolves. They are grouped below by what your app should do, which is not the same as how bad the outcome sounds.
succeededIdentity registered, policy in force.
Continue into the app.
notTargetedLicensed, but no administrator has aimed a policy at this account.
Continue. The app runs unmanaged — nothing is meant to be enforced yet.
notLicensedThe tenant uses Intune; this employee has no licence.
Continue. The SDK keeps retrying in case a licence appears later.
Do not block the user. Treating this as a failure locks out an employee who is allowed in.
failedLicensed and targeted, but enrollment failed — including the service being unreachable.
Block access to corporate data until it succeeds.
pendingFirst attempt in progress.
A progress state is reasonable here.
authorizationNeededNo valid token was supplied.
Check your token provider, then retry.
wrongUserA different account is already enrolled.
Block this account's data; the SDK prompts the user to remove one.
companyPortalRequiredAndroid only — the broker is missing.
The SDK drives the install prompt; supplement it with your own copy.
unknownA status this version does not map.
Treat it conservatively and open an issue.
unenrolledTerminal state of a completed reset.
Handled by the reset flow, not by this branch.
unenrollmentFailedTerminal state of a reset that did not finish.
The journal reopens it on the next launch.
The most common integration bug in libraries like this one is treating anything that isn't succeeded as "block the user". That breaks every customer who has staff without Intune licences, and every pilot where the policy has not been targeted yet. notLicensed and notTargeted mean the opposite of failed — that distinction is prescribed by Microsoft, not invented here.
enrollment.nativeCode carries the raw SDK constant name (LicensedNotTargeted, AccountNotLicensed, EnrollmentEndPointNetworkFailure, …). Put it in your support logs: it is the difference between "unlicensed" and "licensed but untargeted", which look identical from the unified status alone.