Commit dc60b43
Surface Errors from MsalRuntime with Interaction Required (#7961)
When customers use `acquireTokenSilent` with msal-node-runtime, errors
reported to OneAuth-MSAL (such as interaction_required) are surfaced as:
```
"errormessage": "interaction_required: (pii)",
"errorname": "InteractionRequiredAuthError",
"errorstack": "InteractionRequiredAuthError: interaction_required: (pii)\n at ue.wrapError (c:\\Program <REDACTED: user-file-path> VS <REDACTED: user-file-path>:2:386244)\n at Object.o (c:\\Program <REDACTED: user-file-path> VS <REDACTED: user-file-path>:2:381487)"
```
However, these errors lack critical context such as the error code and
error tag from the broker or our library which makes it difficult for
our team to diagnose and resolve their issues.
This PR helps surface errors for interaction-required scenarios by
replacing `InteractionRequiredAuthError` with `NativeAuthError` for
InteractionRequired Status in NativeBrokerPlugin and enhancing the
NativeAuthError context
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent 5dc2f55 commit dc60b43
File tree
3 files changed
+19
-15
lines changed- change
- extensions/msal-node-extensions
- src/broker
- test/broker
3 files changed
+19
-15
lines changedLines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
648 | 651 | | |
649 | 652 | | |
650 | 653 | | |
651 | 654 | | |
652 | 655 | | |
653 | | - | |
| 656 | + | |
654 | 657 | | |
655 | 658 | | |
656 | 659 | | |
| |||
680 | 683 | | |
681 | 684 | | |
682 | 685 | | |
683 | | - | |
| 686 | + | |
684 | 687 | | |
685 | 688 | | |
686 | 689 | | |
| |||
Lines changed: 7 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
| 4 | + | |
3 | 5 | | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
| |||
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 26 | | |
36 | 27 | | |
37 | 28 | | |
| |||
95 | 86 | | |
96 | 87 | | |
97 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
98 | 92 | | |
99 | 93 | | |
100 | | - | |
| 94 | + | |
101 | 95 | | |
102 | 96 | | |
103 | 97 | | |
| |||
0 commit comments