@azure/msal-browser 5.17.1 → 5.17.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/dist/app/IPublicClientApplication.mjs +1 -1
  2. package/dist/app/PublicClientApplication.mjs +1 -1
  3. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  4. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +2 -4
  5. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
  6. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
  7. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
  8. package/dist/cache/AccountManager.mjs +1 -1
  9. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  10. package/dist/cache/BrowserCacheManager.mjs +1 -1
  11. package/dist/cache/CacheHelpers.mjs +1 -1
  12. package/dist/cache/CacheKeys.mjs +1 -1
  13. package/dist/cache/CookieStorage.mjs +1 -1
  14. package/dist/cache/DatabaseStorage.mjs +1 -1
  15. package/dist/cache/EncryptedData.mjs +1 -1
  16. package/dist/cache/LocalStorage.mjs +1 -1
  17. package/dist/cache/MemoryStorage.mjs +1 -1
  18. package/dist/cache/SessionStorage.mjs +1 -1
  19. package/dist/cache/TokenCache.mjs +1 -1
  20. package/dist/config/Configuration.mjs +1 -1
  21. package/dist/controllers/NestedAppAuthController.mjs +1 -1
  22. package/dist/controllers/StandardController.mjs +23 -26
  23. package/dist/controllers/StandardController.mjs.map +1 -1
  24. package/dist/crypto/BrowserCrypto.mjs +1 -1
  25. package/dist/crypto/CryptoOps.mjs +1 -1
  26. package/dist/crypto/PkceGenerator.mjs +1 -1
  27. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  28. package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
  29. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
  30. package/dist/custom_auth/controller/CustomAuthStandardController.mjs +1 -1
  31. package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
  32. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  33. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  34. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  35. package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
  36. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
  37. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
  38. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
  39. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
  40. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
  41. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
  42. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
  43. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
  44. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
  45. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
  46. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
  47. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
  48. package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
  49. package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
  50. package/dist/custom_auth/core/error/HttpError.mjs +1 -1
  51. package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  52. package/dist/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
  53. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  54. package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  55. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  56. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  57. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  58. package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  59. package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  60. package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
  61. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  62. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  63. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  64. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  65. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  66. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
  67. package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
  68. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
  69. package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
  70. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  71. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  72. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  73. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
  74. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  75. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  76. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  77. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  78. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  79. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  80. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  81. package/dist/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
  82. package/dist/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
  83. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
  84. package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
  85. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  86. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  87. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  88. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  89. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  90. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  91. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  92. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  93. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
  94. package/dist/custom_auth/index.mjs +1 -1
  95. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  96. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  97. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  98. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  99. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  100. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  101. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  102. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  103. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  104. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  105. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  106. package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
  107. package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  108. package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  109. package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  110. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
  111. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
  112. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
  113. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  114. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  115. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  116. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  117. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  118. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  119. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
  120. package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  121. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  122. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  123. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  124. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  125. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  126. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  127. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  128. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  129. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  130. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  131. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  132. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  133. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  134. package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  135. package/dist/encode/Base64Decode.mjs +1 -1
  136. package/dist/encode/Base64Encode.mjs +1 -1
  137. package/dist/error/BrowserAuthError.mjs +1 -1
  138. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  139. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  140. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  141. package/dist/error/NativeAuthError.mjs +1 -1
  142. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  143. package/dist/error/NestedAppAuthError.mjs +1 -1
  144. package/dist/event/EventHandler.mjs +1 -1
  145. package/dist/event/EventMessage.mjs +1 -1
  146. package/dist/event/EventType.mjs +1 -1
  147. package/dist/index.mjs +1 -1
  148. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  149. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  150. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +123 -59
  151. package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
  152. package/dist/interaction_client/PopupClient.mjs +1 -1
  153. package/dist/interaction_client/RedirectClient.mjs +1 -1
  154. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  155. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  156. package/dist/interaction_client/SilentIframeClient.mjs +1 -1
  157. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  158. package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
  159. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  160. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  161. package/dist/log-strings-mapping.json +1201 -1201
  162. package/dist/naa/BridgeError.mjs +1 -1
  163. package/dist/naa/BridgeProxy.mjs +1 -1
  164. package/dist/naa/BridgeStatusCode.mjs +1 -1
  165. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  166. package/dist/navigation/NavigationClient.mjs +1 -1
  167. package/dist/network/FetchClient.mjs +39 -13
  168. package/dist/network/FetchClient.mjs.map +1 -1
  169. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  170. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  171. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  172. package/dist/packageMetadata.mjs +2 -2
  173. package/dist/popup_relay/constants.mjs +1 -1
  174. package/dist/popup_relay/index.mjs +1 -1
  175. package/dist/popup_relay/relayClient.mjs +1 -1
  176. package/dist/protocol/Authorize.mjs +1 -1
  177. package/dist/redirect_bridge/index.mjs +1 -1
  178. package/dist/request/RequestHelpers.mjs +1 -1
  179. package/dist/response/ResponseHandler.mjs +1 -1
  180. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  181. package/dist/telemetry/BrowserPerformanceEvents.mjs +1 -1
  182. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  183. package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
  184. package/dist/utils/BrowserConstants.mjs +1 -1
  185. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  186. package/dist/utils/BrowserUtils.mjs +1 -1
  187. package/dist/utils/Helpers.mjs +1 -1
  188. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  189. package/lib/custom-auth-path/log-strings-mapping.json +2 -2
  190. package/lib/custom-auth-path/msal-custom-auth.cjs +250 -165
  191. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  192. package/lib/custom-auth-path/msal-custom-auth.js +250 -165
  193. package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
  194. package/lib/log-strings-mapping.json +2 -2
  195. package/lib/msal-browser.cjs +253 -167
  196. package/lib/msal-browser.cjs.map +1 -1
  197. package/lib/msal-browser.js +253 -167
  198. package/lib/msal-browser.js.map +1 -1
  199. package/lib/msal-browser.min.js +2 -2
  200. package/lib/popup-relay/msal-popup-relay.cjs +2 -2
  201. package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
  202. package/lib/popup-relay/msal-popup-relay.js +2 -2
  203. package/lib/popup-relay/msal-popup-relay.js.map +1 -1
  204. package/lib/popup-relay/msal-popup-relay.min.js +1 -1
  205. package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
  206. package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
  207. package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
  208. package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
  209. package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
  210. package/package.json +2 -2
  211. package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +0 -4
  212. package/src/broker/nativeBroker/PlatformAuthRequest.ts +4 -7
  213. package/src/controllers/StandardController.ts +24 -29
  214. package/src/interaction_client/PlatformAuthInteractionClient.ts +160 -72
  215. package/src/network/FetchClient.ts +62 -14
  216. package/src/packageMetadata.ts +1 -1
  217. package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
  218. package/types/broker/nativeBroker/PlatformAuthRequest.d.ts +3 -6
  219. package/types/broker/nativeBroker/PlatformAuthRequest.d.ts.map +1 -1
  220. package/types/controllers/StandardController.d.ts +3 -0
  221. package/types/controllers/StandardController.d.ts.map +1 -1
  222. package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  223. package/types/interaction_client/PlatformAuthInteractionClient.d.ts +13 -3
  224. package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
  225. package/types/network/FetchClient.d.ts.map +1 -1
  226. package/types/packageMetadata.d.ts +1 -1
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v5.17.1 2026-07-15 */
1
+ /*! @azure/msal-browser v5.17.3 2026-07-29 */
2
2
  'use strict';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -6,7 +6,7 @@
6
6
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.msalCustomAuth = {}));
7
7
  })(this, (function (exports) { 'use strict';
8
8
 
9
- /*! @azure/msal-common v16.11.2 2026-07-15 */
9
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
10
10
  /*
11
11
  * Copyright (c) Microsoft Corporation. All rights reserved.
12
12
  * Licensed under the MIT License.
@@ -58,7 +58,7 @@
58
58
  const RESOURCE = "resource";
59
59
  const CLI_DATA = "clidata";
60
60
 
61
- /*! @azure/msal-common v16.11.2 2026-07-15 */
61
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
62
62
  /*
63
63
  * Copyright (c) Microsoft Corporation. All rights reserved.
64
64
  * Licensed under the MIT License.
@@ -289,7 +289,7 @@
289
289
  // Token renewal offset default in seconds
290
290
  const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
291
291
 
292
- /*! @azure/msal-common v16.11.2 2026-07-15 */
292
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
293
293
  /*
294
294
  * Copyright (c) Microsoft Corporation. All rights reserved.
295
295
  * Licensed under the MIT License.
@@ -318,7 +318,7 @@
318
318
  return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
319
319
  }
320
320
 
321
- /*! @azure/msal-common v16.11.2 2026-07-15 */
321
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
322
322
 
323
323
  /*
324
324
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -341,7 +341,7 @@
341
341
  return new ClientAuthError(errorCode, correlationId, additionalMessage);
342
342
  }
343
343
 
344
- /*! @azure/msal-common v16.11.2 2026-07-15 */
344
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
345
345
  /*
346
346
  * Copyright (c) Microsoft Corporation. All rights reserved.
347
347
  * Licensed under the MIT License.
@@ -378,7 +378,7 @@
378
378
  const resourceParameterRequired = "resource_parameter_required";
379
379
  const misplacedResourceParam = "misplaced_resource_parameter";
380
380
 
381
- /*! @azure/msal-common v16.11.2 2026-07-15 */
381
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
382
382
 
383
383
  /*
384
384
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -416,7 +416,7 @@
416
416
  };
417
417
  }
418
418
 
419
- /*! @azure/msal-common v16.11.2 2026-07-15 */
419
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
420
420
 
421
421
  /*
422
422
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -482,7 +482,7 @@
482
482
  return matches[2];
483
483
  }
484
484
 
485
- /*! @azure/msal-common v16.11.2 2026-07-15 */
485
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
486
486
 
487
487
  /*
488
488
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -570,7 +570,7 @@
570
570
  return updatedAccountInfo;
571
571
  }
572
572
 
573
- /*! @azure/msal-common v16.11.2 2026-07-15 */
573
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
574
574
  /*
575
575
  * Copyright (c) Microsoft Corporation. All rights reserved.
576
576
  * Licensed under the MIT License.
@@ -585,7 +585,7 @@
585
585
  Ciam: 3,
586
586
  };
587
587
 
588
- /*! @azure/msal-common v16.11.2 2026-07-15 */
588
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
589
589
  /*
590
590
  * Copyright (c) Microsoft Corporation. All rights reserved.
591
591
  * Licensed under the MIT License.
@@ -607,7 +607,7 @@
607
607
  return null;
608
608
  }
609
609
 
610
- /*! @azure/msal-common v16.11.2 2026-07-15 */
610
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
611
611
  /*
612
612
  * Copyright (c) Microsoft Corporation. All rights reserved.
613
613
  * Licensed under the MIT License.
@@ -631,7 +631,7 @@
631
631
  EAR: "EAR",
632
632
  };
633
633
 
634
- /*! @azure/msal-common v16.11.2 2026-07-15 */
634
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
635
635
  /**
636
636
  * Returns the AccountInfo interface for this account.
637
637
  * @internal
@@ -820,7 +820,7 @@
820
820
  entity.hasOwnProperty("authorityType"));
821
821
  }
822
822
 
823
- /*! @azure/msal-common v16.11.2 2026-07-15 */
823
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
824
824
  /*
825
825
  * Copyright (c) Microsoft Corporation. All rights reserved.
826
826
  * Licensed under the MIT License.
@@ -830,7 +830,7 @@
830
830
  */
831
831
  const unexpectedError = "unexpected_error";
832
832
 
833
- /*! @azure/msal-common v16.11.2 2026-07-15 */
833
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
834
834
 
835
835
  /*
836
836
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -850,7 +850,7 @@
850
850
  return new ClientConfigurationError(errorCode, correlationId);
851
851
  }
852
852
 
853
- /*! @azure/msal-common v16.11.2 2026-07-15 */
853
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
854
854
  /*
855
855
  * Copyright (c) Microsoft Corporation. All rights reserved.
856
856
  * Licensed under the MIT License.
@@ -876,7 +876,7 @@
876
876
  const invalidPlatformBrokerConfiguration = "invalid_platform_broker_configuration";
877
877
  const issuerValidationFailed = "issuer_validation_failed";
878
878
 
879
- /*! @azure/msal-common v16.11.2 2026-07-15 */
879
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
880
880
  /*
881
881
  * Copyright (c) Microsoft Corporation. All rights reserved.
882
882
  * Licensed under the MIT License.
@@ -888,7 +888,7 @@
888
888
  response.hasOwnProperty("jwks_uri"));
889
889
  }
890
890
 
891
- /*! @azure/msal-common v16.11.2 2026-07-15 */
891
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
892
892
  /*
893
893
  * Copyright (c) Microsoft Corporation. All rights reserved.
894
894
  * Licensed under the MIT License.
@@ -968,7 +968,7 @@
968
968
  }
969
969
  }
970
970
 
971
- /*! @azure/msal-common v16.11.2 2026-07-15 */
971
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
972
972
 
973
973
  /*
974
974
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1126,7 +1126,7 @@
1126
1126
  }
1127
1127
  }
1128
1128
 
1129
- /*! @azure/msal-common v16.11.2 2026-07-15 */
1129
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
1130
1130
 
1131
1131
  /*
1132
1132
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1292,7 +1292,7 @@
1292
1292
  return null;
1293
1293
  }
1294
1294
 
1295
- /*! @azure/msal-common v16.11.2 2026-07-15 */
1295
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
1296
1296
  /*
1297
1297
  * Copyright (c) Microsoft Corporation. All rights reserved.
1298
1298
  * Licensed under the MIT License.
@@ -1301,7 +1301,7 @@
1301
1301
  // AzureCloudInstance is not specified.
1302
1302
  None: "none"};
1303
1303
 
1304
- /*! @azure/msal-common v16.11.2 2026-07-15 */
1304
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
1305
1305
  /*
1306
1306
  * Copyright (c) Microsoft Corporation. All rights reserved.
1307
1307
  * Licensed under the MIT License.
@@ -1311,7 +1311,7 @@
1311
1311
  response.hasOwnProperty("metadata"));
1312
1312
  }
1313
1313
 
1314
- /*! @azure/msal-common v16.11.2 2026-07-15 */
1314
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
1315
1315
  /*
1316
1316
  * Copyright (c) Microsoft Corporation. All rights reserved.
1317
1317
  * Licensed under the MIT License.
@@ -1321,7 +1321,7 @@
1321
1321
  response.hasOwnProperty("error_description"));
1322
1322
  }
1323
1323
 
1324
- /*! @azure/msal-common v16.11.2 2026-07-15 */
1324
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
1325
1325
  /*
1326
1326
  * Copyright (c) Microsoft Corporation. All rights reserved.
1327
1327
  * Licensed under the MIT License.
@@ -1392,7 +1392,7 @@
1392
1392
  const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
1393
1393
  const SetUserData = "setUserData";
1394
1394
 
1395
- /*! @azure/msal-common v16.11.2 2026-07-15 */
1395
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
1396
1396
  /*
1397
1397
  * Copyright (c) Microsoft Corporation. All rights reserved.
1398
1398
  * Licensed under the MIT License.
@@ -1485,7 +1485,7 @@
1485
1485
  };
1486
1486
  };
1487
1487
 
1488
- /*! @azure/msal-common v16.11.2 2026-07-15 */
1488
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
1489
1489
 
1490
1490
  /*
1491
1491
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1596,7 +1596,7 @@
1596
1596
  },
1597
1597
  };
1598
1598
 
1599
- /*! @azure/msal-common v16.11.2 2026-07-15 */
1599
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
1600
1600
  /*
1601
1601
  * Copyright (c) Microsoft Corporation. All rights reserved.
1602
1602
  * Licensed under the MIT License.
@@ -1661,7 +1661,7 @@
1661
1661
  return cachedAtSec > nowSeconds();
1662
1662
  }
1663
1663
 
1664
- /*! @azure/msal-common v16.11.2 2026-07-15 */
1664
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
1665
1665
 
1666
1666
  /*
1667
1667
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1928,7 +1928,7 @@
1928
1928
  return metadata.expiresAt <= nowSeconds();
1929
1929
  }
1930
1930
 
1931
- /*! @azure/msal-common v16.11.2 2026-07-15 */
1931
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
1932
1932
 
1933
1933
  /*
1934
1934
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2898,7 +2898,7 @@
2898
2898
  };
2899
2899
  }
2900
2900
 
2901
- /*! @azure/msal-common v16.11.2 2026-07-15 */
2901
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
2902
2902
 
2903
2903
  /*
2904
2904
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2932,7 +2932,7 @@
2932
2932
  }
2933
2933
  }
2934
2934
 
2935
- /*! @azure/msal-common v16.11.2 2026-07-15 */
2935
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
2936
2936
 
2937
2937
  /*
2938
2938
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3128,7 +3128,7 @@
3128
3128
  }
3129
3129
  }
3130
3130
 
3131
- /*! @azure/msal-common v16.11.2 2026-07-15 */
3131
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
3132
3132
 
3133
3133
  /*
3134
3134
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3543,7 +3543,7 @@
3543
3543
  }
3544
3544
  }
3545
3545
 
3546
- /*! @azure/msal-common v16.11.2 2026-07-15 */
3546
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
3547
3547
 
3548
3548
  /*
3549
3549
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3665,7 +3665,7 @@
3665
3665
  }
3666
3666
  }
3667
3667
 
3668
- /*! @azure/msal-common v16.11.2 2026-07-15 */
3668
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
3669
3669
 
3670
3670
  /*
3671
3671
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3708,7 +3708,7 @@
3708
3708
  },
3709
3709
  };
3710
3710
 
3711
- /*! @azure/msal-common v16.11.2 2026-07-15 */
3711
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
3712
3712
  /*
3713
3713
  * Copyright (c) Microsoft Corporation. All rights reserved.
3714
3714
  * Licensed under the MIT License.
@@ -3983,12 +3983,12 @@
3983
3983
  }
3984
3984
  }
3985
3985
 
3986
- /*! @azure/msal-common v16.11.2 2026-07-15 */
3986
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
3987
3987
  /* eslint-disable header/header */
3988
3988
  const name$1 = "@azure/msal-common";
3989
- const version$1 = "16.11.2";
3989
+ const version$1 = "16.11.3";
3990
3990
 
3991
- /*! @azure/msal-common v16.11.2 2026-07-15 */
3991
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
3992
3992
  /*
3993
3993
  * Copyright (c) Microsoft Corporation. All rights reserved.
3994
3994
  * Licensed under the MIT License.
@@ -3996,7 +3996,7 @@
3996
3996
  const cacheQuotaExceeded = "cache_quota_exceeded";
3997
3997
  const cacheErrorUnknown = "cache_error_unknown";
3998
3998
 
3999
- /*! @azure/msal-common v16.11.2 2026-07-15 */
3999
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
4000
4000
 
4001
4001
  /*
4002
4002
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4034,7 +4034,7 @@
4034
4034
  }
4035
4035
  }
4036
4036
 
4037
- /*! @azure/msal-common v16.11.2 2026-07-15 */
4037
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
4038
4038
 
4039
4039
  /*
4040
4040
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5181,7 +5181,7 @@
5181
5181
  }
5182
5182
  }
5183
5183
 
5184
- /*! @azure/msal-common v16.11.2 2026-07-15 */
5184
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
5185
5185
  /*
5186
5186
  * Copyright (c) Microsoft Corporation. All rights reserved.
5187
5187
  * Licensed under the MIT License.
@@ -5195,7 +5195,7 @@
5195
5195
  const PerformanceEventStatus = {
5196
5196
  InProgress: 1};
5197
5197
 
5198
- /*! @azure/msal-common v16.11.2 2026-07-15 */
5198
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
5199
5199
 
5200
5200
  /*
5201
5201
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5253,7 +5253,7 @@
5253
5253
  }
5254
5254
  }
5255
5255
 
5256
- /*! @azure/msal-common v16.11.2 2026-07-15 */
5256
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
5257
5257
 
5258
5258
  /*
5259
5259
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5349,7 +5349,7 @@
5349
5349
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
5350
5350
  }
5351
5351
 
5352
- /*! @azure/msal-common v16.11.2 2026-07-15 */
5352
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
5353
5353
  /*
5354
5354
  * Copyright (c) Microsoft Corporation. All rights reserved.
5355
5355
  * Licensed under the MIT License.
@@ -5376,7 +5376,7 @@
5376
5376
  }
5377
5377
  }
5378
5378
 
5379
- /*! @azure/msal-common v16.11.2 2026-07-15 */
5379
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
5380
5380
 
5381
5381
  /*
5382
5382
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5456,7 +5456,7 @@
5456
5456
  }
5457
5457
  }
5458
5458
 
5459
- /*! @azure/msal-common v16.11.2 2026-07-15 */
5459
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
5460
5460
  /*
5461
5461
  * Copyright (c) Microsoft Corporation. All rights reserved.
5462
5462
  * Licensed under the MIT License.
@@ -5507,7 +5507,7 @@
5507
5507
  */
5508
5508
  const interruptedUser = "interrupted_user";
5509
5509
 
5510
- /*! @azure/msal-common v16.11.2 2026-07-15 */
5510
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
5511
5511
 
5512
5512
  /*
5513
5513
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5574,7 +5574,7 @@
5574
5574
  return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
5575
5575
  }
5576
5576
 
5577
- /*! @azure/msal-common v16.11.2 2026-07-15 */
5577
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
5578
5578
 
5579
5579
  /*
5580
5580
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5593,7 +5593,7 @@
5593
5593
  }
5594
5594
  }
5595
5595
 
5596
- /*! @azure/msal-common v16.11.2 2026-07-15 */
5596
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
5597
5597
 
5598
5598
  /*
5599
5599
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5664,7 +5664,7 @@
5664
5664
  }
5665
5665
  }
5666
5666
 
5667
- /*! @azure/msal-common v16.11.2 2026-07-15 */
5667
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
5668
5668
 
5669
5669
  /*
5670
5670
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6015,7 +6015,7 @@
6015
6015
  return baseAccount;
6016
6016
  }
6017
6017
 
6018
- /*! @azure/msal-common v16.11.2 2026-07-15 */
6018
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
6019
6019
  /*
6020
6020
  * Copyright (c) Microsoft Corporation. All rights reserved.
6021
6021
  * Licensed under the MIT License.
@@ -6025,7 +6025,7 @@
6025
6025
  UPN: "UPN",
6026
6026
  };
6027
6027
 
6028
- /*! @azure/msal-common v16.11.2 2026-07-15 */
6028
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
6029
6029
  /*
6030
6030
  * Copyright (c) Microsoft Corporation. All rights reserved.
6031
6031
  * Licensed under the MIT License.
@@ -6044,7 +6044,7 @@
6044
6044
  }
6045
6045
  }
6046
6046
 
6047
- /*! @azure/msal-common v16.11.2 2026-07-15 */
6047
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
6048
6048
  /*
6049
6049
  * Copyright (c) Microsoft Corporation. All rights reserved.
6050
6050
  * Licensed under the MIT License.
@@ -6066,7 +6066,7 @@
6066
6066
  };
6067
6067
  }
6068
6068
 
6069
- /*! @azure/msal-common v16.11.2 2026-07-15 */
6069
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
6070
6070
 
6071
6071
  /*
6072
6072
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6152,7 +6152,7 @@
6152
6152
  }
6153
6153
  }
6154
6154
 
6155
- /*! @azure/msal-common v16.11.2 2026-07-15 */
6155
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
6156
6156
 
6157
6157
  /*
6158
6158
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6183,7 +6183,7 @@
6183
6183
  return new NetworkError(error, httpStatus, responseHeaders);
6184
6184
  }
6185
6185
 
6186
- /*! @azure/msal-common v16.11.2 2026-07-15 */
6186
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
6187
6187
 
6188
6188
  /*
6189
6189
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6263,7 +6263,7 @@
6263
6263
  ThrottlingUtils.preProcess(cacheManager, thumbprint, correlationId);
6264
6264
  let response;
6265
6265
  try {
6266
- response = await invokeAsync((networkClient.sendPostRequestAsync.bind(networkClient)), NetworkClientSendPostRequestAsync, logger, performanceClient, correlationId)(tokenEndpoint, options);
6266
+ response = await invokeAsync((networkClient.sendPostRequestAsync.bind(networkClient)), NetworkClientSendPostRequestAsync, logger, performanceClient, correlationId)(tokenEndpoint, { ...options, correlationId, performanceClient });
6267
6267
  const responseHeaders = response.headers || {};
6268
6268
  performanceClient?.addFields({
6269
6269
  refreshTokenSize: response.body.refresh_token?.length || 0,
@@ -6299,7 +6299,7 @@
6299
6299
  return response;
6300
6300
  }
6301
6301
 
6302
- /*! @azure/msal-common v16.11.2 2026-07-15 */
6302
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
6303
6303
 
6304
6304
  /*
6305
6305
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6556,7 +6556,7 @@
6556
6556
  }
6557
6557
  }
6558
6558
 
6559
- /*! @azure/msal-common v16.11.2 2026-07-15 */
6559
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
6560
6560
 
6561
6561
  /*
6562
6562
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6783,7 +6783,7 @@
6783
6783
  return account.loginHint || account.idTokenClaims?.login_hint || null;
6784
6784
  }
6785
6785
 
6786
- /*! @azure/msal-common v16.11.2 2026-07-15 */
6786
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
6787
6787
 
6788
6788
  /*
6789
6789
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6804,7 +6804,7 @@
6804
6804
  return new JoseHeaderError(code, correlationId);
6805
6805
  }
6806
6806
 
6807
- /*! @azure/msal-common v16.11.2 2026-07-15 */
6807
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
6808
6808
  /*
6809
6809
  * Copyright (c) Microsoft Corporation. All rights reserved.
6810
6810
  * Licensed under the MIT License.
@@ -6812,7 +6812,7 @@
6812
6812
  const missingKidError = "missing_kid_error";
6813
6813
  const missingAlgError = "missing_alg_error";
6814
6814
 
6815
- /*! @azure/msal-common v16.11.2 2026-07-15 */
6815
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
6816
6816
 
6817
6817
  /*
6818
6818
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6852,7 +6852,7 @@
6852
6852
  }
6853
6853
  }
6854
6854
 
6855
- /*! @azure/msal-common v16.11.2 2026-07-15 */
6855
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
6856
6856
 
6857
6857
  /*
6858
6858
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7073,7 +7073,7 @@
7073
7073
  }
7074
7074
  }
7075
7075
 
7076
- /*! @azure/msal-common v16.11.2 2026-07-15 */
7076
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
7077
7077
 
7078
7078
  /*
7079
7079
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7366,7 +7366,7 @@
7366
7366
  clearNativeBrokerErrorCode() { }
7367
7367
  }
7368
7368
 
7369
- /*! @azure/msal-common v16.11.2 2026-07-15 */
7369
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
7370
7370
 
7371
7371
  /*
7372
7372
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7474,7 +7474,7 @@
7474
7474
  }
7475
7475
  }
7476
7476
 
7477
- /*! @azure/msal-common v16.11.2 2026-07-15 */
7477
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
7478
7478
 
7479
7479
  /*
7480
7480
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7490,7 +7490,7 @@
7490
7490
  },
7491
7491
  };
7492
7492
 
7493
- /*! @azure/msal-common v16.11.2 2026-07-15 */
7493
+ /*! @azure/msal-common v16.11.3 2026-07-29 */
7494
7494
 
7495
7495
  /*
7496
7496
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7918,7 +7918,7 @@
7918
7918
 
7919
7919
  /* eslint-disable header/header */
7920
7920
  const name = "@azure/msal-browser";
7921
- const version = "5.17.1";
7921
+ const version = "5.17.3";
7922
7922
 
7923
7923
  /*
7924
7924
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -17229,50 +17229,63 @@
17229
17229
  const nativeATMeasurement = this.performanceClient.startMeasurement(NativeInteractionClientAcquireToken, this.correlationId);
17230
17230
  const reqTimestamp = nowSeconds();
17231
17231
  const serverTelemetryManager = initializeServerTelemetryManager(this.apiId, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
17232
+ // initialize native request (statically builds the request; does not contact the broker)
17233
+ let nativeRequest;
17232
17234
  try {
17233
- // initialize native request
17234
- const nativeRequest = await this.initializePlatformRequest(request);
17235
- // check if the tokens can be retrieved from internal cache
17236
- try {
17237
- const result = await this.acquireTokensFromCache(this.accountId, nativeRequest);
17238
- nativeATMeasurement.end({
17239
- success: true,
17235
+ nativeRequest = await this.initializePlatformRequest(request);
17236
+ }
17237
+ catch (e) {
17238
+ /*
17239
+ * Request initialization (e.g. PoP token generation or authority
17240
+ * resolution) failed before the broker was contacted, so end the
17241
+ * measurement here to avoid an orphaned sub-measurement.
17242
+ * Broker was never engaged, so this was not a native broker outcome.
17243
+ */
17244
+ nativeATMeasurement.add({
17245
+ isNativeBroker: false,
17246
+ });
17247
+ nativeATMeasurement.end({
17248
+ success: false,
17249
+ }, e);
17250
+ throw e;
17251
+ }
17252
+ // check if the tokens can be retrieved from internal cache
17253
+ try {
17254
+ const result = await this.acquireTokensFromCache(this.accountId, nativeRequest);
17255
+ // Served from the native internal cache; token did not come directly from the broker
17256
+ nativeATMeasurement.add({
17257
+ isNativeBroker: false,
17258
+ });
17259
+ nativeATMeasurement.end({
17260
+ success: true,
17261
+ fromCache: true,
17262
+ });
17263
+ return result;
17264
+ }
17265
+ catch (e) {
17266
+ if (cacheLookupPolicy === CacheLookupPolicy.AccessToken) {
17267
+ this.logger.info("MSAL internal Cache does not contain tokens, return error as per cache policy", this.correlationId);
17268
+ nativeATMeasurement.add({
17240
17269
  isNativeBroker: false,
17241
- fromCache: true,
17242
17270
  });
17243
- return result;
17244
- }
17245
- catch (e) {
17246
- if (cacheLookupPolicy === CacheLookupPolicy.AccessToken) {
17247
- this.logger.info("MSAL internal Cache does not contain tokens, return error as per cache policy", this.correlationId);
17248
- nativeATMeasurement.end({
17249
- success: false,
17250
- brokerErrorCode: "cache_request_failed",
17251
- });
17252
- throw e;
17253
- }
17254
- // continue with a native call for any and all errors
17255
- this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call", this.correlationId);
17256
- }
17257
- const validatedResponse = await this.platformAuthProvider.sendMessage(nativeRequest);
17258
- return await this.handleNativeResponse(validatedResponse, nativeRequest, reqTimestamp)
17259
- .then((result) => {
17260
- nativeATMeasurement.end({
17261
- success: true,
17262
- isNativeBroker: true,
17263
- requestId: result.requestId,
17264
- });
17265
- serverTelemetryManager.clearNativeBrokerErrorCode();
17266
- return result;
17267
- })
17268
- .catch((error) => {
17269
17271
  nativeATMeasurement.end({
17270
17272
  success: false,
17271
- errorCode: error.errorCode,
17272
- subErrorCode: error.subError,
17273
17273
  });
17274
- throw error;
17274
+ throw e;
17275
+ }
17276
+ // continue with a native call for any and all errors
17277
+ this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call", this.correlationId);
17278
+ }
17279
+ // dispatch the request to the broker
17280
+ try {
17281
+ const validatedResponse = await this.platformAuthProvider.sendMessage(nativeRequest);
17282
+ const result = await this.handleNativeResponse(validatedResponse, nativeRequest, reqTimestamp, request.storeInCache);
17283
+ nativeATMeasurement.end({
17284
+ success: true,
17285
+ requestId: result.requestId,
17275
17286
  });
17287
+ serverTelemetryManager.clearNativeBrokerErrorCode();
17288
+ return result;
17276
17289
  }
17277
17290
  catch (e) {
17278
17291
  if (e instanceof NativeAuthError) {
@@ -17280,10 +17293,29 @@
17280
17293
  }
17281
17294
  nativeATMeasurement.end({
17282
17295
  success: false,
17283
- });
17296
+ }, e);
17297
+ this.setBrokerErrorTelemetry(e);
17284
17298
  throw e;
17285
17299
  }
17286
17300
  }
17301
+ /**
17302
+ * Records platform-broker error telemetry on the root event for the current
17303
+ * correlationId. `isNativeBroker` is set optimistically to true because the
17304
+ * broker was engaged; when the caller subsequently falls back to a web flow
17305
+ * that succeeds, the root success measurement overrides it to false via
17306
+ * `result.fromPlatformBroker`. Terminal broker errors (no fallback) retain
17307
+ * true. `brokerErrorName`/`brokerErrorCode` are recorded when the error is an `AuthError`.
17308
+ * @param error error thrown by the broker interaction
17309
+ */
17310
+ setBrokerErrorTelemetry(error) {
17311
+ if (error instanceof AuthError) {
17312
+ this.performanceClient.addFields({
17313
+ isNativeBroker: true,
17314
+ brokerErrorName: error.name,
17315
+ brokerErrorCode: error.errorCode,
17316
+ }, this.correlationId);
17317
+ }
17318
+ }
17287
17319
  /**
17288
17320
  * Creates silent flow request
17289
17321
  * @param request
@@ -17355,11 +17387,21 @@
17355
17387
  const serverTelemetryManager = initializeServerTelemetryManager(this.apiId, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
17356
17388
  serverTelemetryManager.setNativeBrokerErrorCode(e.errorCode);
17357
17389
  if (isFatalNativeAuthError(e)) {
17390
+ /*
17391
+ * Fatal error on redirect initiate always falls back to a
17392
+ * regular web redirect, so this request did not complete
17393
+ * natively. Token telemetry for the eventual outcome lands
17394
+ * in handleRedirectPromise (phase 2).
17395
+ */
17396
+ this.setBrokerErrorTelemetry(e);
17358
17397
  throw e;
17359
17398
  }
17360
17399
  }
17361
17400
  }
17362
- this.browserStorage.setTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST, JSON.stringify(nativeRequest), true);
17401
+ this.browserStorage.setTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST, JSON.stringify({
17402
+ ...nativeRequest,
17403
+ storeInCache: request.storeInCache,
17404
+ }), true);
17363
17405
  const navigationOptions = {
17364
17406
  apiId: ApiId.acquireTokenRedirect,
17365
17407
  timeout: this.config.system.redirectNavigationTimeout,
@@ -17389,7 +17431,11 @@
17389
17431
  this.performanceClient?.addFields({ errorCode: "no_cached_request" }, this.correlationId);
17390
17432
  return null;
17391
17433
  }
17392
- const { prompt, ...request } = cachedRequest;
17434
+ /*
17435
+ * storeInCache is a client-side cache directive persisted alongside the cached
17436
+ * request (not a broker-contract parameter), so extract it here before resending.
17437
+ */
17438
+ const { prompt, storeInCache, ...request } = cachedRequest;
17393
17439
  if (prompt) {
17394
17440
  this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window.", this.correlationId);
17395
17441
  }
@@ -17398,13 +17444,13 @@
17398
17444
  try {
17399
17445
  this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.", this.correlationId);
17400
17446
  const response = await this.platformAuthProvider.sendMessage(request);
17401
- const authResult = await this.handleNativeResponse(response, request, reqTimestamp);
17447
+ const authResult = await this.handleNativeResponse(response, request, reqTimestamp, storeInCache);
17402
17448
  const serverTelemetryManager = initializeServerTelemetryManager(this.apiId, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
17403
17449
  serverTelemetryManager.clearNativeBrokerErrorCode();
17404
- this.performanceClient?.addFields({ isNativeBroker: true }, this.correlationId);
17405
17450
  return authResult;
17406
17451
  }
17407
17452
  catch (e) {
17453
+ this.setBrokerErrorTelemetry(e);
17408
17454
  throw e;
17409
17455
  }
17410
17456
  }
@@ -17422,7 +17468,7 @@
17422
17468
  * @param request
17423
17469
  * @param reqTimestamp
17424
17470
  */
17425
- async handleNativeResponse(response, request, reqTimestamp) {
17471
+ async handleNativeResponse(response, request, reqTimestamp, storeInCache) {
17426
17472
  this.logger.trace("NativeInteractionClient - handleNativeResponse called.", this.correlationId);
17427
17473
  // generate identifiers
17428
17474
  const idTokenClaims = extractTokenClaims(response.id_token, base64Decode, this.correlationId);
@@ -17451,8 +17497,8 @@
17451
17497
  const result = await this.generateAuthenticationResult(response, request, idTokenClaims, baseAccount, authority.canonicalAuthority, reqTimestamp);
17452
17498
  // cache accounts and tokens in the appropriate storage
17453
17499
  await this.cacheAccount(baseAccount, isKmsi(idTokenClaims));
17454
- await this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, result.tenantId, reqTimestamp, authority.getPreferredCache() // environment
17455
- );
17500
+ await this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, result.tenantId, reqTimestamp, authority.getPreferredCache(), // environment
17501
+ storeInCache);
17456
17502
  return result;
17457
17503
  }
17458
17504
  /**
@@ -17573,7 +17619,9 @@
17573
17619
  correlationId: this.correlationId,
17574
17620
  state: response.state,
17575
17621
  fromPlatformBroker: true,
17576
- ...(request.resource && { resource: request.resource }),
17622
+ ...(request.extraParameters?.resource && {
17623
+ resource: request.extraParameters.resource,
17624
+ }),
17577
17625
  };
17578
17626
  return result;
17579
17627
  }
@@ -17597,7 +17645,7 @@
17597
17645
  * @param tenantId
17598
17646
  * @param reqTimestamp
17599
17647
  */
17600
- async cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, tenantId, reqTimestamp, environment) {
17648
+ async cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, tenantId, reqTimestamp, environment, storeInCache) {
17601
17649
  const cachedIdToken = createIdTokenEntity(homeAccountIdentifier, environment, response.id_token || "", request.clientId, idTokenClaims.tid || "");
17602
17650
  // cache accessToken in inmemory storage
17603
17651
  const expiresIn = request.tokenType === AuthenticationScheme.POP
@@ -17609,14 +17657,14 @@
17609
17657
  const responseScopes = this.generateScopes(response.scope, request.scope);
17610
17658
  const cachedAccessToken = createAccessTokenEntity(homeAccountIdentifier, environment, response.access_token, request.clientId, idTokenClaims.tid || tenantId, responseScopes.printScopes(), tokenExpirationSeconds, 0, base64Decode, request.correlationId, undefined, request.tokenType, undefined, request.keyId);
17611
17659
  // save idtoken credential in configured browser storage
17612
- if (!!cachedIdToken && request.storeInCache?.idToken !== false) {
17660
+ if (!!cachedIdToken && storeInCache?.idToken !== false) {
17613
17661
  await this.browserStorage.setIdTokenCredential(cachedIdToken, this.correlationId, isKmsi(idTokenClaims));
17614
17662
  }
17615
17663
  // save access token credential in memory storage
17616
17664
  const nativeCacheRecord = {
17617
17665
  accessToken: cachedAccessToken,
17618
17666
  };
17619
- return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, isKmsi(idTokenClaims), this.apiId, request.storeInCache);
17667
+ return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, isKmsi(idTokenClaims), this.apiId, storeInCache);
17620
17668
  }
17621
17669
  getExpiresInValue(tokenType, expiresIn) {
17622
17670
  return tokenType === AuthenticationScheme.POP
@@ -17688,13 +17736,12 @@
17688
17736
  const configClaims = request.skipBrokerClaims && !!request.embeddedClientId
17689
17737
  ? undefined
17690
17738
  : this.config.auth.clientCapabilities;
17691
- // scopes are expected to be received by the native broker as "scope" and will be added to the request below. Other properties that should be dropped from the request to the native broker can be included in the object destructuring here.
17692
- const { scopes, claims, ...remainingProperties } = request;
17739
+ // scopes are expected to be received by the native broker as "scope" and will be added to the request below. 'resource' is added in extraParameters for MCP scenarios.
17740
+ const { scopes, claims } = request;
17693
17741
  const scopeSet = new ScopeSet(scopes || [], this.correlationId);
17694
17742
  scopeSet.appendScopes(OIDC_DEFAULT_SCOPES);
17695
17743
  const mergedClaims = buildMergedClaims(claims, configClaims?.length ? configClaims : undefined);
17696
17744
  const validatedRequest = {
17697
- ...remainingProperties,
17698
17745
  claims: mergedClaims,
17699
17746
  accountId: this.accountId,
17700
17747
  clientId: this.config.auth.clientId,
@@ -17703,19 +17750,28 @@
17703
17750
  redirectUri: getRedirectUri(request.redirectUri, this.config.auth.redirectUri, this.logger, this.correlationId),
17704
17751
  prompt: this.getPrompt(request.prompt),
17705
17752
  correlationId: this.correlationId,
17753
+ isSts: false,
17706
17754
  tokenType: request.authenticationScheme,
17707
17755
  windowTitleSubstring: document.title,
17756
+ nonce: request.nonce,
17757
+ state: request.state,
17758
+ loginHint: request.loginHint,
17708
17759
  extraParameters: {
17709
17760
  ...request.extraParameters,
17761
+ ...(request.resource && { resource: request.resource }), // resource is set for MCP scenarios
17710
17762
  },
17711
17763
  extendedExpiryToken: false,
17712
17764
  keyId: request.popKid,
17765
+ resourceRequestMethod: request.resourceRequestMethod,
17766
+ resourceRequestUri: request.resourceRequestUri,
17767
+ shrClaims: request.shrClaims,
17768
+ shrNonce: request.shrNonce,
17713
17769
  };
17714
17770
  // Check for PoP token requests: signPopToken should only be set to true if popKid is not set
17715
17771
  if (validatedRequest.signPopToken && !!request.popKid) {
17716
17772
  throw createBrowserAuthError(invalidPopTokenRequest, this.correlationId);
17717
17773
  }
17718
- this.handleExtraBrokerParams(validatedRequest);
17774
+ this.handleExtraBrokerParams(validatedRequest, request.embeddedClientId);
17719
17775
  validatedRequest.extraParameters =
17720
17776
  validatedRequest.extraParameters || {};
17721
17777
  validatedRequest.extraParameters.telemetry =
@@ -17790,19 +17846,19 @@
17790
17846
  * @param request {PlatformAuthRequest}
17791
17847
  * @private
17792
17848
  */
17793
- handleExtraBrokerParams(request) {
17849
+ handleExtraBrokerParams(request, embeddedClientId) {
17794
17850
  const hasExtraBrokerParams = request.extraParameters &&
17795
17851
  request.extraParameters.hasOwnProperty(BROKER_CLIENT_ID) &&
17796
17852
  request.extraParameters.hasOwnProperty(BROKER_REDIRECT_URI) &&
17797
17853
  request.extraParameters.hasOwnProperty(CLIENT_ID);
17798
- if (!request.embeddedClientId && !hasExtraBrokerParams) {
17854
+ if (!embeddedClientId && !hasExtraBrokerParams) {
17799
17855
  return;
17800
17856
  }
17801
17857
  let child_client_id = "";
17802
17858
  const child_redirect_uri = request.redirectUri;
17803
- if (request.embeddedClientId) {
17859
+ if (embeddedClientId) {
17804
17860
  request.redirectUri = this.config.auth.redirectUri;
17805
- child_client_id = request.embeddedClientId;
17861
+ child_client_id = embeddedClientId;
17806
17862
  }
17807
17863
  else if (request.extraParameters) {
17808
17864
  request.redirectUri =
@@ -17810,7 +17866,15 @@
17810
17866
  child_client_id =
17811
17867
  request.extraParameters[CLIENT_ID];
17812
17868
  }
17869
+ const {
17870
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
17871
+ [BROKER_CLIENT_ID]: _brkClientId,
17872
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
17873
+ [BROKER_REDIRECT_URI]: _brkRedirectUri,
17874
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
17875
+ [CLIENT_ID]: _clientId, ...remainingExtraParameters } = request.extraParameters || {};
17813
17876
  request.extraParameters = {
17877
+ ...remainingExtraParameters,
17814
17878
  child_client_id,
17815
17879
  child_redirect_uri,
17816
17880
  };
@@ -18235,6 +18299,8 @@
18235
18299
  * Copyright (c) Microsoft Corporation. All rights reserved.
18236
18300
  * Licensed under the MIT License.
18237
18301
  */
18302
+ const MAX_FETCH_POST_RETRIES = 1;
18303
+ const RETRY_DELAY_MS = 100;
18238
18304
  /**
18239
18305
  * This class implements the Fetch API for GET and POST requests. See more here: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
18240
18306
  */
@@ -18283,21 +18349,40 @@
18283
18349
  async sendPostRequestAsync(url, options) {
18284
18350
  const reqBody = (options && options.body) || "";
18285
18351
  const reqHeaders = getFetchHeaders(options);
18352
+ const correlationId = options?.correlationId;
18353
+ const performanceClient = options?.performanceClient;
18286
18354
  let response;
18287
- let responseStatus = 0;
18288
- let responseHeaders = {};
18289
- try {
18290
- response = await fetch(url, {
18291
- method: HTTP_REQUEST_TYPE.POST,
18292
- headers: reqHeaders,
18293
- body: reqBody,
18294
- });
18355
+ let lastError;
18356
+ for (let attempt = 1; attempt <= MAX_FETCH_POST_RETRIES + 1; attempt++) {
18357
+ try {
18358
+ response = await fetch(url, {
18359
+ method: HTTP_REQUEST_TYPE.POST,
18360
+ headers: reqHeaders,
18361
+ body: reqBody,
18362
+ });
18363
+ break;
18364
+ }
18365
+ catch (e) {
18366
+ lastError = e;
18367
+ if (!shouldRetryPostFetchError(lastError, attempt)) {
18368
+ throw createNetworkError(createBrowserAuthError(window.navigator.onLine !== false
18369
+ ? postRequestFailed
18370
+ : noNetworkConnectivity, correlationId || ""), undefined, undefined, lastError);
18371
+ }
18372
+ // Brief backoff before retry
18373
+ await new Promise((resolve) => setTimeout(resolve, RETRY_DELAY_MS));
18374
+ if (correlationId) {
18375
+ performanceClient?.incrementFields({ fetchRetryCount: 1 }, correlationId);
18376
+ }
18377
+ }
18295
18378
  }
18296
- catch (e) {
18297
- throw createNetworkError(createBrowserAuthError(window.navigator.onLine
18379
+ if (!response) {
18380
+ throw createNetworkError(createBrowserAuthError(window.navigator.onLine !== false
18298
18381
  ? postRequestFailed
18299
- : noNetworkConnectivity, ""), undefined, undefined, e);
18382
+ : noNetworkConnectivity, correlationId || ""), undefined, undefined, lastError);
18300
18383
  }
18384
+ let responseStatus = 0;
18385
+ let responseHeaders = {};
18301
18386
  responseHeaders = getHeaderDict(response.headers);
18302
18387
  try {
18303
18388
  responseStatus = response.status;
@@ -18308,10 +18393,15 @@
18308
18393
  };
18309
18394
  }
18310
18395
  catch (e) {
18311
- throw createNetworkError(createBrowserAuthError(failedToParseResponse, ""), responseStatus, responseHeaders, e);
18396
+ throw createNetworkError(createBrowserAuthError(failedToParseResponse, correlationId || ""), responseStatus, responseHeaders, e);
18312
18397
  }
18313
18398
  }
18314
18399
  }
18400
+ function shouldRetryPostFetchError(error, attempt) {
18401
+ return (attempt <= MAX_FETCH_POST_RETRIES &&
18402
+ window.navigator.onLine !== false &&
18403
+ error.name !== "AbortError");
18404
+ }
18315
18405
  /**
18316
18406
  * Get Fetch API Headers object from string map
18317
18407
  * @param inputHeaders
@@ -18797,7 +18887,7 @@
18797
18887
  }
18798
18888
  initializePlatformDOMRequest(request) {
18799
18889
  this.logger.trace(`'${this.platformAuthType}' - initializeNativeDOMRequest called`, request.correlationId);
18800
- const { accountId, clientId, authority, scope, redirectUri, correlationId, state, storeInCache, embeddedClientId, extraParameters, ...remainingProperties } = request;
18890
+ const { accountId, clientId, authority, scope, redirectUri, correlationId, state, extraParameters, ...remainingProperties } = request;
18801
18891
  const validExtraParameters = this.getDOMExtraParams(remainingProperties, correlationId);
18802
18892
  const platformDOMRequest = {
18803
18893
  accountId: accountId,
@@ -18813,8 +18903,6 @@
18813
18903
  redirectUri: redirectUri,
18814
18904
  scope: scope,
18815
18905
  state: state,
18816
- storeInCache: storeInCache,
18817
- embeddedClientId: embeddedClientId,
18818
18906
  };
18819
18907
  return platformDOMRequest;
18820
18908
  }
@@ -20569,6 +20657,7 @@
20569
20657
  this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START, correlationId, InteractionType.Redirect);
20570
20658
  rootMeasurement = this.performanceClient.startMeasurement(AcquireTokenRedirect, correlationId);
20571
20659
  this.logger.trace("handleRedirectPromise - acquiring token from native platform", correlationId);
20660
+ // Cached nativeAccountId routes directly to the broker (no /authorize call)
20572
20661
  rootMeasurement.add({
20573
20662
  isPlatformBrokerRequest: true,
20574
20663
  });
@@ -20605,6 +20694,7 @@
20605
20694
  }
20606
20695
  rootMeasurement.end({
20607
20696
  success: true,
20697
+ isNativeBroker: result.fromPlatformBroker ?? false,
20608
20698
  }, undefined, result.account);
20609
20699
  // Fire-and-forget SSO capability verification in background
20610
20700
  this.verifySsoCapability(cachedRedirectRequest, InteractionType.Redirect);
@@ -20614,8 +20704,8 @@
20614
20704
  * Instrument an event only if an error code is set. Otherwise, discard it when the redirect response
20615
20705
  * is empty and the error code is missing.
20616
20706
  */
20617
- if (rootMeasurement.event.errorCode) {
20618
- rootMeasurement.end({ success: false }, undefined);
20707
+ if (!!rootMeasurement.event.errorCode) {
20708
+ rootMeasurement.end({ success: false });
20619
20709
  }
20620
20710
  else {
20621
20711
  rootMeasurement.discard();
@@ -20674,10 +20764,6 @@
20674
20764
  this.canUsePlatformBroker(request)) {
20675
20765
  const nativeClient = new PlatformAuthInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenRedirect, this.performanceClient, this.platformAuthProvider, this.getNativeAccountId(request), this.nativeInternalStorage, correlationId);
20676
20766
  result = invokeAsync(nativeClient.acquireTokenRedirect.bind(nativeClient), NativeInteractionClientAcquireTokenRedirect, this.logger, this.performanceClient, correlationId)(request, atrMeasurement).catch((e) => {
20677
- atrMeasurement.add({
20678
- brokerErrorName: e.name,
20679
- brokerErrorCode: e.errorCode,
20680
- });
20681
20767
  if (e instanceof NativeAuthError &&
20682
20768
  isFatalNativeAuthError(e)) {
20683
20769
  this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt platform broker calls
@@ -20746,6 +20832,7 @@
20746
20832
  let result;
20747
20833
  const pkce = this.getPreGeneratedPkceCodes(correlationId);
20748
20834
  if (this.canUsePlatformBroker(request)) {
20835
+ // Cached nativeAccountId routes directly to the broker (no /authorize call)
20749
20836
  atPopupMeasurement.add({
20750
20837
  isPlatformBrokerRequest: true,
20751
20838
  });
@@ -20756,15 +20843,11 @@
20756
20843
  .then((response) => {
20757
20844
  atPopupMeasurement.end({
20758
20845
  success: true,
20759
- isNativeBroker: true,
20846
+ isNativeBroker: response.fromPlatformBroker ?? false,
20760
20847
  }, undefined, response.account);
20761
20848
  return response;
20762
20849
  })
20763
20850
  .catch((e) => {
20764
- atPopupMeasurement.add({
20765
- brokerErrorName: e.name,
20766
- brokerErrorCode: e.errorCode,
20767
- });
20768
20851
  if (e instanceof NativeAuthError &&
20769
20852
  isFatalNativeAuthError(e)) {
20770
20853
  this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt platform broker calls
@@ -20795,6 +20878,7 @@
20795
20878
  }
20796
20879
  atPopupMeasurement.end({
20797
20880
  success: true,
20881
+ isNativeBroker: result.fromPlatformBroker ?? false,
20798
20882
  accessTokenSize: result.accessToken.length,
20799
20883
  idTokenSize: result.idToken.length,
20800
20884
  }, undefined, result.account);
@@ -20988,14 +21072,11 @@
20988
21072
  this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, correlationId, InteractionType.Silent, validRequest);
20989
21073
  let result;
20990
21074
  if (this.canUsePlatformBroker(validRequest)) {
21075
+ // Cached nativeAccountId routes directly to the broker (no /authorize call)
20991
21076
  this.ssoSilentMeasurement?.add({
20992
21077
  isPlatformBrokerRequest: true,
20993
21078
  });
20994
21079
  result = this.acquireTokenNative(validRequest, ApiId.ssoSilent).catch((e) => {
20995
- this.ssoSilentMeasurement?.add({
20996
- brokerErrorName: e.name,
20997
- brokerErrorCode: e.errorCode,
20998
- });
20999
21080
  // If native token acquisition fails for availability reasons fallback to standard flow
21000
21081
  if (e instanceof NativeAuthError && isFatalNativeAuthError(e)) {
21001
21082
  this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt platform broker calls
@@ -21018,7 +21099,7 @@
21018
21099
  }
21019
21100
  this.ssoSilentMeasurement?.end({
21020
21101
  success: true,
21021
- isNativeBroker: response.fromPlatformBroker,
21102
+ isNativeBroker: response.fromPlatformBroker ?? false,
21022
21103
  accessTokenSize: response.accessToken.length,
21023
21104
  idTokenSize: response.idToken.length,
21024
21105
  }, undefined, response.account);
@@ -21071,6 +21152,7 @@
21071
21152
  this.hybridAuthCodeResponses.delete(hybridAuthCode);
21072
21153
  atbcMeasurement.end({
21073
21154
  success: true,
21155
+ isNativeBroker: false,
21074
21156
  accessTokenSize: result.accessToken.length,
21075
21157
  idTokenSize: result.idToken.length,
21076
21158
  }, undefined, result.account);
@@ -21101,10 +21183,6 @@
21101
21183
  ...request,
21102
21184
  correlationId,
21103
21185
  }, ApiId.acquireTokenByCode, request.nativeAccountId).catch((e) => {
21104
- atbcMeasurement.add({
21105
- brokerErrorName: e.name,
21106
- brokerErrorCode: e.errorCode,
21107
- });
21108
21186
  // If native token acquisition fails for availability reasons fallback to standard flow
21109
21187
  if (e instanceof NativeAuthError &&
21110
21188
  isFatalNativeAuthError(e)) {
@@ -21114,6 +21192,7 @@
21114
21192
  });
21115
21193
  atbcMeasurement.end({
21116
21194
  success: true,
21195
+ isNativeBroker: result.fromPlatformBroker ?? false,
21117
21196
  }, undefined, result.account);
21118
21197
  return result;
21119
21198
  }
@@ -21154,6 +21233,7 @@
21154
21233
  .then((response) => {
21155
21234
  this.acquireTokenByCodeAsyncMeasurement?.end({
21156
21235
  success: true,
21236
+ isNativeBroker: false,
21157
21237
  fromCache: response.fromCache,
21158
21238
  });
21159
21239
  return response;
@@ -21331,8 +21411,16 @@
21331
21411
  /**
21332
21412
  * Acquire a token from native device (e.g. WAM)
21333
21413
  * @param request
21414
+ * @param apiId
21415
+ * @param accountId
21416
+ * @param cacheLookupPolicy
21334
21417
  */
21335
21418
  async acquireTokenNative(request, apiId, accountId, cacheLookupPolicy) {
21419
+ /*
21420
+ * Callers always normalize correlationId onto the request before delegating
21421
+ * here, so it is guaranteed defined and is the single id used to key this
21422
+ * flow's telemetry.
21423
+ */
21336
21424
  const correlationId = this.getRequestCorrelationId(request);
21337
21425
  this.logger.trace("acquireTokenNative called", correlationId);
21338
21426
  if (!this.platformAuthProvider) {
@@ -21586,6 +21674,7 @@
21586
21674
  .then((result) => {
21587
21675
  atsMeasurement.end({
21588
21676
  success: true,
21677
+ isNativeBroker: result.fromPlatformBroker ?? false,
21589
21678
  fromCache: result.fromCache,
21590
21679
  accessTokenSize: result.accessToken.length,
21591
21680
  idTokenSize: result.idToken.length,
@@ -21722,7 +21811,7 @@
21722
21811
  if (request.correlationId) {
21723
21812
  this.performanceClient.addFields({
21724
21813
  fromCache: response.fromCache,
21725
- isNativeBroker: response.fromPlatformBroker,
21814
+ isNativeBroker: response.fromPlatformBroker ?? false,
21726
21815
  }, request.correlationId);
21727
21816
  }
21728
21817
  return response;
@@ -21748,10 +21837,6 @@
21748
21837
  this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform", silentRequest.correlationId);
21749
21838
  this.performanceClient.addFields({ isPlatformBrokerRequest: true }, silentRequest.correlationId);
21750
21839
  return this.acquireTokenNative(silentRequest, ApiId.acquireTokenSilent_silentFlow, silentRequest.account.nativeAccountId, cacheLookupPolicy).catch(async (e) => {
21751
- this.performanceClient.addFields({
21752
- brokerErrorName: e.name,
21753
- brokerErrorCode: e.errorCode,
21754
- }, silentRequest.correlationId);
21755
21840
  // If native token acquisition fails for availability reasons fallback to web flow
21756
21841
  if (e instanceof NativeAuthError && isFatalNativeAuthError(e)) {
21757
21842
  this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow", silentRequest.correlationId);