Skip to content

Commit aaf68b4

Browse files
authored
Add additional step ID and blocking error constants for onboarding telemetry, Fixes AB#3462876 (#3117)
## Summary Adds the remaining step ID and blocking error constants from the Mobile Onboarding Telemetry design (section 9 Step Taxonomy) to `OnboardingTelemetryConstants`. Pure additive - no behavior change, no caller wiring in this PR. Linked Feature: [AB#3462876](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3462876) ## Why PR #3088 shipped the recorder + the 5 step/blocking-error constants OneAuth needed for non-brokered (`STEP_AUTHENTICATION_STARTED`, `STEP_BROKER_INSTALL_PROMPTED`, `STEP_DEVICE_REGISTRATION_STARTED`, `BLOCKING_ERROR_BROKER_INSTALL`, `BLOCKING_ERROR_MDM_FLOW`). The remaining ~20 step IDs from the design will be needed by: - The WebView hooks PR (follow-up) - emits `MDMEnrollmentStarted`, `CompanyPortalLaunched`, `WebCpEnrollmentStarted`, etc. from `AzureActiveDirectoryWebViewClient` URL-handler sites. - Broker-side step emission (follow-up) - `AccountSelectionStarted`, `InterruptFlowStarted`, `PrtAcquired`, `TokenIssued`, etc. - OneAuth follow-ups for AM API + WebCP detection (Veena's request) - needs `MDMEnrollmentStarted` constant. - Termination steps - `UserCanceled`, `AuthorizationTimedOut`. Landing the constants ahead of caller wiring lets downstream PRs reference typed constants instead of hardcoded strings, and avoids a chicken-and-egg sequencing problem. ## Constants added Grouped by onboarding flow phase (matching design section 9): - **Authentication / WebView**: `STEP_ACCOUNT_SELECTION_STARTED`, `STEP_PASSKEY_AUTH_STARTED`, `STEP_CERT_BASED_AUTH_STARTED` - **MFA / Strong Auth**: `STEP_STRONG_AUTH_SETUP_STARTED`, `STEP_STRONG_AUTH_SETUP_COMPLETED`, `STEP_AUTHENTICATOR_MFA_LINKING_STARTED` - **CA Block & Remediation**: `STEP_CA_BLOCK_RECEIVED`, `STEP_INTERRUPT_FLOW_STARTED`, `STEP_CONSENT_PROMPT_SHOWN`, `STEP_TERMS_OF_USE_SHOWN`, `STEP_PASSWORD_RESET_REQUIRED` - **Device Registration**: `STEP_DEVICE_REGISTRATION_UPGRADE_STARTED` - **MDM Enrollment**: `STEP_MDM_ENROLLMENT_STARTED` (value `MDMEnrollmentStarted`), `STEP_COMPANY_PORTAL_LAUNCHED`, `STEP_WEB_CP_ENROLLMENT_STARTED`, `STEP_GOOGLE_ENROLLMENT_STARTED` - **Intune App Protection**: `STEP_INTUNE_APP_PROTECTION_REQUIRED` - **Compliance Remediation**: `STEP_COMPLIANCE_REMEDIATION_STARTED`, `STEP_COMPLIANCE_REMEDIATION_COMPLETED` - **Token Acquisition**: `STEP_PRT_ACQUIRED`, `STEP_TOKEN_ISSUED` - **Termination**: `STEP_USER_CANCELED`, `STEP_AUTHORIZATION_TIMED_OUT` - **Blocking error**: `BLOCKING_ERROR_DEVICE_REGISTRATION` (`"DEVICE_REGISTRATION_REQUIRED"`) All values are PascalCase (consistent with the existing `STEP_*` constants and matching what eSTS/MATS expect for these enum-like step values). ## Testing - No new tests - pure constant additions; existing `OnboardingTelemetryRecorderTest` and `OnboardingSessionCorrelationStoreTest` continue to pass. - Built locally; constants compile cleanly. ## Dependencies - **Builds on**: PR #3088 (already merged) - extends `OnboardingTelemetryConstants` added there. - **Consumed by** (follow-up PRs): - WebView page-tracking hooks (`AzureActiveDirectoryWebViewClient` setter + emissions) - Broker step emission (`BrokerSsoController`, `PrtController`, error handler) - OneAuth caller updates (AM API + WebCP detection per Veena's PR #3088 comment) - **No breaking changes** - purely additive to the existing `object`.
1 parent 3e6df21 commit aaf68b4

2 files changed

Lines changed: 48 additions & 0 deletions

File tree

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ vNext
22
----------
33
- [PATCH] Extend filter-then-clone optimization to deleteAccessTokensWithIntersectingScopes and add telemetry attributes (#3114)
44
- [PATCH] Wire ClientDataInfo through AcquireTokenResult, exceptions (#3109)
5+
- [MINOR] Add additional step ID and blocking error constants for full onboarding telemetry coverage (#3117)
56
- [PATCH] Handle app_link Intent redirection by validating broker install links and rejecting unsupported redirect URIs with appropriate error responses (#3102)
67
- [MINOR] Add onboarding telemetry blob fields to BrokerRequest/BrokerResult and command parameters for client↔broker IPC transport (#3111)
78
- [PATCH] Extend filter-then-clone optimization to load() and getIdTokensForAccountRecord() in MsalOAuth2TokenCache: when ENABLE_FILTER_THEN_CLONE_IN_MEMORY_CACHE flight is enabled, skip clone-all preload and call direct flight-gated overloads that clone only matching credentials; add new getCredentialsFilteredBy overload with kid support (#3100)

common4j/src/main/com/microsoft/identity/common/java/telemetry/OnboardingTelemetryConstants.kt

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,64 @@ object OnboardingTelemetryConstants {
3939

4040
// Step ID values not used in C++ aggregation (no derived duration metric computed from these)
4141
const val STEP_AUTHENTICATION_STARTED = "AuthenticationStarted"
42+
const val STEP_ACCOUNT_SELECTION_STARTED = "AccountSelectionStarted"
4243
const val STEP_CREDENTIAL_ENTRY_COMPLETED = "CredentialEntryCompleted"
44+
const val STEP_PASSKEY_AUTH_STARTED = "PasskeyAuthStarted"
45+
const val STEP_CERT_BASED_AUTH_STARTED = "CertBasedAuthStarted"
46+
47+
// MFA / Strong Auth Setup
48+
const val STEP_STRONG_AUTH_SETUP_STARTED = "StrongAuthSetupStarted"
49+
const val STEP_STRONG_AUTH_SETUP_COMPLETED = "StrongAuthSetupCompleted"
50+
const val STEP_AUTHENTICATOR_MFA_LINKING_STARTED = "AuthenticatorMfaLinkingStarted"
51+
52+
// Conditional Access Block & Remediation
53+
const val STEP_CA_BLOCK_RECEIVED = "CABlockReceived"
54+
const val STEP_INTERRUPT_FLOW_STARTED = "InterruptFlowStarted"
55+
const val STEP_CONSENT_PROMPT_SHOWN = "ConsentPromptShown"
56+
const val STEP_TERMS_OF_USE_SHOWN = "TermsOfUseShown"
57+
const val STEP_PASSWORD_RESET_REQUIRED = "PasswordResetRequired"
58+
59+
// Broker Installation
4360
const val STEP_BROKER_INSTALL_PROMPTED = "BrokerInstallPrompted"
4461
const val STEP_BROKER_INSTALL_PROMPTED_FOR_MDM = "BrokerInstallPromptedForMDM"
62+
63+
// Device Registration (WPJ)
4564
const val STEP_DEVICE_REGISTRATION_STARTED = "DeviceRegistrationStarted"
4665
const val STEP_DEVICE_REGISTRATION_COMPLETED = "DeviceRegistrationCompleted"
66+
const val STEP_DEVICE_REGISTRATION_UPGRADE_STARTED = "DeviceRegistrationUpgradeStarted"
67+
68+
// MDM Enrollment (PP → WP transition)
69+
const val STEP_MDM_ENROLLMENT_STARTED = "MDMEnrollmentStarted"
70+
const val STEP_COMPANY_PORTAL_LAUNCHED = "CompanyPortalLaunched"
71+
const val STEP_WEB_CP_ENROLLMENT_STARTED = "WebCpEnrollmentStarted"
72+
const val STEP_GOOGLE_ENROLLMENT_STARTED = "GoogleEnrollmentStarted"
73+
74+
// Intune App Protection (MAM)
75+
const val STEP_INTUNE_APP_PROTECTION_REQUIRED = "IntuneAppProtectionRequired"
76+
77+
// Compliance Remediation
78+
const val STEP_COMPLIANCE_REMEDIATION_STARTED = "ComplianceRemediationStarted"
79+
const val STEP_COMPLIANCE_REMEDIATION_COMPLETED = "ComplianceRemediationCompleted"
80+
81+
// Token Acquisition & Completion
82+
const val STEP_PRT_ACQUIRED = "PrtAcquired"
83+
const val STEP_TOKEN_ISSUED = "TokenIssued"
4784
const val STEP_FLOW_COMPLETED = "FlowCompleted"
4885

86+
// Termination (Non-Success)
87+
const val STEP_USER_CANCELED = "UserCanceled"
88+
const val STEP_AUTHORIZATION_TIMED_OUT = "AuthorizationTimedOut"
89+
4990
// Blocking error values — must match C++ hardcoded strings in InteractiveRequest.cpp
5091
const val BLOCKING_ERROR_BROKER_INSTALL = "BROKER_INSTALLATION_TRIGGERED"
5192
const val BLOCKING_ERROR_MDM_FLOW = "MDM_FLOW"
5293

94+
// Device-registration blocking errors — one per BrokerExceptionClassifier.Category
95+
// (see broker4j BrokerExceptionClassifier + InteractiveRequestAcquireTokenErrorHandler).
96+
const val BLOCKING_ERROR_DEVICE_REGISTRATION_NEEDED = "DEVICE_REGISTRATION_NEEDED"
97+
const val BLOCKING_ERROR_STRONG_DEVICE_REGISTRATION_NEEDED = "STRONG_DEVICE_REGISTRATION_NEEDED"
98+
const val BLOCKING_ERROR_INSUFFICIENT_DEVICE_REGISTRATION = "INSUFFICIENT_DEVICE_REGISTRATION"
99+
53100
// Platform-specific values
54101
const val PROFILE_USER = "userProfile"
55102
const val PROFILE_WORK = "workProfile"

0 commit comments

Comments
 (0)