Commit cbfbaa2
Handle permissions API errors gracefully in UpdateUserScopesAsync (#1571)
* Handle permissions API errors gracefully in UpdateUserScopesAsync
When the permissions API returns a 404 for an unrecognized Graph
endpoint, the exception from that single call no longer causes the
entire Task.WhenAll to fail. Instead, the error is logged as a warning
and the endpoint is skipped, allowing the remaining permissions to be
reported correctly.
Fixes #1565
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix double enumeration of deferred task collection
Materialize the task collection with ToArray() and iterate the results
from Task.WhenAll instead of re-enumerating the deferred Select, which
would trigger duplicate HTTP calls.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent ef5ec23 commit cbfbaa2
1 file changed
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
75 | 83 | | |
76 | | - | |
| 84 | + | |
77 | 85 | | |
78 | | - | |
79 | 86 | | |
80 | 87 | | |
81 | 88 | | |
| |||
0 commit comments