Commit 0dcba92
fix: environment drift check compares issuer host only, not full URL
The iss claim includes the tenant ID (e.g., https://sts.windows.net/{tid}/),
so switching tenants falsely triggered the environment mismatch error
instead of the tenant mismatch error. Now stores and compares only the
issuer hostname (e.g., sts.windows.net vs sts.chinacloudapi.cn).
Also reordered drift checks: tenant first (most common), then
environment, then principal.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>1 parent 165aa7d commit 0dcba92
2 files changed
Lines changed: 19 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
474 | | - | |
| 474 | + | |
475 | 475 | | |
476 | | - | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
477 | 479 | | |
478 | 480 | | |
479 | 481 | | |
| |||
527 | 529 | | |
528 | 530 | | |
529 | 531 | | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
| 532 | + | |
539 | 533 | | |
540 | 534 | | |
541 | 535 | | |
| |||
544 | 538 | | |
545 | 539 | | |
546 | 540 | | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
547 | 554 | | |
548 | 555 | | |
549 | 556 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
545 | | - | |
| 545 | + | |
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| |||
0 commit comments