Skip to main content

API reference

Every public method, with the platform differences stated rather than hidden. Anything documented as internal — PolicySnapshot.raw, resolveToken, rejectToken — is outside the semver contract.

MethodPurpose
configure(config)Set up the SDK for one tenant. Required first
signIn(params?)Broker-based sign-in. builtin mode only
signInSilent(params)Cache-first sign-in; rejects with E_INTERACTION_REQUIRED
signInAndEnroll(params?)Sign in and enroll in one call
acquireToken(params)A token for your own API's scopes
getAccounts()Accounts with cached refresh tokens
signOut({ accountId, wipeIntune })Clear the MSAL account and optionally unenroll
isSupported()SDK linked and prerequisites met
getBrokerStatus()Whether Company Portal / Authenticator are present
openBrokerInstall()Send the user to install the broker
enroll({ accountId })Register and enroll an account
getState()Current configuration and enrollment state
getPolicy()Policy snapshot, for adapting your own UI
reset({ wipe, reason })Unenroll, optionally wipe, clear config
getDiagnostics()Opaque key/value for support bundles
setTokenProvider(fn)Supply MAM service tokens. external mode only
setResetHandler(fn)Clean up your local data during a reset

Events: onEnrollmentResult, onPolicyChanged, onUnenrollmentResult, onWipeRequested, onRestartRequired, onBrokerStatusChanged.

Telemetry and the SDK's own PIN/blocking screens are configurable in configure() — the Intune SDK sends telemetry to Microsoft by default and renders Microsoft-styled screens unless you set colours and a splash icon.

What never crosses this API: PIN prompts, screenshot blocking, encryption and the Company Portal install screen are enforced by the SDK inside your process. getPolicy() exists so you can adapt your own UI — hide an export button, disable a share sheet — not so you can implement enforcement yourself.


Where this sits

JavaScript / TypeScript API
enroll() · policy() · doctor()
TurboModule bridge
typed via Codegen · New Architecture
Native layer — iOS
Objective-C
Native layer — Android
Kotlin
Microsoft Intune App SDK
Vendor SDK — enforces the policy inside the process
Intune service
Policy source of truth
MSAL
Owned by the library. Optional — an app with its own MSAL keeps it.
token request
Broker app
Authenticator or Company Portal, installed separately on the phone.
Accent marks every layer this library ships. Grey marks what belongs to Microsoft or the phone.
Accent marks every layer this library ships. Grey marks what belongs to Microsoft or to the phone.