Commit 877cfc3
Jmprieur/fix authority parsing (#3620)
* Fix Authority-only configuration: Parse to Instance/TenantId for AAD, CIAM, and B2C (#3614)
* Initial plan
* Implement authority-only configuration support for AAD, CIAM, and B2C
- Move ParseAuthorityIfNecessary to start of UpdateConfidentialClientApplicationOptionsFromMergedOptions
- Add defensive fallback parse in PrepareAuthorityInstanceForMsal
- Add TODO comment for future warning logging (issue #3611)
- Create new unit test file MergedOptionsAuthorityParsingTests.cs with 7 tests
- Modify E2E test to use Authority-only configuration
- Add new B2C authority-only E2E test
All unit tests pass successfully
Co-authored-by: jmprieur <[email protected]>
* Address code review feedback
- Add explicit using statement for Microsoft.Identity.Web in test file
- Improve defensive fallback to also check TenantId to avoid redundant parsing
All tests still pass
Co-authored-by: jmprieur <[email protected]>
* Restore original test and create new Authority-only test
- Restore AcquireToken_WithMicrosoftIdentityApplicationOptions_ClientCredentialsAsync with Instance/TenantId
- Create new AcquireToken_WithMicrosoftIdentityApplicationOptions_Authority_ClientCredentialsAsync for Authority-only scenario
Both tests now exist to demonstrate both recommended (Instance/TenantId) and Authority-only approaches
Co-authored-by: jmprieur <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jmprieur <[email protected]>
* Add high-performance warning logging for Authority + Instance/TenantId conflicts (#3615)
* Initial plan
* Add authority conflict warning logging infrastructure
Co-authored-by: jmprieur <[email protected]>
* Add comprehensive unit tests for authority conflict warnings
Co-authored-by: jmprieur <[email protected]>
* Wire up logger factory to MergedOptionsStore for runtime logging
Co-authored-by: jmprieur <[email protected]>
* Fix MergedOptionsStore constructor signature for DI compatibility
Co-authored-by: jmprieur <[email protected]>
* Rename MsalLogger alias to IdWebLogger for clarity
Co-authored-by: jmprieur <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jmprieur <[email protected]>
Co-authored-by: Jean-Marc Prieur <[email protected]>
* Add comprehensive test matrix for authority parsing logic (#3610) (#3616)
* Initial plan
* Add comprehensive authority parsing test matrix - all unit tests created and passing
Co-authored-by: jmprieur <[email protected]>
* Implement full E2E authority matrix tests following existing patterns
Co-authored-by: jmprieur <[email protected]>
* Remove duplicate test files and consolidate unique edge case tests
Co-authored-by: jmprieur <[email protected]>
* Remove performance smoke tests as they are not on the hot path
Co-authored-by: jmprieur <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jmprieur <[email protected]>
* Update version to 4.1.1 (#3619)
* Initial plan
* Update version to 4.1.1 and add changelog entry
Co-authored-by: jmprieur <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jmprieur <[email protected]>
* Update src/Microsoft.Identity.Web.TokenAcquisition/MergedOptions.cs
Co-authored-by: Copilot <[email protected]>
* Update changelog.md
Co-authored-by: Copilot <[email protected]>
* [WIP] Update authority parsing fix for ILoggerFactory usage (#3621)
* Initial plan
* Update MergedOptionsStore to use IServiceProvider instead of ILoggerFactory
Co-authored-by: jmprieur <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jmprieur <[email protected]>
* Adding more resilience to configuration (common on App token, and no domain for b2c)
---------
Co-authored-by: Copilot <[email protected]>
Co-authored-by: jmprieur <[email protected]>
Co-authored-by: Copilot <[email protected]>1 parent 233f2e0 commit 877cfc3
File tree
18 files changed
+778
-14
lines changed- src/Microsoft.Identity.Web.TokenAcquisition
- PublicAPI
- net10.0
- net462
- net472
- net8.0
- net9.0
- netstandard2.0
- tests
- E2E Tests/TokenAcquirerTests
- Microsoft.Identity.Web.Test
18 files changed
+778
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
1 | 10 | | |
2 | 11 | | |
3 | 12 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
Lines changed: 31 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
| |||
386 | 392 | | |
387 | 393 | | |
388 | 394 | | |
| 395 | + | |
| 396 | + | |
389 | 397 | | |
390 | 398 | | |
391 | 399 | | |
| |||
416 | 424 | | |
417 | 425 | | |
418 | 426 | | |
419 | | - | |
420 | | - | |
421 | 427 | | |
422 | 428 | | |
423 | 429 | | |
| |||
438 | 444 | | |
439 | 445 | | |
440 | 446 | | |
441 | | - | |
| 447 | + | |
442 | 448 | | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
443 | 466 | | |
444 | 467 | | |
445 | 468 | | |
| |||
473 | 496 | | |
474 | 497 | | |
475 | 498 | | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
476 | 504 | | |
477 | 505 | | |
478 | 506 | | |
| |||
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| 14 | + | |
11 | 15 | | |
12 | | - | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
19 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
20 | 33 | | |
21 | 34 | | |
22 | 35 | | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
4 | 10 | | |
| 11 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
2 | 8 | | |
| 9 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
2 | 8 | | |
| 9 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
2 | 8 | | |
| 9 | + | |
0 commit comments