Skip to content

[MAJOR][feature]: Release/1.26.0 - #1908

Open
fidelianawar wants to merge 46 commits into
mainfrom
swagup/mergeconflictsrelease
Open

[MAJOR][feature]: Release/1.26.0#1908
fidelianawar wants to merge 46 commits into
mainfrom
swagup/mergeconflictsrelease

Conversation

@fidelianawar

@fidelianawar fidelianawar commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

PR Checklist (must be completed before review)

  • All tests pass locally
  • PR size is <= 500 LOC per PR Size Check policy
  • PR is independently mergeable (no hidden dependencies)
  • Appropriate reviewers are assigned
  • PR reviewed by code owner (required if Copilot-generated)
  • SME or Senior IC assigned where required

PR Title Format

Required Format: [Keyword1] [Keyword2]: Description

  • Keyword1: major, minor, or patch (case-insensitive)
  • Keyword2: feature, bugfix, engg, or tests (case-insensitive)

Examples:

  • [MAJOR] [Feature]: new API
  • [minor] [bugfix]: fix crash
  • [PATCH][tests]:add coverage

Proposed changes

Describe what this PR is trying to do.

Type of change

  • Feature work
  • Bug fix
  • Documentation
  • Engineering change
  • Test
  • Logging/Telemetry

Risk

  • High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
  • Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
  • Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

Additional information

hieunguyenmsft and others added 30 commits June 17, 2026 10:03
Restrict the refresh token credential (PRT) header so it is only added to
the PkeyAuth challenge response when the submit URL host is a known/trusted
AAD host, preventing the PRT from being leaked to untrusted hosts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
## PR Checklist (must be completed before review)

- [x] All tests pass locally
- [x] PR size is <= 500 LOC per PR Size Check policy
- [x] PR is independently mergeable (no hidden dependencies)
- [x] Appropriate reviewers are assigned
- [x] PR reviewed by code owner (required if Copilot-generated)
- [x] SME or Senior IC assigned where required

## Proposed changes

Two test-infrastructure updates so the IdentityCore-driven UI / lab
tests keep working against current iOS sims and the LAB v2 service:

**UI automation hardening**
(`IdentityCore/tests/automation/ui_tests_lib/MSIDBaseUITest.m`) —
addresses intermittent UI-test failures on iOS 18+ sims:
- `aadEnterPassword:` / `tapPasswordSelectionButtonIfPresentInApp:` —
scope the "Use your password" / "Other ways to sign in" lookups to
`application.webViews` so iOS QuickType / Passwords AutoFill suggestions
with the same label don't win the first-match query (which would
otherwise open the empty system password picker on CI sims and loop the
test).
- New `dismissKeyboardIfVerifyEmailPagePresentInApp:` — on the MSA
"Verify your email" interstitial the auto-focused email field raises the
keyboard, which absorbs taps on the "Use your password" link even though
the link reports as hittable. The helper taps the page header to defocus
the email field and dismiss the keyboard so the link becomes truly
tappable on the next polling tick.
- `enterPassword:app:isMainApp:` — require `.isHittable` (not just
`.exists`) on the secure text field so back-to-back `acquireToken` calls
(e.g. `prompt=force` after a prior sign-in) don't type into a stale
field left in the view hierarchy.

**Lab API endpoint migration**
(`IdentityCore/tests/automation/ui_tests_lib/lab_api/MSIDAutomation*APIRequest.m`)
— point at the new ID4SLAB2 operations: `CreateTempUser`,
`DeleteDevice`, `EnablePolicy`/`DisablePolicy`, and `Reset` are all
suffixed `ID4SLAB2`.

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [x] Engineering change
- [x] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
(Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
(Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes,
string changes, or configuration settings changes)

## Additional information

Scope is test-only — no production source is touched. The four
`MSIDAutomation*APIRequest` files only override `-requestOperationPath`,
which is consumed exclusively by the lab automation client;
`MSIDBaseUITest.m` lives under
`IdentityCore/tests/automation/ui_tests_lib/` and is only linked by
UI-test targets. No changelog entry is needed (test infrastructure
only).

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
## PR Checklist (must be completed before review)

- [x] All tests pass locally
- [ ] PR size is <= 500 LOC per PR Size Check policy
- [ ] PR is independently mergeable (no hidden dependencies)
- [ ] Appropriate reviewers are assigned
- [ ] PR reviewed by code owner (required if Copilot-generated)
- [ ] SME or Senior IC assigned where required

## Proposed changes

Merge main into dev for release 1.25.0

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
(Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
(Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes,
string changes, or configuration settings changes)

## Additional information
…t-known-aad-hosts

# Conflicts:
#	changelog.txt
Add MSIDPkeyAuthTag execution-flow tags for the added/skipped PRT-header
decision in MSIDPKeyAuthHandler, recorded only when context.correlationId
is available. Addresses review feedback on PR #1869.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…AAD hosts (#1869)

Restrict the refresh token credential (PRT) header so it is only added
to the PkeyAuth challenge response when the submit URL host is a
known/trusted AAD host, preventing the PRT from being leaked to
untrusted hosts.

## PR Checklist (must be completed before review)

- [x] All tests pass locally
- [x] PR size is <= 500 LOC per PR Size Check policy
- [x ] PR is independently mergeable (no hidden dependencies)
- [x ] Appropriate reviewers are assigned
- [x ] PR reviewed by code owner (required if Copilot-generated)
- [x ] SME or Senior IC assigned where required

## PR Title Format

**Required Format:** `[Keyword1] [Keyword2]: Description`

- **Keyword1:** `major`, `minor`, or `patch` (case-insensitive)
- **Keyword2:** `feature`, `bugfix`, `engg`, or `tests`
(case-insensitive)

**Examples:**
- `[MAJOR] [Feature]: new API`
- `[minor] [bugfix]: fix crash`
- `[PATCH][tests]:add coverage`

## Proposed changes

Describe what this PR is trying to do.

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
(Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
(Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes,
string changes, or configuration settings changes)

## Additional information
…1868)

## Problem

`isNewMobileOnboardingFlow` is a `BOOL` (value type) on
`MSIDInteractiveRequestParameters`. When the webview sets it to `YES` on
encountering `msauth://enroll`, that mutation only affects the current
params instance. Broker actions create **new** params objects from
`ADBrokerRequest` — the flag is lost because BOOLs are copied, not
shared.

This is the same class of problem that `MSIDOnboardingBlobBuilder`
solved for the onboarding blob — reference types are shared by pointer,
value types are copied.

## Solution

Introduce `MSIDMobileOnboardingState` — a minimal reference-type wrapper
(same pattern as `MSIDOnboardingBlobBuilder`):

```objc
@interface MSIDMobileOnboardingState : NSObject
@Property (nonatomic) BOOL isNewMobileOnboardingFlow;
@EnD
```

### How it works

1. **`ADBrokerRequest`** creates one `MSIDMobileOnboardingState` per
auth session, seeded from the IPC payload
2. **Every `MSIDInteractiveRequestParameters`** gets the same pointer:
`params.mobileOnboardingState = request.mobileOnboardingState`
3. **Webview** sets `params.isNewMobileOnboardingFlow = YES` → computed
setter writes to the shared state object
4. **All consumers** (serializers, follow-up actions) see the mutation
immediately — no sync-back needed
5. **SSO extension hop** — the flag is serialized to JSON by
`MSIDBrokerOperationInteractiveTokenRequest`, deserialized on the other
side, and seeds a new `MSIDMobileOnboardingState`

### Why not just a BOOL?

| Object | Persists across actions? | Webview can write? |
|--------|------------------------|--------------------|
| `ADBrokerRequest.isNewMobileOnboardingFlow` (BOOL) | ✅ | ❌ (webview
has no access) |
| `MSIDInteractiveRequestParameters.isNewMobileOnboardingFlow` (BOOL) |
❌ (recreated per action) | ✅ |
| `MSIDMobileOnboardingState` (reference) | ✅ (shared pointer) | ✅ (via
params) |

No other BOOL on params has this requirement — all others (`forceUI`,
`instanceAware`, `showHeadsUp`) are set once from IPC and never mutated
mid-session.

## Changes

- **New**: `MSIDMobileOnboardingState.h/.m` — shared mutable state
holder
- **Modified**: `MSIDInteractiveRequestParameters.h/.m` — added
`mobileOnboardingState` property, `isNewMobileOnboardingFlow` is now a
computed accessor forwarding to the state object

Companion Broker4 PR: (pending)

---------

Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
## PR Checklist (must be completed before review)

- [ ] All tests pass locally
- [ ] PR size is <= 500 LOC per PR Size Check policy
- [ ] PR is independently mergeable (no hidden dependencies)
- [ ] Appropriate reviewers are assigned
- [ ] PR reviewed by code owner (required if Copilot-generated)
- [ ] SME or Senior IC assigned where required

## PR Title Format

**Required Format:** `[Keyword1] [Keyword2]: Description`

- **Keyword1:** `major`, `minor`, or `patch` (case-insensitive)
- **Keyword2:** `feature`, `bugfix`, `engg`, or `tests`
(case-insensitive)

**Examples:**
- `[MAJOR] [Feature]: new API`
- `[minor] [bugfix]: fix crash`
- `[PATCH][tests]:add coverage`

## Proposed changes

Describe what this PR is trying to do.

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [x] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
(Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
(Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes,
string changes, or configuration settings changes)

## Additional information

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
## PR Checklist (must be completed before review)

- [X] All tests pass locally
- [X] PR size is <= 500 LOC per PR Size Check policy
- [ ] PR is independently mergeable (no hidden dependencies)
- [ ] Appropriate reviewers are assigned
- [ ] PR reviewed by code owner (required if Copilot-generated)
- [ ] SME or Senior IC assigned where required


## Proposed changes

The proposed change updates  MSIDFlightManager  so assigning
 flightProvider  completes immediately before the setter returns.

Before the change,  setFlightProvider:  used  dispatch_barrier_async .
That means the assignment was placed onto the synchronization queue, but
the caller did not wait for it to run. Code could set  flightProvider 
and then immediately ask for a flight value, while the provider
assignment was still waiting in the queue. In that case,
 MSIDFlightManager  could still see  flightProvider  as  nil  and return
the default value, usually  NO .

After the change,  setFlightProvider:  uses  dispatch_barrier_sync . The
assignment still goes through the same barrier queue, so the
thread-safety model stays the same. The difference is that the caller
now waits until the assignment is finished. Once  flightProvider =
provider  returns, the provider is definitely stored and available to
later reads.

This fixes the CI flake because the failing tests inject a mock flight
provider and immediately call code that reads from it. The old async
setter allowed the read to happen too early.

## Type of change

- [ ] Feature work
- [X] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
(Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
(Example: somewhat complex bug fixes, small new features)
- [X] Small – No issues are expected. (Example: Very small bug fixes,
string changes, or configuration settings changes)

## Additional information

Co-authored-by: Maximus Agubuzo <maagubuzo@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
## PR Checklist (must be completed before review)

- [ ] All tests pass locally
- [ ] PR size is <= 500 LOC per PR Size Check policy
- [ ] PR is independently mergeable (no hidden dependencies)
- [ ] Appropriate reviewers are assigned
- [ ] PR reviewed by code owner (required if Copilot-generated)
- [ ] SME or Senior IC assigned where required

## PR Title Format

**Required Format:** `[Keyword1] [Keyword2]: Description`

- **Keyword1:** `major`, `minor`, or `patch` (case-insensitive)
- **Keyword2:** `feature`, `bugfix`, `engg`, or `tests`
(case-insensitive)

**Examples:**
- `[MAJOR] [Feature]: new API`
- `[minor] [bugfix]: fix crash`
- `[PATCH][tests]:add coverage`

## Proposed changes

Describe what this PR is trying to do.

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
(Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
(Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes,
string changes, or configuration settings changes)

## Additional information

---------

Co-authored-by: Swasti Gupta <swagup@microsoft.com>
…native GetToken (POC) (#1872)

## Proposed changes

Adds `MSIDBoundTokenProvider`, a Common Core seam that services a
browser-native-message `GetToken` request **in-process** for a host such
as OneAuth (embedded in Edge).

On unmanaged iOS the platform SSO Extension is unavailable, so the host
cannot silently invoke the broker through
`ASAuthorizationSingleSignOnProvider`. Instead the host hands the typed
`MSIDBrowserNativeMessageGetTokenRequest` to this provider, which owns
the orchestration that would otherwise live behind the SSO Extension
(silent BART SPA redemption, or an interactive broker flip).

This PR is a **POC** that wires up the seam and proves the routing
end-to-end; the real silent-redemption / interactive-broker-flip
orchestration is layered on top of this provider in follow-up work.

I have code changes in OneAuth that prove functionality. This provider
must be created to support OneAuth when SSO EXT is not an option. This
is for iOS only not Mac OS. In Edge native app when Browser sends
BrowserNativeMessagingRequest OneAuth will check if SSO Ext is
available. if SSO EXT is absent then OneAuth will use the path of
MSIDBoundTokenProvider via Common Core to pass the request in. This
class will later hold real validation logic and routing for the response
to be obtained either through silent or interactive flow.

A Similar class exist in Broker (thats how this works with SSO ext), a
later PR will be created to see how the broker code can be broken down
since this class is now required in Common core. I have discussed this
with Sergei before he went OOF.

### What's included
- `IdentityCore/src/oauth2/token/MSIDBoundTokenProvider.{h,m}` — the
provider. Validates the request (nil →
`MSIDErrorInvalidInternalParameter`; blank `clientId`/`redirectUri` →
`MSIDErrorInvalidDeveloperParameter`) and returns a serialized
browser-native-message response payload (`transport:
in_proc_common_core`).
- `IdentityCore/tests/MSIDBoundTokenProviderTests.m` — unit tests built
from the real `MSIDBrowserNativeMessageGetTokenRequest` properties,
covering the in-process success path and the missing-`clientId`
validation path.

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
(Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
(Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. Additive, self-contained POC seam
with no existing call sites; consumed only by the parallel OneAuth POC.

## Additional information

Paired with the OneAuth-side POC that routes
`BrowserNativeMessagingGetTokenRequest` to this provider when the SSO
Extension is unavailable. Branch:
`maagubuzo/un_tb/poc/msidboundtokenprovider`, targeting `dev`.

---------

Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Maximus Agubuzo <maagubuzo@microsoft.com>
…job template (#1882)

Convert pr-validation, msal_submodule_check and broker_submodule_check
to use the central Pipeline YAMLs/shared/aces-macos-job.yml template for
pool + Xcode + tool setup. Split broker steps into
broker_build_steps.yml (repo-specific) so the hosted visionOS consumer
keeps its own tool setup via broker_submodule_steps.yml.

## PR Checklist (must be completed before review)

- [ ] All tests pass locally
- [ ] PR size is <= 500 LOC per PR Size Check policy
- [ ] PR is independently mergeable (no hidden dependencies)
- [ ] Appropriate reviewers are assigned
- [ ] PR reviewed by code owner (required if Copilot-generated)
- [ ] SME or Senior IC assigned where required

## PR Title Format

**Required Format:** `[Keyword1] [Keyword2]: Description`

- **Keyword1:** `major`, `minor`, or `patch` (case-insensitive)
- **Keyword2:** `feature`, `bugfix`, `engg`, or `tests`
(case-insensitive)

**Examples:**
- `[MAJOR] [Feature]: new API`
- `[minor] [bugfix]: fix crash`
- `[PATCH][tests]:add coverage`

## Proposed changes

Describe what this PR is trying to do.

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
(Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
(Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes,
string changes, or configuration settings changes)

## Additional information

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…imulators (#1885)

## PR Checklist (must be completed before review)

- [x] All tests pass locally
- [x] PR size is <= 500 LOC per PR Size Check policy
- [x] PR is independently mergeable (no hidden dependencies)
- [ ] Appropriate reviewers are assigned
- [ ] PR reviewed by code owner (required if Copilot-generated)
- [ ] SME or Senior IC assigned where required

## PR Title Format

**Required Format:** `[Keyword1] [Keyword2]: Description`

- **Keyword1:** `major`, `minor`, or `patch` (case-insensitive)
- **Keyword2:** `feature`, `bugfix`, `engg`, or `tests`
(case-insensitive)

## Proposed changes

`ADBTokenBindingUITests` failures downstream (e.g.
`testADRSDeviceRegistration_havingCAWithTokenBinding_andHavingSSOExtSecStorageDisabled_validateDeviceJoinIsECC`)
were traced to `performAction:config:application:` tapping the
automation host app's action buttons (e.g. "Acquire Token") without the
touch ever actually reaching the button's real UIKit target-action
handler.

Confirmed via the simulator's unified log (`xcrun simctl ... log show`)
— **not** just the XCTest driver's own captured log, which never
surfaces output from the app under test:

Between requesting a tap and XCTest synthesizing it, XCTest runs its own
"make frontmost" dance (`Check for interrupting elements affecting
<button>`, looking for a system alert/permission prompt from another
app, followed by re-`Open`/`Activate`-ing our target app). That dance
can happen *during* the tap call itself, so a coordinate resolved
beforehand can go stale by the time the touch is actually delivered, and
the touch is silently dropped. The button's target-action never fires,
and the test hangs until a later, unrelated step times out ("Timed out
waiting for the password field..." or "Wait for result pipeline").

Separately, XCTest's "scroll element to visible" step (run
unconditionally as part of its tap synthesis) was observed corrupting
the hit-point computation to `{-1, -1}` on iOS/iPadOS 26 simulators,
even when the button never needed to scroll and had a perfectly valid,
on-screen frame.

**Fix:**
- `performAction:config:application:` now taps action buttons via a new
`tapActionButtonWhenHittable:application:` helper that explicitly
activates the application and waits for it to settle in the foreground
*before* resolving the button's tap coordinate, so any interruption
dance happens before we snapshot the tap point rather than concurrently
with the tap.
- Taps via an explicit `XCUICoordinate` (bypassing `XCUIElement`'s own
tap/scroll-to-visible synthesis path) to avoid the `{-1, -1}` hit-point
bug.
- Extended the existing `msidTap` cross-platform convention
(`XCUIElement+CrossPlat`) to `XCUICoordinate` so the new coordinate tap
follows the same tap-on-iOS/click-on-macOS pattern as the rest of the
file, instead of duplicating the platform check inline.

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
(Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
(Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes,
string changes, or configuration settings changes)

Change is scoped entirely to the UI test automation library
(`tests/automation`), not the shipped SDK — no runtime/customer-facing
impact.

## Additional information

Verified locally end-to-end against a real iPhone 17 / iOS 26.3.1
simulator with live lab credentials: all 4 previously-failing
`ADBTokenBindingUITests` tests now pass consistently (previously always
failed with "Timed out waiting for the password field..." or "Wait for
result pipeline" timeouts caused by the dropped Acquire Token tap
upstream).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PR validation currently runs the automation health job even when a PR
only touches test files. This change narrows that behavior so test-only
changes continue through normal validation without invoking the
automation health check.

- **Change detection**
- Adds a lightweight `DetectAutomationHealthChanges` job to diff the PR
head against the target branch.
- Normalizes `System.PullRequest.TargetBranch` before fetching so the
comparison works whether Azure Pipelines provides a short branch name or
a full ref.

- **Automation health gating**
- Sets an output variable when any changed file falls outside
`IdentityCore/tests/`.
- Gates `AutomationHealth` on that output, so the job is skipped for
test-only PRs and still runs for any production/config/pipeline change.

- **Scope of skip behavior**
  - Treats files under `IdentityCore/tests/` as test-only changes.
  - Leaves the existing `Validate_Pull_Request` matrix unchanged.

```yaml
- job: AutomationHealth
  dependsOn: DetectAutomationHealthChanges
  condition: and(
    succeeded(),
    eq(dependencies.DetectAutomationHealthChanges.outputs['detectChanges.runAutomationHealth'], 'true')
  )
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Ameya Patil <amepatil@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…osoft identity host list (#1883)

### Summary

`cloud_instance_host_name` from the auth webview redirect URL was
previously used to build the cloud authority without checking whether it
was a recognized Microsoft identity host. This PR makes that handling
more accurate: the value is only used when it is a known AAD
public/sovereign cloud host, or a network environment already discovered
via instance metadata.

### Changes
- Add a recognized-host check in `setCloudAuthorityWithCloudHostName:`
(`MSIDRequestParameters`) and
`authorityWithUpdatedCloudHostInstanceName:error:` (`MSIDAADAuthority`).
Unrecognized values are ignored and logged; the originally configured
authority continues to be used.
- Host matching is case-insensitive to align with cached
`preferred_network` values (which may not be case-normalized).
- Add unit tests for known public-cloud, known sovereign-cloud, unknown,
nil, blank, and different-case host inputs.
- Update the instance-aware interactive token request integration test
to use a valid sovereign-cloud host.

### Impact
- Sovereign-cloud and instance-aware flows are unaffected.
- No public API changes.

---------

Co-authored-by: kai <kasong@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…n request in browser-native GetToken request (#1879)

## PR Checklist (must be completed before review)

- [x] All tests pass locally
- [x] PR size is <= 500 LOC per PR Size Check policy
- [x] PR is independently mergeable (no hidden dependencies)
- [ ] Appropriate reviewers are assigned
- [ ] PR reviewed by code owner (required if Copilot-generated)
- [ ] SME or Senior IC assigned where required

## Proposed changes

Simplifies how the Apple broker resolves the requested token type when
parsing a browser-native `GetToken` request.

The request now resolves `tokenType` as follows:

1. `tokenType` in `extraParameters` (extra query parameters)
2. `tokenType` at the top level of the request (fallback)

`authenticationScheme` is no longer read at any point. The previously
added `authenticationScheme` key constant has been removed. When
`tokenType` resolves to `pop`, a valid `reqCnf` is still required
(top-level or in `extraParameters`); otherwise the request is rejected.
When no usable `tokenType` is present, the scheme defaults to Bearer,
preserving existing behavior.

## Type of change

- [x] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [x] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
- [x] Small – No issues are expected.

## Additional information

- Related work item: Task 3596198 — Parse token_type from ESTS Response
in Apple Brokers.
- Updated unit tests in `MSIDBrowserNativeMessageGetTokenRequestTests`
to cover `tokenType` in extra query parameters and at the top level,
extraParameters-first precedence, PoP `reqCnf` validation in both
positions, non-string `tokenType` handling, and regression tests
confirming `authenticationScheme` is ignored. Full
`MSIDBrowserNativeMessageGetTokenRequestTests` suite passes (39 tests, 0
failures).

Co-authored-by: Maximus Agubuzo <maagubuzo@microsoft.com>
…#1889)

## PR Checklist (must be completed before review)

- [ ] All tests pass locally
- [ ] PR size is <= 500 LOC per PR Size Check policy
- [ ] PR is independently mergeable (no hidden dependencies)
- [ ] Appropriate reviewers are assigned
- [ ] PR reviewed by code owner (required if Copilot-generated)
- [ ] SME or Senior IC assigned where required

## PR Title Format

**Required Format:** `[Keyword1] [Keyword2]: Description`

- **Keyword1:** `major`, `minor`, or `patch` (case-insensitive)
- **Keyword2:** `feature`, `bugfix`, `engg`, or `tests`
(case-insensitive)

**Examples:**
- `[MAJOR] [Feature]: new API`
- `[minor] [bugfix]: fix crash`
- `[PATCH][tests]:add coverage`

## Proposed changes

Based on
#1880

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
(Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
(Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes,
string changes, or configuration settings changes)

## Additional information

---------

Co-authored-by: ashok672 <ashok672@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…1891)

## Summary
Gate the reqCnf presence validation for Pop token requests in
`MSIDBrowserNativeMessageGetTokenRequest` behind a new ECS flight,
`browser_core_disable_reqcnf_validation`.

The flight is a **kill switch**: `MSIDFlightManager boolForKey:` returns
`NO` when unset, so the validation is **enabled by default**. ECS can
disable it to restore the prior fallback behavior (request initializes
and falls back to the default Bearer scheme instead of failing when
reqCnf is missing/blank on a Pop request).

This matches the existing `browser_core_disable_pop` /
`browser_core_disable_claims` kill-switch convention in the same file.
The tokenType lookup-order (extraParameters first, then request) is
unchanged.

## Changes
- `MSIDConstants.h/.m`: add
`MSID_FLIGHT_BROWSER_CORE_DISABLE_REQ_CNF_VALIDATION`
(`browser_core_disable_reqcnf_validation`).
- `MSIDBrowserNativeMessageGetTokenRequest.m`: gate the reqCnf nil/blank
guard behind the flight.
- `MSIDBrowserNativeMessageGetTokenRequestTests.m`: 3 new tests (flight
on with nil/empty reqCnf -> init succeeds with default scheme; flight
explicitly off -> still rejected) + `tearDown` resetting the flight
provider.
- `changelog.txt`: entry under TBD.

## Testing
`IdentityCore Mac` scheme,
`MSIDBrowserNativeMessageGetTokenRequestTests`: 42/42 passing.

---------

Co-authored-by: Maximus Agubuzo <maagubuzo@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
The PR validation job introduced in #1881 failed in Bash because
`System.PullRequest.TargetBranch` was evaluated as command substitution
instead of a pipeline variable. This broke target-branch resolution for
the “test-files-only” change detector.

- **Root cause**
- Inline Bash used Azure DevOps variable syntax in a shell command
context:
- `$(System.PullRequest.TargetBranch)` → interpreted by Bash as `$(...)`
command execution.

- **Change**
- Switched branch source to the Azure DevOps environment variable
exposed to scripts:
    - `SYSTEM_PULLREQUEST_TARGETBRANCH`
  - Kept existing ref normalization behavior (`refs/*` guard) unchanged.

- **Resulting behavior**
  - Target branch is now read correctly in PR runs.
- Non-test change detection can compute diffs against the PR target
branch as intended.

```bash
# before
target_branch_ref="$(System.PullRequest.TargetBranch)"

# after
target_branch_ref="${SYSTEM_PULLREQUEST_TARGETBRANCH:-}"
if [[ "${target_branch_ref}" != refs/* ]]; then
  target_branch_ref="refs/heads/${target_branch_ref}"
fi
```

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…put (#1895)

## PR Checklist (must be completed before review)

- [x] All tests pass locally
- [x] PR size is <= 500 LOC per PR Size Check policy
- [x] PR is independently mergeable (no hidden dependencies)
- [x] Appropriate reviewers are assigned
- [x] PR reviewed by code owner (required if Copilot-generated)
- [x] SME or Senior IC assigned where required

## Proposed changes

`+[NSString(MSIDExtensions) msidIsStringNilOrBlank:]` only special-cased
`nil` and `NSNull`. For any other non-`NSString` argument it fell
through to `!string.length`, sending `-length` to the object:

```objc
if (!string || [string isKindOfClass:[NSNull class]] || !string.length)
```

When a mis-typed value reaches the check — e.g. a JSON/plist **boolean**
decoded as `__NSCFBoolean` from an MDM SSO-extension configuration where
a string was expected — this raises `-[__NSCFBoolean length]:
unrecognized selector sent to instance` and crashes (SIGABRT).

This was observed as a crash in the iOS `AuthenticatorSSOExtension` on
the main thread during `-[ASSSOExtensionAuthenticationViewController
beginAuthorizationWithRequest:]`, where SSO-extension configuration
values are parsed.

This change replaces the `NSNull`-only check with a positive `NSString`
kind check, so any non-`NSString` (including `NSNull`,
`NSNumber`/`__NSCFBoolean`, collections, etc.) is treated as blank and
the method never messages a non-string:

```objc
if (!string || ![string isKindOfClass:[NSString class]] || !string.length)
```

Adds a regression test covering `NSNumber`/`__NSCFBoolean`, `NSArray`
and `NSDictionary` inputs.

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
(Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
(Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes,
string changes, or configuration settings changes)

## Additional information

Behavior for existing inputs is unchanged: `nil`, `NSNull`, empty and
whitespace-only strings still return `YES`; non-blank strings still
return `NO`. Only previously-crashing non-`NSString` inputs change from
"throw" to `YES`. All `MSIDTestNSStringHelperMethods` tests pass locally
(iOS, Xcode 26.5, iPhone 17 simulator), including the new regression
test. Changelog updated under `TBD`.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…vider (#1894)

## PR Checklist (must be completed before review)

- [x] All tests pass locally
- [x] PR size is <= 500 LOC per PR Size Check policy
- [x] PR is independently mergeable (no hidden dependencies)
- [x] Appropriate reviewers are assigned
- [x] PR reviewed by code owner (required if Copilot-generated)
- [x] SME or Senior IC assigned where required

## Proposed changes

`MSIDFlightManager`'s `boolForKey:` and `stringForKey:` tested
`self.flightProvider` through the (unsynchronized) property getter
**before** dispatching onto the synchronization queue, then re-read it
inside the queue:

```objc
if (self.flightProvider) {                      // unsynchronized read
    dispatch_sync(self.synchronizationQueue, ^{
        result = [self.flightProvider ...];     // second read
    });
}
```

That first read races the barrier write in `setFlightProvider:`. When
another thread swaps/releases the provider concurrently with a read, the
read can end up messaging a freed provider (use-after-free).

In the Microsoft Authenticator app this surfaced as an `objc_msgSend`
crash inside `-[MSIDAccountCredentialCache checkFRTEnabled:error:]` at
the flight-status read (`stringForKey:MSID_FLIGHT_CLIENT_SFRT_STATUS`),
driven from a launch-time background thread that reads FRT/flight state
while the main flow assigns a new `flightProvider` from a parsed broker
device-info response.

This change reads `_flightProvider` **once from inside the
synchronization queue** into a strong local and messages that local,
removing the unsynchronized access and keeping the provider alive for
the duration of the call. It complements #1876 (which made the setter
synchronous via `dispatch_barrier_sync`); the setter and readers are now
fully serialized through the queue.

Adds a concurrency regression test
(`testConcurrentReads_whileProviderSwappedAndCleared_doNotCrash`) that
interleaves provider swaps (including `nil`) with concurrent
`boolForKey:`/`stringForKey:` reads.

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
(Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
(Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes,
string changes, or configuration settings changes)

## Additional information

All 15 `MSIDFlightManagerTests` pass locally (iOS, Xcode 26.5, iPhone 17
simulator), including the new regression test. Changelog updated under
`TBD`.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ken (#1886)

## PR Checklist (must be completed before review)

- [ ] All tests pass locally
- [ ] PR size is <= 500 LOC per PR Size Check policy
- [ ] PR is independently mergeable (no hidden dependencies)
- [ ] Appropriate reviewers are assigned
- [ ] PR reviewed by code owner (required if Copilot-generated)
- [ ] SME or Senior IC assigned where required

## PR Title Format

**Required Format:** `[Keyword1] [Keyword2]: Description`

- **Keyword1:** `major`, `minor`, or `patch` (case-insensitive)
- **Keyword2:** `feature`, `bugfix`, `engg`, or `tests`
(case-insensitive)

**Examples:**
- `[MAJOR] [Feature]: new API`
- `[minor] [bugfix]: fix crash`
- `[PATCH][tests]:add coverage`

## Proposed changes

Add a parameter for caller to pass nonce. This will allow getting nonce
as a network request separately and pass it in here from its callback.
This will also prevent deallocation of initial request object during
async call.

## Type of change

- [ ] Feature work
- [x] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
(Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
(Example: somewhat complex bug fixes, small new features)
- [x] Small – No issues are expected. (Example: Very small bug fixes,
string changes, or configuration settings changes)

## Additional information

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…and complete customized XPC transport failures with errors (#1887)

## Summary

Fixes ADO 3236668:
https://dev.azure.com/IdentityDivision/_workitems/edit/3236668

`+[MSIDXpcSingleSignOnProvider canPerformRequest:]` has 5 distinct exit
points that all collapse into a bare `NO`, making it impossible to
root-cause the production spike of this client-side XPC gate rejecting
requests without further instrumentation. This PR adds an additive,
non-breaking `reason:` overload that reports which branch fired — at
both the provider level and the controller level, since production
callers (e.g. OneAuth's `MSAIBrokerClient`) call the controller's bare
`canPerformRequest` class method directly and never see CommonCore's
internal `MSID_LOG_WITH_CTX` output.

## Changes

- **New enum `MSIDXpcCanPerformFailureReason`**
(`MSIDXpcSingleSignOnProvider.h`), with one case per failure branch:
  - `None` (success)
- `NoProviderInstalled` — no MacBrokerApp/CompanyPortal XPC component on
device
- `DeviceInfoRequestCreationFailed` — SSOExtension `getDeviceInfo`
request object failed to construct
  - `DeviceInfoHandshakeError` — handshake completed with a hard error
- `DeviceInfoHandshakeTimeout` — handshake did not complete within the
1s `dispatch_group_wait` window
- `ValidateCacheProviderFailed` — no installed provider matches
cached/available config
- `UnsupportedOSVersion` — controller-level gate rejects the request on
macOS < 13, before ever reaching the provider
- **New `MSIDXpcCanPerformFailureReasonToString(reason)`** helper for
non-PII logging.
- **New `+[MSIDXpcSingleSignOnProvider canPerformRequest:reason:]`**
overload that sets `*reason` at each return site. The original
no-`reason` `canPerformRequest:` selector is kept as a thin wrapper
(`reason:nil`) — fully source/behavior compatible with existing call
sites and tests.
- **Split timeout vs. hard-error**: both previously fell through to the
same generic `validateCacheXpcProvider` failure; they're now tracked
separately and reported as distinct reasons (timeout takes priority if
both occurred).
- **Updated both callers** — `MSIDXpcSilentTokenRequestController` and
`MSIDXpcInteractiveTokenRequestController` `canPerformRequest` — to call
the new overload and log the reason (name + int, no PII) via
`MSID_LOG_WITH_CTX` when the result is `NO`.
- **New `+[MSIDXpcSilentTokenRequestController canPerformRequest:]`**
and **`+[MSIDXpcInteractiveTokenRequestController canPerformRequest:]`**
overloads (reason out-param), mirroring the provider-level pattern, so
external callers outside CommonCore (e.g. OneAuth) can retrieve and
surface the failure reason to their own telemetry instead of only
getting a bare `BOOL`. The existing no-arg `canPerformRequest` selectors
remain thin wrappers (`canPerformRequest:nil`) — fully source/behavior
compatible.
- **Unit tests**: added coverage in `MSIDXpcSingleSignOnProviderTest.m`
for all 5 provider-level failure branches and the success path.
- **Changelog**: added/updated an entry under `TBD`.

## Testing

Ran `./build.py --targets mac_library --no-xcpretty --no-clean`:
- Build succeeded.
- All 2496 tests passed (0 failures).

## Notes

- No PII is logged — only the reason enum name/int and class/method
name.
- No behavior change for existing callers of any no-`reason` selector
(provider or controller level).
- Adoption in OneAuth (`MSAIBrokerClient.m`) to actually consume the new
controller-level `reason:` overload and feed it into OneAuth's own
telemetry (`MSAIBrokerEligibilityResponseFactory` /
`appendExecutionFlow:`) is tracked separately, since that's a different
repo/consumer.

---------

Co-authored-by: kai <kasong@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…load web session launches instead of after it completes so the banner fires while the user is away in Settings.
swasti29 and others added 11 commits July 17, 2026 12:06
…ows (#1897)

## Summary
Refactors the onboarding telemetry plumbing and adds new onboarding-blob
steps for the new mobile onboarding flows.

### Telemetry
- New passthrough onboarding-blob steps: `TokenRequestRetryStarted`,
`TokenRequestRetryFailed`, `MDMEnrollmentFailed`,
(`MSIDOnboardingBlobFieldKeys`).
- `MSIDOnboardingBlobBuilder` additions to stamp the new steps.
-
`MSIDLocalInteractiveController.handleWebMDMEnrollmentCompletionResponse:`
now stamps MDM status + TokenRequestRetry steps.

> Note: The retry path stamps only `TokenRequestRetryStarted` and
`TokenRequestRetryFailed`. There is no `TokenRequestRetrySucceeded` step
— a successful retry is reflected by the terminal success signal of the
overall flow.

### Webview
- Navigation handling refactor (`MSIDOAuth2EmbeddedWebviewController`,
`MSIDWebviewNavigationHandler/Delegate`,
`MSIDWebviewNavigationDecisionResolver`,
`MSIDAADOAuthEmbeddedWebviewController`).

### Tests
- Added/updated unit + integration coverage for the new steps and
navigation changes.

---------

Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…1905)

## Summary
Forwards `x-app-name` / `x-app-ver` to Intune on the MDM enrollment
webview request, **gated behind a Microsoft first-party (1P) app check**
so third-party apps never leak their app identity.

## Changes
- **`MSIDHelpers.isMicrosoftFirstPartyApp`** — returns YES when the
running app's Apple Team ID (from `MSIDKeychainUtil`) is a known
Microsoft team.
- **`MSID_MICROSOFT_FIRST_PARTY_TEAM_IDS`** (in `MSIDConstants`) — the
Microsoft-owned Apple Team IDs (`UBF8T346G9`, `SGGM6D27TK`,
`9KBH5RKYEW`), mirroring the Broker-layer `microsoft1PAppsTeamIDs`.
- **`NSBundle msidAppName`** — sibling to existing `msidAppVersion`
(CFBundleDisplayName ?: CFBundleName).
- **`MSIDWebviewNavigationDecisionResolver`** — attaches the two headers
on the enroll request only when `isMicrosoftFirstPartyApp` is YES.

## Tests
Added resolver unit tests exercising the real predicate via `teamId`
swizzle:
-
`testEnrollURL_whenMicrosoftFirstPartyApp_shouldAttachAppNameAndVersionHeaders`
-
`testEnrollURL_whenNotMicrosoftFirstPartyApp_shouldNotAttachAppNameAndVersionHeaders`

Full `MSIDWebviewNavigationDecisionResolverTests` suite passes on iOS
simulator.

---------

Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…e user is in Settings (#1901)

## Summary
Relocates the MDM profile-installed local notification scheduling from
the post-return `profile_download_complete` callback to the moment the
profile-download `ASWebAuthenticationSession` is launched, so the
reminder is armed *before* the user leaves for Settings.

## Changes
- **`MSIDWebviewNavigationHandler.m`**: Adds
`scheduleMDMProfileInstalledNotificationIfNeededForURL:`, invoked right
before `transitionToSystemWebviewWithURL:`. It gates on the URL
containing `downloadprofile`, reads the delay from the
`MSID_FLIGHT_MDM_PROFILE_INSTALLED_NOTIFICATION_DELAY` flight (falling
back to `MSIDMDMProfileInstalledNotificationDefaultDelay`), and forwards
to the registered UX callback provider. Includes info/warning logs.
- **`MSIDWebviewNavigationDecisionResolver.m`**: Removes the
now-too-late scheduling in `decisionForProfileDownloadComplete:`
(replaced with an explanatory comment) and the cancel call in
`decisionForEnrollmentCompletionURL:`; drops the two imports that became
unused as a result.
- **`MSIDUXCallbackProtocol.h`**: Removes the now-unused
`cancelMDMProfileInstalledNotification` declaration.

## Why
On-device logs confirmed the in-app enrollment web callbacks
(`profile_download_complete`, `in_app_enrollment_complete`) only fire
*after* the user returns from Settings, i.e. when the app is foreground
again and banners are suppressed. Scheduling at session launch lands the
notification while the app is backgrounded (user still in Settings), so
the banner is actually shown. The cancel path is no longer needed
because the notification is armed at hand-off rather than speculatively.

## Related
Paired with the Broker-side conformance-guard change (forwards
`scheduleMDMProfileInstalledNotificationWithDelay:` to
`MSIDUXCallbackProvider`) and the Authenticator host-app notification
handler.
…1906)

Support for Broker seeded-BRT silent device registration:

- Add -isAADAuthority to base MSIDAuthority (returns NO) and override in
MSIDAADAuthority (returns YES), so callers can gate AAD-only behavior
without an isKindOfClass:[MSIDAADAuthority class] cast.
- Add MSIDOnboardingBlobStepSeededBRTBootstrapStarted/Completed
onboarding blob step constants (broker-only funnel, fanned out to
mo_steps_list).


Copilot-Session: e70061c1-fa52-46e5-a985-6ca86ad66d49

## PR Checklist (must be completed before review)

- [ ] All tests pass locally
- [ ] PR size is <= 500 LOC per PR Size Check policy
- [ ] PR is independently mergeable (no hidden dependencies)
- [ ] Appropriate reviewers are assigned
- [ ] PR reviewed by code owner (required if Copilot-generated)
- [ ] SME or Senior IC assigned where required

## PR Title Format

**Required Format:** `[Keyword1] [Keyword2]: Description`

- **Keyword1:** `major`, `minor`, or `patch` (case-insensitive)
- **Keyword2:** `feature`, `bugfix`, `engg`, or `tests`
(case-insensitive)

**Examples:**
- `[MAJOR] [Feature]: new API`
- `[minor] [bugfix]: fix crash`
- `[PATCH][tests]:add coverage`

## Proposed changes

Describe what this PR is trying to do.

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
(Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
(Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes,
string changes, or configuration settings changes)

## Additional information

---------

Co-authored-by: Swasti Gupta <swastigupta@rerr.local>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Swasti Gupta <swagup@microsoft.com>
@fidelianawar
fidelianawar requested a review from a team as a code owner July 20, 2026 19:58
MSIDNonceTokenRequest *nonceRequest = [[MSIDNonceTokenRequest alloc] initWithRequestParameters:nonceReqParams];
__weak typeof(self) weakSelf = self;
[nonceRequest executeRequestWithCompletion:^(NSString * _Nullable resultNonce, NSError * _Nullable error)
if ([NSString msidIsStringNilOrBlank:self.nonce])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes executeRequestWithCompletion: from fetching its nonce internally to failing unless the caller pre-populates nonce. Existing callers that instantiate this request directly will start failing after the 1.26.0 update without a clear migration path. Can we either preserve the previous behavior or document this change in the header/changelog and point callers to MSIDDeviceTokenUtil?

BOOL flowSucceeded = (endURL != nil && error == nil);
if (flowSucceeded && self.strongAuthSetupStarted)
{
// MDMEnrollmentFinished is stamped from the in_app_enrollment_complete redirect.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment says MdmEnrollmentFinished is stamped from the enrollment-complete redirect, but the refactored code no longer calls addStep:MSIDOnboardingBlobStepMdmEnrollmentFinished anywhere. The old controller stamped it after MDM enrollment started, so successful MDM onboarding now loses its completion step. Can we restore that signal in the builder, or remove the step and update the contract if it is intentionally retired?

swasti29 and others added 5 commits July 21, 2026 09:41
…rs (#1910)

## Summary
Adds a `sourceApplication` property to
`MSIDInteractiveTokenRequestParameters` (the invoking app's bundle
identifier as reported by the OS).

This is consumed by the broker (see the paired MSAL + Broker PRs) to
gate first-party-only behavior on the mobile-onboarding MDM-enrollment
request. The OS surfaces the caller bundle id only for apps signed under
the broker's Apple Developer Team identifier, so a non-nil value
effectively identifies a Microsoft 1P caller; third-party callers leave
it nil.

## Changes
- `MSIDInteractiveTokenRequestParameters.h`: new `@property (nonatomic,
copy, nullable) NSString *sourceApplication;` (ARC-synthesized backing
ivar).

## Testing
- Consumed and validated in the Broker repo unit tests
(`ADBrokerInteractiveControllerWithPRTTests`,
`MSIDInteractiveTokenRequestParameters+ADBrokerTests`) — 29 tests pass.

## Related
Part of a chained submodule change:
- Common Core (this PR) → MSAL (submodule bump) → Broker (submodule bump
+ consumer logic).

Co-authored-by: Swasti Gupta <swagup@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
## PR Checklist (must be completed before review)

- [ ] All tests pass locally
- [ ] PR size is <= 500 LOC per PR Size Check policy
- [ ] PR is independently mergeable (no hidden dependencies)
- [ ] Appropriate reviewers are assigned
- [ ] PR reviewed by code owner (required if Copilot-generated)
- [ ] SME or Senior IC assigned where required

## PR Title Format

**Required Format:** `[Keyword1] [Keyword2]: Description`

- **Keyword1:** `major`, `minor`, or `patch` (case-insensitive)
- **Keyword2:** `feature`, `bugfix`, `engg`, or `tests`
(case-insensitive)

**Examples:**
- `[MAJOR] [Feature]: new API`
- `[minor] [bugfix]: fix crash`
- `[PATCH][tests]:add coverage`

## Proposed changes

Describe what this PR is trying to do.

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
(Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
(Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes,
string changes, or configuration settings changes)

## Additional information

---------

Co-authored-by: agubuzomaximus <agubuzomaximus@gmail.com>
Co-authored-by: Maximus Agubuzo <maagubuzo@microsoft.com>
Co-authored-by: Fidelia Nawar <fidelianawar@Fidelias-MacBook-Pro.local>
Co-authored-by: Swasti Gupta <swastinitb@gmail.com>
## PR Checklist (must be completed before review)

- [ ] All tests pass locally
- [ ] PR size is <= 500 LOC per PR Size Check policy
- [ ] PR is independently mergeable (no hidden dependencies)
- [ ] Appropriate reviewers are assigned
- [ ] PR reviewed by code owner (required if Copilot-generated)
- [ ] SME or Senior IC assigned where required

## PR Title Format

**Required Format:** `[Keyword1] [Keyword2]: Description`

- **Keyword1:** `major`, `minor`, or `patch` (case-insensitive)
- **Keyword2:** `feature`, `bugfix`, `engg`, or `tests`
(case-insensitive)

**Examples:**
- `[MAJOR] [Feature]: new API`
- `[minor] [bugfix]: fix crash`
- `[PATCH][tests]:add coverage`

## Proposed changes

Describe what this PR is trying to do.

## Type of change

- [ ] Feature work
- [ ] Bug fix
- [ ] Documentation
- [ ] Engineering change
- [ ] Test
- [ ] Logging/Telemetry

## Risk

- [ ] High – Errors could cause MAJOR regression of many scenarios.
(Example: new large features or high level infrastructure changes)
- [ ] Medium – Errors could cause regression of 1 or more scenarios.
(Example: somewhat complex bug fixes, small new features)
- [ ] Small – No issues are expected. (Example: Very small bug fixes,
string changes, or configuration settings changes)

## Additional information

---------

Co-authored-by: agubuzomaximus <agubuzomaximus@gmail.com>
Co-authored-by: Maximus Agubuzo <maagubuzo@microsoft.com>
Co-authored-by: Fidelia Nawar <fidelianawar@Fidelias-MacBook-Pro.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.