@azure/msal-browser 5.19.0 → 5.21.0

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 (267) 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 +1 -1
  5. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
  6. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
  7. package/dist/cache/AccountManager.mjs +1 -1
  8. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  9. package/dist/cache/BrowserCacheManager.mjs +6 -6
  10. package/dist/cache/BrowserCacheManager.mjs.map +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 +15 -5
  17. package/dist/cache/LocalStorage.mjs.map +1 -1
  18. package/dist/cache/MemoryStorage.mjs +1 -1
  19. package/dist/cache/SessionStorage.mjs +1 -1
  20. package/dist/cache/TokenCache.mjs +3 -2
  21. package/dist/cache/TokenCache.mjs.map +1 -1
  22. package/dist/config/Configuration.mjs +1 -1
  23. package/dist/controllers/NestedAppAuthController.mjs +8 -4
  24. package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
  25. package/dist/controllers/StandardController.mjs +4 -4
  26. package/dist/controllers/StandardController.mjs.map +1 -1
  27. package/dist/crypto/BrowserCrypto.mjs +1 -1
  28. package/dist/crypto/CryptoOps.mjs +1 -1
  29. package/dist/crypto/PkceGenerator.mjs +1 -1
  30. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  31. package/dist/crypto/TokenBindingKeyManager.mjs +1 -1
  32. package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
  33. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
  34. package/dist/custom_auth/controller/CustomAuthStandardController.mjs +1 -1
  35. package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
  36. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  37. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  38. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  39. package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
  40. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
  41. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
  42. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
  43. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
  44. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
  45. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
  46. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
  47. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
  48. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
  49. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
  50. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
  51. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
  52. package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
  53. package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
  54. package/dist/custom_auth/core/error/HttpError.mjs +1 -1
  55. package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  56. package/dist/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
  57. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  58. package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  59. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  60. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  61. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  62. package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  63. package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  64. package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
  65. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  66. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  67. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  68. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  69. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  70. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
  71. package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
  72. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
  73. package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
  74. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  75. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  76. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  77. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
  78. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  79. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  80. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  81. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  82. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  83. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  84. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  85. package/dist/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
  86. package/dist/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
  87. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
  88. package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
  89. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  90. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  91. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  92. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  93. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  94. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  95. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  96. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  97. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
  98. package/dist/custom_auth/index.mjs +1 -1
  99. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  100. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  101. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  102. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  103. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  104. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  105. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  106. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  107. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  108. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  109. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  110. package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
  111. package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  112. package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  113. package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  114. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
  115. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
  116. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
  117. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  118. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  119. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  120. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  121. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  122. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  123. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
  124. package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  125. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  126. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  127. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  128. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  129. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  130. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  131. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  132. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  133. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  134. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  135. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  136. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  137. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  138. package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  139. package/dist/encode/Base64Decode.mjs +1 -1
  140. package/dist/encode/Base64Encode.mjs +1 -1
  141. package/dist/error/BrowserAuthError.mjs +1 -1
  142. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  143. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  144. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  145. package/dist/error/NativeAuthError.mjs +1 -1
  146. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  147. package/dist/error/NestedAppAuthError.mjs +1 -1
  148. package/dist/event/EventHandler.mjs +1 -1
  149. package/dist/event/EventMessage.mjs +1 -1
  150. package/dist/event/EventType.mjs +1 -1
  151. package/dist/index.mjs +1 -1
  152. package/dist/index.mjs.map +1 -1
  153. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  154. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  155. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +1 -1
  156. package/dist/interaction_client/PopupClient.mjs +7 -3
  157. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  158. package/dist/interaction_client/RedirectClient.mjs +6 -1
  159. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  160. package/dist/interaction_client/SilentAuthCodeClient.mjs +4 -1
  161. package/dist/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
  162. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  163. package/dist/interaction_client/SilentIframeClient.mjs +6 -3
  164. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  165. package/dist/interaction_client/SilentRefreshClient.mjs +4 -2
  166. package/dist/interaction_client/SilentRefreshClient.mjs.map +1 -1
  167. package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
  168. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  169. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  170. package/dist/log-strings-mapping.json +2 -2
  171. package/dist/naa/BridgeError.mjs +1 -1
  172. package/dist/naa/BridgeProxy.mjs +1 -1
  173. package/dist/naa/BridgeStatusCode.mjs +1 -1
  174. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  175. package/dist/navigation/NavigationClient.mjs +1 -1
  176. package/dist/network/FetchClient.mjs +1 -1
  177. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  178. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  179. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  180. package/dist/packageMetadata.mjs +2 -2
  181. package/dist/popup_relay/constants.mjs +1 -1
  182. package/dist/popup_relay/index.mjs +151 -14
  183. package/dist/popup_relay/index.mjs.map +1 -1
  184. package/dist/popup_relay/relayClient.mjs +1 -1
  185. package/dist/protocol/Authorize.mjs +10 -16
  186. package/dist/protocol/Authorize.mjs.map +1 -1
  187. package/dist/redirect_bridge/index.mjs +1 -1
  188. package/dist/request/RequestHelpers.mjs +63 -10
  189. package/dist/request/RequestHelpers.mjs.map +1 -1
  190. package/dist/response/ResponseHandler.mjs +1 -1
  191. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  192. package/dist/telemetry/BrowserPerformanceEvents.mjs +1 -1
  193. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  194. package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
  195. package/dist/utils/BrowserConstants.mjs +1 -1
  196. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  197. package/dist/utils/BrowserUtils.mjs +1 -1
  198. package/dist/utils/Helpers.mjs +1 -1
  199. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  200. package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
  201. package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
  202. package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
  203. package/lib/custom-auth-path/log-strings-mapping.json +2 -2
  204. package/lib/custom-auth-path/msal-custom-auth.cjs +580 -277
  205. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  206. package/lib/custom-auth-path/msal-custom-auth.js +580 -277
  207. package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
  208. package/lib/log-strings-mapping.json +2 -2
  209. package/lib/msal-browser.cjs +455 -150
  210. package/lib/msal-browser.cjs.map +1 -1
  211. package/lib/msal-browser.js +455 -150
  212. package/lib/msal-browser.js.map +1 -1
  213. package/lib/msal-browser.min.js +2 -2
  214. package/lib/popup-relay/msal-popup-relay.cjs +152 -15
  215. package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
  216. package/lib/popup-relay/msal-popup-relay.js +152 -15
  217. package/lib/popup-relay/msal-popup-relay.js.map +1 -1
  218. package/lib/popup-relay/msal-popup-relay.min.js +2 -2
  219. package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
  220. package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
  221. package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
  222. package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
  223. package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
  224. package/package.json +2 -2
  225. package/src/cache/BrowserCacheManager.ts +12 -4
  226. package/src/cache/LocalStorage.ts +14 -4
  227. package/src/cache/TokenCache.ts +3 -1
  228. package/src/controllers/NestedAppAuthController.ts +10 -2
  229. package/src/controllers/StandardController.ts +8 -3
  230. package/src/controllers/UnknownOperatingContextController.ts +11 -2
  231. package/src/index.ts +1 -0
  232. package/src/interaction_client/PopupClient.ts +19 -2
  233. package/src/interaction_client/RedirectClient.ts +15 -0
  234. package/src/interaction_client/SilentAuthCodeClient.ts +8 -0
  235. package/src/interaction_client/SilentIframeClient.ts +11 -5
  236. package/src/interaction_client/SilentRefreshClient.ts +11 -1
  237. package/src/packageMetadata.ts +1 -1
  238. package/src/popup_relay/index.ts +202 -20
  239. package/src/protocol/Authorize.ts +12 -28
  240. package/src/request/RequestHelpers.ts +109 -15
  241. package/src/webBrokerBridge/adapter/CrossVersionRequestAdapter.ts +186 -0
  242. package/src/webBrokerBridge/index.ts +11 -0
  243. package/types/cache/BrowserCacheManager.d.ts +3 -3
  244. package/types/cache/BrowserCacheManager.d.ts.map +1 -1
  245. package/types/cache/LocalStorage.d.ts.map +1 -1
  246. package/types/cache/TokenCache.d.ts.map +1 -1
  247. package/types/controllers/NestedAppAuthController.d.ts.map +1 -1
  248. package/types/controllers/StandardController.d.ts.map +1 -1
  249. package/types/controllers/UnknownOperatingContextController.d.ts.map +1 -1
  250. package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  251. package/types/index.d.ts +2 -0
  252. package/types/index.d.ts.map +1 -1
  253. package/types/interaction_client/PopupClient.d.ts.map +1 -1
  254. package/types/interaction_client/RedirectClient.d.ts.map +1 -1
  255. package/types/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  256. package/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
  257. package/types/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  258. package/types/packageMetadata.d.ts +1 -1
  259. package/types/popup_relay/index.d.ts +27 -3
  260. package/types/popup_relay/index.d.ts.map +1 -1
  261. package/types/protocol/Authorize.d.ts.map +1 -1
  262. package/types/request/RequestHelpers.d.ts +11 -1
  263. package/types/request/RequestHelpers.d.ts.map +1 -1
  264. package/types/webBrokerBridge/adapter/CrossVersionRequestAdapter.d.ts +66 -0
  265. package/types/webBrokerBridge/adapter/CrossVersionRequestAdapter.d.ts.map +1 -0
  266. package/types/webBrokerBridge/index.d.ts +2 -0
  267. package/types/webBrokerBridge/index.d.ts.map +1 -1
@@ -1,8 +1,8 @@
1
- /*! @azure/msal-browser v5.19.0 2026-08-18 */
1
+ /*! @azure/msal-browser v5.21.0 2026-09-02 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
5
- /*! @azure/msal-common v16.13.0 2026-08-18 */
5
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
6
6
  /*
7
7
  * Copyright (c) Microsoft Corporation. All rights reserved.
8
8
  * Licensed under the MIT License.
@@ -39,6 +39,7 @@ const CLIENT_ASSERTION = "client_assertion";
39
39
  const CLIENT_ASSERTION_TYPE = "client_assertion_type";
40
40
  const TOKEN_TYPE = "token_type";
41
41
  const REQ_CNF = "req_cnf";
42
+ const DPOP_JKT = "dpop_jkt";
42
43
  const RETURN_SPA_CODE = "return_spa_code";
43
44
  const NATIVE_BROKER = "nativebroker";
44
45
  const LOGOUT_HINT = "logout_hint";
@@ -55,7 +56,7 @@ const RESOURCE = "resource";
55
56
  const CLI_DATA = "clidata";
56
57
  const ATTRIBUTE_TOKENS = "attribute_tokens";
57
58
 
58
- /*! @azure/msal-common v16.13.0 2026-08-18 */
59
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
59
60
  /*
60
61
  * Copyright (c) Microsoft Corporation. All rights reserved.
61
62
  * Licensed under the MIT License.
@@ -67,7 +68,6 @@ const DEFAULT_AUTHORITY_HOST = "login.microsoftonline.com";
67
68
  const DEFAULT_COMMON_TENANT = "common";
68
69
  // ADFS String
69
70
  const ADFS = "adfs";
70
- const DSTS = "dstsv2";
71
71
  // Default AAD Instance Discovery Endpoint
72
72
  const AAD_INSTANCE_DISCOVERY_ENDPT = `${DEFAULT_AUTHORITY}discovery/instance?api-version=1.1&authorization_endpoint=`;
73
73
  // CIAM URL
@@ -120,6 +120,7 @@ const OIDC_SCOPES = [...OIDC_DEFAULT_SCOPES, EMAIL_SCOPE];
120
120
  const HeaderNames = {
121
121
  CONTENT_TYPE: "Content-Type",
122
122
  CONTENT_LENGTH: "Content-Length",
123
+ DPOP: "DPoP",
123
124
  RETRY_AFTER: "Retry-After",
124
125
  CCS_HEADER: "X-AnchorMailbox",
125
126
  WWWAuthenticate: "WWW-Authenticate",
@@ -150,6 +151,7 @@ const ClaimsRequestKeys = {
150
151
  ID_TOKEN: "id_token",
151
152
  SIGNIN_STATE: "signin_state",
152
153
  LOGIN_HINT: "login_hint",
154
+ TENANT_REGION_SUB_SCOPE: "tenant_region_sub_scope",
153
155
  };
154
156
  /**
155
157
  * we considered making this "enum" in the request instead of string, however it looks like the allowed list of
@@ -231,6 +233,7 @@ const SERVER_TELEM_UNKNOWN_ERROR = "unknown_error";
231
233
  const AuthenticationScheme = {
232
234
  BEARER: "Bearer",
233
235
  POP: "pop",
236
+ DPOP: "DPoP",
234
237
  SSH: "ssh-cert",
235
238
  };
236
239
  /**
@@ -287,7 +290,7 @@ const JsonWebTokenTypes = {
287
290
  // Token renewal offset default in seconds
288
291
  const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
289
292
 
290
- /*! @azure/msal-common v16.13.0 2026-08-18 */
293
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
291
294
  /*
292
295
  * Copyright (c) Microsoft Corporation. All rights reserved.
293
296
  * Licensed under the MIT License.
@@ -316,7 +319,7 @@ function createAuthError(code, correlationId, additionalMessage) {
316
319
  return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
317
320
  }
318
321
 
319
- /*! @azure/msal-common v16.13.0 2026-08-18 */
322
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
320
323
 
321
324
  /*
322
325
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -339,7 +342,7 @@ function createClientAuthError(errorCode, correlationId, additionalMessage) {
339
342
  return new ClientAuthError(errorCode, correlationId, additionalMessage);
340
343
  }
341
344
 
342
- /*! @azure/msal-common v16.13.0 2026-08-18 */
345
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
343
346
  /*
344
347
  * Copyright (c) Microsoft Corporation. All rights reserved.
345
348
  * Licensed under the MIT License.
@@ -366,6 +369,7 @@ const invalidCacheRecord = "invalid_cache_record";
366
369
  const invalidCacheEnvironment = "invalid_cache_environment";
367
370
  const noAccountFound = "no_account_found";
368
371
  const noCryptoObject = "no_crypto_object";
372
+ const dpopTokenTypeMismatch = "dpop_token_type_mismatch";
369
373
  const tokenRefreshRequired = "token_refresh_required";
370
374
  const tokenClaimsCnfRequiredForSignedJwt = "token_claims_cnf_required_for_signedjwt";
371
375
  const authorizationCodeMissingFromServerResponse = "authorization_code_missing_from_server_response";
@@ -376,7 +380,7 @@ const methodNotImplemented = "method_not_implemented";
376
380
  const resourceParameterRequired = "resource_parameter_required";
377
381
  const misplacedResourceParam = "misplaced_resource_parameter";
378
382
 
379
- /*! @azure/msal-common v16.13.0 2026-08-18 */
383
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
380
384
 
381
385
  /*
382
386
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -414,7 +418,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
414
418
  };
415
419
  }
416
420
 
417
- /*! @azure/msal-common v16.13.0 2026-08-18 */
421
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
418
422
 
419
423
  /*
420
424
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -480,7 +484,7 @@ function getJWSPayload(authToken, correlationId) {
480
484
  return matches[2];
481
485
  }
482
486
 
483
- /*! @azure/msal-common v16.13.0 2026-08-18 */
487
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
484
488
 
485
489
  /*
486
490
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -568,7 +572,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
568
572
  return updatedAccountInfo;
569
573
  }
570
574
 
571
- /*! @azure/msal-common v16.13.0 2026-08-18 */
575
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
572
576
  /*
573
577
  * Copyright (c) Microsoft Corporation. All rights reserved.
574
578
  * Licensed under the MIT License.
@@ -579,11 +583,10 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
579
583
  const AuthorityType = {
580
584
  Default: 0,
581
585
  Adfs: 1,
582
- Dsts: 2,
583
586
  Ciam: 3,
584
587
  };
585
588
 
586
- /*! @azure/msal-common v16.13.0 2026-08-18 */
589
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
587
590
  /*
588
591
  * Copyright (c) Microsoft Corporation. All rights reserved.
589
592
  * Licensed under the MIT License.
@@ -605,7 +608,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
605
608
  return null;
606
609
  }
607
610
 
608
- /*! @azure/msal-common v16.13.0 2026-08-18 */
611
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
609
612
  /*
610
613
  * Copyright (c) Microsoft Corporation. All rights reserved.
611
614
  * Licensed under the MIT License.
@@ -629,7 +632,7 @@ const ProtocolMode = {
629
632
  EAR: "EAR",
630
633
  };
631
634
 
632
- /*! @azure/msal-common v16.13.0 2026-08-18 */
635
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
633
636
  /**
634
637
  * Returns the AccountInfo interface for this account.
635
638
  * @internal
@@ -784,8 +787,8 @@ function createAccountEntityFromAccountInfo(accountInfo, cloudGraphHostName, msG
784
787
  * @param authType
785
788
  */
786
789
  function generateHomeAccountId(serverClientInfo, authType, logger, cryptoObj, correlationId, idTokenClaims) {
787
- // since ADFS/DSTS do not have tid and does not set client_info
788
- if (!(authType === AuthorityType.Adfs || authType === AuthorityType.Dsts)) {
790
+ // ADFS does not have tid and does not set client_info
791
+ if (authType !== AuthorityType.Adfs) {
789
792
  // for cases where there is clientInfo
790
793
  if (serverClientInfo) {
791
794
  try {
@@ -818,7 +821,7 @@ function isAccountEntity(entity) {
818
821
  entity.hasOwnProperty("authorityType"));
819
822
  }
820
823
 
821
- /*! @azure/msal-common v16.13.0 2026-08-18 */
824
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
822
825
  /*
823
826
  * Copyright (c) Microsoft Corporation. All rights reserved.
824
827
  * Licensed under the MIT License.
@@ -828,7 +831,7 @@ function isAccountEntity(entity) {
828
831
  */
829
832
  const unexpectedError = "unexpected_error";
830
833
 
831
- /*! @azure/msal-common v16.13.0 2026-08-18 */
834
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
832
835
 
833
836
  /*
834
837
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -848,7 +851,7 @@ function createClientConfigurationError(errorCode, correlationId) {
848
851
  return new ClientConfigurationError(errorCode, correlationId);
849
852
  }
850
853
 
851
- /*! @azure/msal-common v16.13.0 2026-08-18 */
854
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
852
855
  /*
853
856
  * Copyright (c) Microsoft Corporation. All rights reserved.
854
857
  * Licensed under the MIT License.
@@ -873,9 +876,13 @@ const cannotAllowPlatformBroker = "cannot_allow_platform_broker";
873
876
  const authorityMismatch = "authority_mismatch";
874
877
  const invalidRequestMethodForEAR = "invalid_request_method_for_EAR";
875
878
  const invalidPlatformBrokerConfiguration = "invalid_platform_broker_configuration";
876
- const issuerValidationFailed = "issuer_validation_failed";
879
+ const issuerValidationFailed = "issuer_validation_failed";
880
+ const invalidDpopHtm = "invalid_dpop_htm";
881
+ const invalidDpopHtu = "invalid_dpop_htu";
882
+ const invalidDpopNonce = "invalid_dpop_nonce";
883
+ const dpopMissingResourceContext = "dpop_missing_resource_context";
877
884
 
878
- /*! @azure/msal-common v16.13.0 2026-08-18 */
885
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
879
886
  /*
880
887
  * Copyright (c) Microsoft Corporation. All rights reserved.
881
888
  * Licensed under the MIT License.
@@ -887,7 +894,7 @@ function isOpenIdConfigResponse(response) {
887
894
  response.hasOwnProperty("jwks_uri"));
888
895
  }
889
896
 
890
- /*! @azure/msal-common v16.13.0 2026-08-18 */
897
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
891
898
  /*
892
899
  * Copyright (c) Microsoft Corporation. All rights reserved.
893
900
  * Licensed under the MIT License.
@@ -967,7 +974,7 @@ class StringUtils {
967
974
  }
968
975
  }
969
976
 
970
- /*! @azure/msal-common v16.13.0 2026-08-18 */
977
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
971
978
 
972
979
  /*
973
980
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1125,7 +1132,7 @@ class UrlString {
1125
1132
  }
1126
1133
  }
1127
1134
 
1128
- /*! @azure/msal-common v16.13.0 2026-08-18 */
1135
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
1129
1136
 
1130
1137
  /*
1131
1138
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1208,15 +1215,6 @@ const rawMetdataJSON = {
1208
1215
  preferred_cache: "login.sovcloud-identity.sg",
1209
1216
  aliases: ["login.sovcloud-identity.sg"],
1210
1217
  },
1211
- {
1212
- preferred_network: "login.windows-ppe.net",
1213
- preferred_cache: "login.windows-ppe.net",
1214
- aliases: [
1215
- "login.windows-ppe.net",
1216
- "sts.windows-ppe.net",
1217
- "login.microsoft-ppe.com",
1218
- ],
1219
- },
1220
1218
  ],
1221
1219
  },
1222
1220
  };
@@ -1288,7 +1286,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
1288
1286
  return null;
1289
1287
  }
1290
1288
 
1291
- /*! @azure/msal-common v16.13.0 2026-08-18 */
1289
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
1292
1290
  /*
1293
1291
  * Copyright (c) Microsoft Corporation. All rights reserved.
1294
1292
  * Licensed under the MIT License.
@@ -1297,7 +1295,7 @@ const AzureCloudInstance = {
1297
1295
  // AzureCloudInstance is not specified.
1298
1296
  None: "none"};
1299
1297
 
1300
- /*! @azure/msal-common v16.13.0 2026-08-18 */
1298
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
1301
1299
  /*
1302
1300
  * Copyright (c) Microsoft Corporation. All rights reserved.
1303
1301
  * Licensed under the MIT License.
@@ -1307,7 +1305,7 @@ function isCloudInstanceDiscoveryResponse(response) {
1307
1305
  response.hasOwnProperty("metadata"));
1308
1306
  }
1309
1307
 
1310
- /*! @azure/msal-common v16.13.0 2026-08-18 */
1308
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
1311
1309
  /*
1312
1310
  * Copyright (c) Microsoft Corporation. All rights reserved.
1313
1311
  * Licensed under the MIT License.
@@ -1317,7 +1315,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
1317
1315
  response.hasOwnProperty("error_description"));
1318
1316
  }
1319
1317
 
1320
- /*! @azure/msal-common v16.13.0 2026-08-18 */
1318
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
1321
1319
  /*
1322
1320
  * Copyright (c) Microsoft Corporation. All rights reserved.
1323
1321
  * Licensed under the MIT License.
@@ -1388,7 +1386,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
1388
1386
  const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
1389
1387
  const SetUserData = "setUserData";
1390
1388
 
1391
- /*! @azure/msal-common v16.13.0 2026-08-18 */
1389
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
1392
1390
  /*
1393
1391
  * Copyright (c) Microsoft Corporation. All rights reserved.
1394
1392
  * Licensed under the MIT License.
@@ -1481,7 +1479,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
1481
1479
  };
1482
1480
  };
1483
1481
 
1484
- /*! @azure/msal-common v16.13.0 2026-08-18 */
1482
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
1485
1483
 
1486
1484
  /*
1487
1485
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1592,7 +1590,7 @@ RegionDiscovery.IMDS_OPTIONS = {
1592
1590
  },
1593
1591
  };
1594
1592
 
1595
- /*! @azure/msal-common v16.13.0 2026-08-18 */
1593
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
1596
1594
  /*
1597
1595
  * Copyright (c) Microsoft Corporation. All rights reserved.
1598
1596
  * Licensed under the MIT License.
@@ -1657,7 +1655,7 @@ function wasClockTurnedBack(cachedAt) {
1657
1655
  return cachedAtSec > nowSeconds();
1658
1656
  }
1659
1657
 
1660
- /*! @azure/msal-common v16.13.0 2026-08-18 */
1658
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
1661
1659
 
1662
1660
  /*
1663
1661
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1944,7 +1942,7 @@ function serializeAttributeTokens(attributeTokens) {
1944
1942
  return [...attributeTokens].sort().join(" ");
1945
1943
  }
1946
1944
 
1947
- /*! @azure/msal-common v16.13.0 2026-08-18 */
1945
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
1948
1946
 
1949
1947
  /*
1950
1948
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1988,8 +1986,6 @@ class Authority {
1988
1986
  switch (pathSegments[0].toLowerCase()) {
1989
1987
  case ADFS:
1990
1988
  return AuthorityType.Adfs;
1991
- case DSTS:
1992
- return AuthorityType.Dsts;
1993
1989
  }
1994
1990
  }
1995
1991
  return AuthorityType.Default;
@@ -2914,7 +2910,7 @@ function buildStaticAuthorityOptions(authOptions) {
2914
2910
  };
2915
2911
  }
2916
2912
 
2917
- /*! @azure/msal-common v16.13.0 2026-08-18 */
2913
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
2918
2914
 
2919
2915
  /*
2920
2916
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2948,7 +2944,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
2948
2944
  }
2949
2945
  }
2950
2946
 
2951
- /*! @azure/msal-common v16.13.0 2026-08-18 */
2947
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
2952
2948
 
2953
2949
  /*
2954
2950
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3144,7 +3140,7 @@ class ScopeSet {
3144
3140
  }
3145
3141
  }
3146
3142
 
3147
- /*! @azure/msal-common v16.13.0 2026-08-18 */
3143
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
3148
3144
 
3149
3145
  /*
3150
3146
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3438,11 +3434,15 @@ function addExtraParameters(parameters, extraParams) {
3438
3434
  }
3439
3435
  /**
3440
3436
  * Default optional idToken claims requested on all auth requests.
3441
- * signin_state enables KMSI detection; login_hint enables login hint propagation.
3437
+ * signin_state enables KMSI detection; login_hint enables login hint propagation;
3438
+ * tenant_region_sub_scope identifies the sovereign enclave a tenant belongs to.
3442
3439
  */
3443
3440
  const DEFAULT_ID_TOKEN_CLAIMS = {
3444
3441
  [ClaimsRequestKeys.SIGNIN_STATE]: { essential: false },
3445
3442
  [ClaimsRequestKeys.LOGIN_HINT]: { essential: false },
3443
+ [ClaimsRequestKeys.TENANT_REGION_SUB_SCOPE]: {
3444
+ essential: false,
3445
+ },
3446
3446
  };
3447
3447
  /**
3448
3448
  * Parses a claims JSON string into an object, throwing a ClientConfigurationError
@@ -3501,8 +3501,8 @@ function deepMergeClaims(baseClaims, claimsToMerge) {
3501
3501
  /**
3502
3502
  * Parses claims JSON, optionally deep-merges a second client-originated claims string
3503
3503
  * (`claimsToMerge`, e.g. `claimsFromClient`) with precedence on conflicting keys, merges
3504
- * default optional idToken claims (signin_state, login_hint), and appends client
3505
- * capabilities (xms_cc) to the access_token section.
3504
+ * default optional idToken claims (signin_state, login_hint, tenant_region_sub_scope), and appends client
3505
+ * capabilities (xms_cc) to the access_token section
3506
3506
  * Does not overwrite idToken claims already specified by the caller.
3507
3507
  * @param claims - Existing claims JSON string from the request (may be undefined)
3508
3508
  * @param clientCapabilities - Client capabilities array from configuration
@@ -3626,7 +3626,7 @@ function addAttributeTokens(parameters, attributeTokens) {
3626
3626
  }
3627
3627
  }
3628
3628
 
3629
- /*! @azure/msal-common v16.13.0 2026-08-18 */
3629
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
3630
3630
 
3631
3631
  /*
3632
3632
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3748,7 +3748,7 @@ function validateUrl(url, logger, correlationId) {
3748
3748
  }
3749
3749
  }
3750
3750
 
3751
- /*! @azure/msal-common v16.13.0 2026-08-18 */
3751
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
3752
3752
 
3753
3753
  /*
3754
3754
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3796,7 +3796,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
3796
3796
  },
3797
3797
  };
3798
3798
 
3799
- /*! @azure/msal-common v16.13.0 2026-08-18 */
3799
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
3800
3800
 
3801
3801
  /*
3802
3802
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3819,7 +3819,7 @@ const DEFAULT_TOKEN_BINDING_KEY_MANAGER = {
3819
3819
  },
3820
3820
  };
3821
3821
 
3822
- /*! @azure/msal-common v16.13.0 2026-08-18 */
3822
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
3823
3823
  /*
3824
3824
  * Copyright (c) Microsoft Corporation. All rights reserved.
3825
3825
  * Licensed under the MIT License.
@@ -4094,12 +4094,12 @@ class Logger {
4094
4094
  }
4095
4095
  }
4096
4096
 
4097
- /*! @azure/msal-common v16.13.0 2026-08-18 */
4097
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
4098
4098
  /* eslint-disable header/header */
4099
4099
  const name$1 = "@azure/msal-common";
4100
- const version$1 = "16.13.0";
4100
+ const version$1 = "16.14.0";
4101
4101
 
4102
- /*! @azure/msal-common v16.13.0 2026-08-18 */
4102
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
4103
4103
  /*
4104
4104
  * Copyright (c) Microsoft Corporation. All rights reserved.
4105
4105
  * Licensed under the MIT License.
@@ -4107,7 +4107,7 @@ const version$1 = "16.13.0";
4107
4107
  const cacheQuotaExceeded = "cache_quota_exceeded";
4108
4108
  const cacheErrorUnknown = "cache_error_unknown";
4109
4109
 
4110
- /*! @azure/msal-common v16.13.0 2026-08-18 */
4110
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
4111
4111
 
4112
4112
  /*
4113
4113
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4145,7 +4145,7 @@ function createCacheError(e) {
4145
4145
  }
4146
4146
  }
4147
4147
 
4148
- /*! @azure/msal-common v16.13.0 2026-08-18 */
4148
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
4149
4149
 
4150
4150
  /*
4151
4151
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4156,9 +4156,10 @@ function createCacheError(e) {
4156
4156
  * @internal
4157
4157
  */
4158
4158
  class CacheManager {
4159
- constructor(clientId, cryptoImpl, logger, performanceClient, staticAuthorityOptions) {
4159
+ constructor(clientId, cryptoImpl, logger, performanceClient, staticAuthorityOptions, tokenBindingKeyManager) {
4160
4160
  this.clientId = clientId;
4161
4161
  this.cryptoImpl = cryptoImpl;
4162
+ this.tokenBindingKeyManager = tokenBindingKeyManager;
4162
4163
  this.commonLogger = logger.clone(name$1, version$1);
4163
4164
  this.staticAuthorityOptions = staticAuthorityOptions;
4164
4165
  this.performanceClient = performanceClient;
@@ -4647,19 +4648,24 @@ class CacheManager {
4647
4648
  }
4648
4649
  this.removeItem(key, correlationId);
4649
4650
  this.performanceClient.incrementFields({ accessTokensRemoved: 1 }, correlationId);
4650
- // Remove Token Binding Key from key store for PoP Tokens Credentials
4651
+ // Remove Token Binding Key from key store for token-bound access token credentials
4651
4652
  if (credential.credentialType.toLowerCase() ===
4652
4653
  CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) {
4653
- if (credential.tokenType === AuthenticationScheme.POP) {
4654
- const accessTokenWithAuthSchemeEntity = credential;
4655
- const kid = accessTokenWithAuthSchemeEntity.keyId;
4656
- if (kid) {
4657
- void this.cryptoImpl
4658
- .removeTokenBindingKey(kid, correlationId)
4659
- .catch(() => {
4660
- this.commonLogger.error(`0cx291 ${kid}`, correlationId);
4661
- this.performanceClient?.incrementFields({ removeTokenBindingKeyFailure: 1 }, correlationId);
4662
- });
4654
+ const tokenType = credential.tokenType?.toLowerCase();
4655
+ switch (tokenType) {
4656
+ case AuthenticationScheme.POP:
4657
+ case AuthenticationScheme.DPOP.toLowerCase(): {
4658
+ const accessTokenWithAuthSchemeEntity = credential;
4659
+ const kid = accessTokenWithAuthSchemeEntity.keyId;
4660
+ if (kid) {
4661
+ void this.tokenBindingKeyManager
4662
+ .removeTokenBindingKey(kid, correlationId)
4663
+ .catch(() => {
4664
+ this.commonLogger.error("0id34f", correlationId);
4665
+ this.performanceClient?.incrementFields({ removeTokenBindingKeyFailure: 1 }, correlationId);
4666
+ });
4667
+ }
4668
+ break;
4663
4669
  }
4664
4670
  }
4665
4671
  }
@@ -5199,16 +5205,15 @@ class CacheManager {
5199
5205
  }
5200
5206
  switch (normalizedFilterTokenType) {
5201
5207
  case "dpop":
5202
- return this.matchKeyBoundAccessToken(entity, filter, true);
5203
5208
  case AuthenticationScheme.SSH:
5204
- return this.matchKeyBoundAccessToken(entity, filter, false);
5209
+ return this.matchKeyBoundAccessToken(entity, filter);
5205
5210
  default:
5206
5211
  return true;
5207
5212
  }
5208
5213
  }
5209
- matchKeyBoundAccessToken(entity, filter, requireKeyId) {
5214
+ matchKeyBoundAccessToken(entity, filter) {
5210
5215
  if (!filter.keyId) {
5211
- return !requireKeyId;
5216
+ return true;
5212
5217
  }
5213
5218
  return this.matchKeyId(entity, filter.keyId);
5214
5219
  }
@@ -5327,7 +5332,7 @@ class DefaultStorageClass extends CacheManager {
5327
5332
  }
5328
5333
  }
5329
5334
 
5330
- /*! @azure/msal-common v16.13.0 2026-08-18 */
5335
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
5331
5336
  /*
5332
5337
  * Copyright (c) Microsoft Corporation. All rights reserved.
5333
5338
  * Licensed under the MIT License.
@@ -5341,7 +5346,7 @@ class DefaultStorageClass extends CacheManager {
5341
5346
  const PerformanceEventStatus = {
5342
5347
  InProgress: 1};
5343
5348
 
5344
- /*! @azure/msal-common v16.13.0 2026-08-18 */
5349
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
5345
5350
 
5346
5351
  /*
5347
5352
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5399,7 +5404,7 @@ class StubPerformanceClient {
5399
5404
  }
5400
5405
  }
5401
5406
 
5402
- /*! @azure/msal-common v16.13.0 2026-08-18 */
5407
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
5403
5408
 
5404
5409
  /*
5405
5410
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5458,15 +5463,16 @@ function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions:
5458
5463
  ...DEFAULT_LOGGER_IMPLEMENTATION,
5459
5464
  ...userLoggerOption,
5460
5465
  };
5466
+ const resolvedTokenBindingKeyManager = tokenBindingKeyManager || DEFAULT_TOKEN_BINDING_KEY_MANAGER;
5461
5467
  return {
5462
5468
  authOptions: buildAuthOptions(userAuthOptions),
5463
5469
  systemOptions: { ...DEFAULT_SYSTEM_OPTIONS, ...userSystemOptions },
5464
5470
  loggerOptions: loggerOptions,
5465
5471
  storageInterface: storageImplementation ||
5466
- new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions, name$1, version$1), new StubPerformanceClient()),
5472
+ new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions, name$1, version$1), new StubPerformanceClient(), undefined, resolvedTokenBindingKeyManager),
5467
5473
  networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,
5468
5474
  cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION,
5469
- tokenBindingKeyManager: tokenBindingKeyManager || DEFAULT_TOKEN_BINDING_KEY_MANAGER,
5475
+ tokenBindingKeyManager: resolvedTokenBindingKeyManager,
5470
5476
  clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS,
5471
5477
  libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo },
5472
5478
  telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry },
@@ -5496,7 +5502,7 @@ function isOidcProtocolMode(config) {
5496
5502
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
5497
5503
  }
5498
5504
 
5499
- /*! @azure/msal-common v16.13.0 2026-08-18 */
5505
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
5500
5506
  /*
5501
5507
  * Copyright (c) Microsoft Corporation. All rights reserved.
5502
5508
  * Licensed under the MIT License.
@@ -5523,7 +5529,7 @@ function isOidcProtocolMode(config) {
5523
5529
  }
5524
5530
  }
5525
5531
 
5526
- /*! @azure/msal-common v16.13.0 2026-08-18 */
5532
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
5527
5533
 
5528
5534
  /*
5529
5535
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5544,7 +5550,7 @@ function createJoseHeaderError(code, correlationId) {
5544
5550
  return new JoseHeaderError(code, correlationId);
5545
5551
  }
5546
5552
 
5547
- /*! @azure/msal-common v16.13.0 2026-08-18 */
5553
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
5548
5554
  /*
5549
5555
  * Copyright (c) Microsoft Corporation. All rights reserved.
5550
5556
  * Licensed under the MIT License.
@@ -5569,7 +5575,7 @@ function isPlainObject(value) {
5569
5575
  return Object.getPrototypeOf(value) === proto;
5570
5576
  }
5571
5577
 
5572
- /*! @azure/msal-common v16.13.0 2026-08-18 */
5578
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
5573
5579
  /*
5574
5580
  * Copyright (c) Microsoft Corporation. All rights reserved.
5575
5581
  * Licensed under the MIT License.
@@ -5579,7 +5585,7 @@ const missingAlgError = "missing_alg_error";
5579
5585
  const missingJwkError = "missing_jwk_error";
5580
5586
  const invalidJwkError = "invalid_jwk_error";
5581
5587
 
5582
- /*! @azure/msal-common v16.13.0 2026-08-18 */
5588
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
5583
5589
 
5584
5590
  /*
5585
5591
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5645,7 +5651,7 @@ class JoseHeader {
5645
5651
  }
5646
5652
  }
5647
5653
 
5648
- /*! @azure/msal-common v16.13.0 2026-08-18 */
5654
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
5649
5655
 
5650
5656
  /*
5651
5657
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5746,7 +5752,152 @@ class PopTokenGenerator {
5746
5752
  }
5747
5753
  }
5748
5754
 
5749
- /*! @azure/msal-common v16.13.0 2026-08-18 */
5755
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
5756
+
5757
+ /*
5758
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5759
+ * Licensed under the MIT License.
5760
+ */
5761
+ const DPOP_HTM_REGEX = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
5762
+ const DPOP_TOKEN_BINDING_KEY_TYPE = "dpop";
5763
+ const DPOP_JWT_HEADER_ALGORITHM = JsonWebTokenAlgorithms.ES256;
5764
+ function buildProofHeader(publicJwk, correlationId) {
5765
+ return JoseHeader.getDpopHeader({
5766
+ alg: DPOP_JWT_HEADER_ALGORITHM,
5767
+ jwk: publicJwk,
5768
+ }, correlationId);
5769
+ }
5770
+ function normalizeHtm(htm, correlationId) {
5771
+ if (typeof htm !== "string" || !DPOP_HTM_REGEX.test(htm)) {
5772
+ throw createClientConfigurationError(invalidDpopHtm, correlationId);
5773
+ }
5774
+ return htm.toUpperCase();
5775
+ }
5776
+ /**
5777
+ * Normalizes a URL for use as the DPoP htu claim.
5778
+ * Per RFC 9449 §4.2, htu is the target URI without query and fragment components.
5779
+ * WHATWG URL serialization handles RFC 3986 syntax- and scheme-based normalization
5780
+ * such as lowercasing scheme/host and eliding default ports.
5781
+ */
5782
+ function normalizeHtu(url, correlationId) {
5783
+ let parsedUrl;
5784
+ try {
5785
+ parsedUrl = new URL(url);
5786
+ }
5787
+ catch {
5788
+ throw createClientConfigurationError(urlParseError, correlationId);
5789
+ }
5790
+ if (!/^https:\/\//i.test(url) ||
5791
+ parsedUrl.protocol !== "https:" ||
5792
+ parsedUrl.username ||
5793
+ parsedUrl.password) {
5794
+ throw createClientConfigurationError(invalidDpopHtu, correlationId);
5795
+ }
5796
+ parsedUrl.search = "";
5797
+ parsedUrl.hash = "";
5798
+ return parsedUrl.href;
5799
+ }
5800
+ function validateDpopNonce(nonce, correlationId) {
5801
+ if (nonce !== undefined && nonce.trim().length === 0) {
5802
+ throw createClientConfigurationError(invalidDpopNonce, correlationId);
5803
+ }
5804
+ }
5805
+ /**
5806
+ * Builds RFC 9449 DPoP proof JWT payloads for token-endpoint and
5807
+ * resource-endpoint proof bindings.
5808
+ *
5809
+ * Not exported from any public package entry point.
5810
+ * This helper is internal-only until DPoP is wired into acquisition flows
5811
+ * in a subsequent work item.
5812
+ *
5813
+ * DPoP proofs do not contain SHR fields (at, ts, m, u, p, q).
5814
+ * @internal
5815
+ */
5816
+ class DpopProofGenerator {
5817
+ constructor(cryptoUtils, tokenBindingKeyManager) {
5818
+ this.cryptoUtils = cryptoUtils;
5819
+ this.tokenBindingKeyManager = tokenBindingKeyManager;
5820
+ }
5821
+ /**
5822
+ * Provisions a fresh DPoP key and returns the RFC 7638 JWK thumbprint used
5823
+ * as `dpop_jkt`.
5824
+ */
5825
+ async generateJkt(correlationId = "") {
5826
+ return this.tokenBindingKeyManager.provisionTokenBindingKey({
5827
+ tokenBindingKeyType: DPOP_TOKEN_BINDING_KEY_TYPE,
5828
+ tokenBindingKeyAlgorithm: DPOP_JWT_HEADER_ALGORITHM,
5829
+ correlationId,
5830
+ });
5831
+ }
5832
+ /**
5833
+ * Builds RFC 9449 claims for a token-endpoint DPoP proof.
5834
+ * - htm is always "POST" because token endpoint requests use HTTP POST (RFC 9449 §5).
5835
+ * - htu is the normalized token endpoint URI (query and fragment stripped).
5836
+ * - jti is a fresh CSPRNG-backed unique identifier for every proof.
5837
+ */
5838
+ buildTokenProofClaims(params, correlationId = "") {
5839
+ validateDpopNonce(params.nonce, correlationId);
5840
+ const claims = {
5841
+ jti: this.cryptoUtils.createNewGuid(),
5842
+ htm: "POST",
5843
+ htu: normalizeHtu(params.tokenEndpoint, correlationId),
5844
+ iat: nowSeconds(),
5845
+ };
5846
+ if (params.nonce !== undefined) {
5847
+ claims.nonce = params.nonce;
5848
+ }
5849
+ return claims;
5850
+ }
5851
+ /**
5852
+ * Builds and signs a compact DPoP proof JWT for a token-endpoint request.
5853
+ */
5854
+ async generateTokenProof(params, keyId, correlationId = "") {
5855
+ return this.generateProof(this.buildTokenProofClaims(params, correlationId), keyId, correlationId);
5856
+ }
5857
+ /**
5858
+ * Builds RFC 9449 claims for a resource-endpoint DPoP proof.
5859
+ * - htm is uppercased per RFC 9449 §4.2.
5860
+ * - htu is the normalized resource URI (query and fragment stripped).
5861
+ * - ath is the base64url-encoded SHA-256 hash of the ASCII access token.
5862
+ * - jti is a fresh CSPRNG-backed unique identifier for every proof.
5863
+ */
5864
+ buildResourceProofClaims(params, correlationId = "") {
5865
+ validateDpopNonce(params.nonce, correlationId);
5866
+ const claims = {
5867
+ jti: this.cryptoUtils.createNewGuid(),
5868
+ htm: normalizeHtm(params.htm, correlationId),
5869
+ htu: normalizeHtu(params.htu, correlationId),
5870
+ ath: params.ath,
5871
+ iat: nowSeconds(),
5872
+ };
5873
+ if (params.nonce !== undefined) {
5874
+ claims.nonce = params.nonce;
5875
+ }
5876
+ return claims;
5877
+ }
5878
+ /**
5879
+ * Builds and signs a compact DPoP proof JWT for a resource request.
5880
+ */
5881
+ async generateResourceProof(params, keyId, correlationId = "") {
5882
+ const { htu, htm, nonce } = params;
5883
+ if (!htu || !htm) {
5884
+ throw createClientConfigurationError(dpopMissingResourceContext, correlationId);
5885
+ }
5886
+ const ath = await this.cryptoUtils.hashString(params.accessToken);
5887
+ return this.generateProof(this.buildResourceProofClaims({
5888
+ htu,
5889
+ htm,
5890
+ ath,
5891
+ nonce,
5892
+ }, correlationId), keyId, correlationId);
5893
+ }
5894
+ async generateProof(claims, keyId, correlationId) {
5895
+ const publicJwk = await this.tokenBindingKeyManager.getTokenBindingPublicKeyJwk(keyId, correlationId);
5896
+ return this.cryptoUtils.signTokenBindingJwt(buildProofHeader(publicJwk, correlationId), claims, keyId, correlationId);
5897
+ }
5898
+ }
5899
+
5900
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
5750
5901
  /*
5751
5902
  * Copyright (c) Microsoft Corporation. All rights reserved.
5752
5903
  * Licensed under the MIT License.
@@ -5797,7 +5948,7 @@ const badToken = "bad_token";
5797
5948
  */
5798
5949
  const interruptedUser = "interrupted_user";
5799
5950
 
5800
- /*! @azure/msal-common v16.13.0 2026-08-18 */
5951
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
5801
5952
 
5802
5953
  /*
5803
5954
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5864,7 +6015,7 @@ function createInteractionRequiredAuthError(errorCode, correlationId, errorMessa
5864
6015
  return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
5865
6016
  }
5866
6017
 
5867
- /*! @azure/msal-common v16.13.0 2026-08-18 */
6018
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
5868
6019
 
5869
6020
  /*
5870
6021
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5883,7 +6034,7 @@ class ServerError extends AuthError {
5883
6034
  }
5884
6035
  }
5885
6036
 
5886
- /*! @azure/msal-common v16.13.0 2026-08-18 */
6037
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
5887
6038
 
5888
6039
  /*
5889
6040
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5954,7 +6105,7 @@ function parseRequestState(base64Decode, state, correlationId) {
5954
6105
  }
5955
6106
  }
5956
6107
 
5957
- /*! @azure/msal-common v16.13.0 2026-08-18 */
6108
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
5958
6109
 
5959
6110
  /*
5960
6111
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6043,7 +6194,21 @@ class ResponseHandler {
6043
6194
  }
6044
6195
  // Add keyId from request to serverTokenResponse if defined
6045
6196
  serverTokenResponse.key_id =
6046
- serverTokenResponse.key_id || request.sshKid || undefined;
6197
+ serverTokenResponse.key_id ||
6198
+ request.dpopJkt ||
6199
+ request.sshKid ||
6200
+ undefined;
6201
+ if (request.authenticationScheme === AuthenticationScheme.DPOP) {
6202
+ if (serverTokenResponse.token_type?.toLowerCase() !==
6203
+ AuthenticationScheme.DPOP.toLowerCase()) {
6204
+ this.performanceClient?.addFields({
6205
+ dpopTokenTypeMismatch: serverTokenResponse.token_type,
6206
+ }, request.correlationId);
6207
+ throw createClientAuthError(dpopTokenTypeMismatch, request.correlationId);
6208
+ }
6209
+ serverTokenResponse.token_type =
6210
+ AuthenticationScheme.DPOP;
6211
+ }
6047
6212
  // Compute components once for entity storage (fallback if hash not provided by client)
6048
6213
  const attributeTokenPartition = serializeAttributeTokens(request.attributeTokens);
6049
6214
  const cacheKeyComponents = additionalCacheKeyComponents ??
@@ -6206,7 +6371,9 @@ class ResponseHandler {
6206
6371
  let extExpiresOn;
6207
6372
  let refreshOn;
6208
6373
  let familyId = "";
6374
+ let dpopProof;
6209
6375
  if (cacheRecord.accessToken) {
6376
+ const accessTokenType = cacheRecord.accessToken.tokenType?.toLowerCase();
6210
6377
  /*
6211
6378
  * if the request object has `popKid` property, `signPopToken` will be set to false and
6212
6379
  * the token will be returned unsigned
@@ -6224,6 +6391,18 @@ class ResponseHandler {
6224
6391
  else {
6225
6392
  accessToken = cacheRecord.accessToken.secret;
6226
6393
  }
6394
+ if (accessTokenType ===
6395
+ AuthenticationScheme.DPOP.toLowerCase()) {
6396
+ if (!cacheRecord.accessToken.keyId) {
6397
+ throw createClientAuthError(keyIdMissing, request.correlationId);
6398
+ }
6399
+ const dpopProofGenerator = new DpopProofGenerator(cryptoObj, tokenBindingKeyManager);
6400
+ dpopProof = await dpopProofGenerator.generateResourceProof({
6401
+ htu: request.resourceRequestUri,
6402
+ htm: request.resourceRequestMethod,
6403
+ accessToken: cacheRecord.accessToken.secret,
6404
+ }, cacheRecord.accessToken.keyId, request.correlationId);
6405
+ }
6227
6406
  responseScopes = ScopeSet.fromString(cacheRecord.accessToken.target, request.correlationId).asArray();
6228
6407
  // Access token expiresOn cached in seconds, converting to Date for AuthenticationResult
6229
6408
  expiresOn = toDateFromSeconds(cacheRecord.accessToken.expiresOn);
@@ -6240,6 +6419,15 @@ class ResponseHandler {
6240
6419
  }
6241
6420
  const uid = idTokenClaims?.oid || idTokenClaims?.sub || "";
6242
6421
  const tid = idTokenClaims?.tid || "";
6422
+ /*
6423
+ * Surface the sovereign enclave for telemetry. This runs for both freshly acquired
6424
+ * and cache-served tokens because SilentFlowClient shares this method, so the field
6425
+ * is present on silent requests that never hit the network.
6426
+ */
6427
+ const regionSubScope = idTokenClaims?.tenant_region_sub_scope;
6428
+ if (typeof regionSubScope === "string") {
6429
+ performanceClient?.addFields({ regionSubScope }, request.correlationId);
6430
+ }
6243
6431
  // for hybrid + native bridge enablement, send back the native account Id
6244
6432
  if (serverTokenResponse?.spa_accountid && !!cacheRecord.account) {
6245
6433
  // Set on deprecated top-level for downgrade compat
@@ -6268,6 +6456,7 @@ class ResponseHandler {
6268
6456
  idToken: cacheRecord?.idToken?.secret || "",
6269
6457
  idTokenClaims: idTokenClaims || {},
6270
6458
  accessToken: accessToken,
6459
+ dpopProof,
6271
6460
  fromCache: fromTokenCache,
6272
6461
  expiresOn: expiresOn,
6273
6462
  extExpiresOn: extExpiresOn,
@@ -6275,7 +6464,10 @@ class ResponseHandler {
6275
6464
  correlationId: request.correlationId,
6276
6465
  requestId: requestId || "",
6277
6466
  familyId: familyId,
6278
- tokenType: cacheRecord.accessToken?.tokenType || "",
6467
+ tokenType: cacheRecord.accessToken?.tokenType?.toLowerCase() ===
6468
+ AuthenticationScheme.DPOP.toLowerCase()
6469
+ ? AuthenticationScheme.DPOP
6470
+ : cacheRecord.accessToken?.tokenType || "",
6279
6471
  state: requestState ? requestState.userRequestState : "",
6280
6472
  cloudGraphHostName: cacheRecord.account?.cloudGraphHostName || "",
6281
6473
  msGraphHost: cacheRecord.account?.msGraphHost || "",
@@ -6326,7 +6518,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
6326
6518
  return baseAccount;
6327
6519
  }
6328
6520
 
6329
- /*! @azure/msal-common v16.13.0 2026-08-18 */
6521
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
6330
6522
  /*
6331
6523
  * Copyright (c) Microsoft Corporation. All rights reserved.
6332
6524
  * Licensed under the MIT License.
@@ -6336,7 +6528,7 @@ const CcsCredentialType = {
6336
6528
  UPN: "UPN",
6337
6529
  };
6338
6530
 
6339
- /*! @azure/msal-common v16.13.0 2026-08-18 */
6531
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
6340
6532
  /*
6341
6533
  * Copyright (c) Microsoft Corporation. All rights reserved.
6342
6534
  * Licensed under the MIT License.
@@ -6355,7 +6547,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint, fmiP
6355
6547
  }
6356
6548
  }
6357
6549
 
6358
- /*! @azure/msal-common v16.13.0 2026-08-18 */
6550
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
6359
6551
 
6360
6552
  /*
6361
6553
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6379,7 +6571,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
6379
6571
  };
6380
6572
  }
6381
6573
 
6382
- /*! @azure/msal-common v16.13.0 2026-08-18 */
6574
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
6383
6575
 
6384
6576
  /*
6385
6577
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6465,7 +6657,7 @@ class ThrottlingUtils {
6465
6657
  }
6466
6658
  }
6467
6659
 
6468
- /*! @azure/msal-common v16.13.0 2026-08-18 */
6660
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
6469
6661
 
6470
6662
  /*
6471
6663
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6496,7 +6688,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
6496
6688
  return new NetworkError(error, httpStatus, responseHeaders);
6497
6689
  }
6498
6690
 
6499
- /*! @azure/msal-common v16.13.0 2026-08-18 */
6691
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
6500
6692
 
6501
6693
  /*
6502
6694
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6526,6 +6718,23 @@ function createTokenRequestHeaders(logger, preventCorsPreflight, ccsCred) {
6526
6718
  }
6527
6719
  return headers;
6528
6720
  }
6721
+ /**
6722
+ * Adds the DPoP proof header for token endpoint requests when DPoP is requested.
6723
+ * @internal
6724
+ */
6725
+ async function addDpopTokenProofHeader(headers, request, tokenEndpoint, cryptoUtils, tokenBindingKeyManager) {
6726
+ if (request.authenticationScheme !== AuthenticationScheme.DPOP) {
6727
+ return;
6728
+ }
6729
+ const dpopProofGenerator = new DpopProofGenerator(cryptoUtils, tokenBindingKeyManager);
6730
+ const keyId = request.dpopJkt;
6731
+ if (!keyId?.trim()) {
6732
+ throw createClientAuthError(keyIdMissing, request.correlationId);
6733
+ }
6734
+ headers[HeaderNames.DPOP] = await dpopProofGenerator.generateTokenProof({
6735
+ tokenEndpoint,
6736
+ }, keyId, request.correlationId);
6737
+ }
6529
6738
  /**
6530
6739
  * Creates query string for the /token request
6531
6740
  * @param request
@@ -6612,7 +6821,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
6612
6821
  return response;
6613
6822
  }
6614
6823
 
6615
- /*! @azure/msal-common v16.13.0 2026-08-18 */
6824
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
6616
6825
 
6617
6826
  /*
6618
6827
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6704,6 +6913,7 @@ class AuthorizationCodeClient {
6704
6913
  }
6705
6914
  }
6706
6915
  const headers = createTokenRequestHeaders(this.logger, this.config.systemOptions.preventCorsPreflight, ccsCredential || request.ccsCredential);
6916
+ await addDpopTokenProofHeader(headers, request, endpoint, this.cryptoUtils, this.config.tokenBindingKeyManager);
6707
6917
  const thumbprint = getRequestThumbprint(this.config.authOptions.clientId, request);
6708
6918
  return invokeAsync(executePostToTokenEndpoint, AuthorizationCodeClientExecutePostToTokenEndpoint, this.logger, this.performanceClient, request.correlationId)(endpoint, requestBody, headers, thumbprint, request.correlationId, this.cacheManager, this.networkClient, this.logger, this.performanceClient, serverTelemetryManager);
6709
6919
  }
@@ -6875,7 +7085,7 @@ class AuthorizationCodeClient {
6875
7085
  }
6876
7086
  }
6877
7087
 
6878
- /*! @azure/msal-common v16.13.0 2026-08-18 */
7088
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
6879
7089
 
6880
7090
  /*
6881
7091
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7102,7 +7312,7 @@ function extractLoginHint(account) {
7102
7312
  return account.loginHint || account.idTokenClaims?.login_hint || null;
7103
7313
  }
7104
7314
 
7105
- /*! @azure/msal-common v16.13.0 2026-08-18 */
7315
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
7106
7316
 
7107
7317
  /*
7108
7318
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7213,6 +7423,12 @@ class RefreshTokenClient {
7213
7423
  type: CcsCredentialType.HOME_ACCOUNT_ID,
7214
7424
  },
7215
7425
  };
7426
+ if (refreshTokenRequest.authenticationScheme ===
7427
+ AuthenticationScheme.DPOP &&
7428
+ !refreshTokenRequest.dpopJkt) {
7429
+ const dpopProofGenerator = new DpopProofGenerator(this.cryptoUtils, this.config.tokenBindingKeyManager);
7430
+ refreshTokenRequest.dpopJkt = await dpopProofGenerator.generateJkt(request.correlationId);
7431
+ }
7216
7432
  try {
7217
7433
  return await invokeAsync(this.acquireToken.bind(this), RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest, apiId);
7218
7434
  }
@@ -7238,6 +7454,7 @@ class RefreshTokenClient {
7238
7454
  const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString);
7239
7455
  const requestBody = await invokeAsync(this.createTokenRequestBody.bind(this), RefreshTokenClientCreateTokenRequestBody, this.logger, this.performanceClient, request.correlationId)(request);
7240
7456
  const headers = createTokenRequestHeaders(this.logger, this.config.systemOptions.preventCorsPreflight, request.ccsCredential);
7457
+ await addDpopTokenProofHeader(headers, request, endpoint, this.cryptoUtils, this.config.tokenBindingKeyManager);
7241
7458
  const thumbprint = getRequestThumbprint(this.config.authOptions.clientId, request);
7242
7459
  return invokeAsync(executePostToTokenEndpoint, RefreshTokenClientExecutePostToTokenEndpoint, this.logger, this.performanceClient, request.correlationId)(endpoint, requestBody, headers, thumbprint, request.correlationId, this.cacheManager, this.networkClient, this.logger, this.performanceClient, this.serverTelemetryManager);
7243
7460
  }
@@ -7329,7 +7546,7 @@ class RefreshTokenClient {
7329
7546
  }
7330
7547
  }
7331
7548
 
7332
- /*! @azure/msal-common v16.13.0 2026-08-18 */
7549
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
7333
7550
 
7334
7551
  /*
7335
7552
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7622,7 +7839,7 @@ class StubServerTelemetryManager extends ServerTelemetryManager {
7622
7839
  clearNativeBrokerErrorCode() { }
7623
7840
  }
7624
7841
 
7625
- /*! @azure/msal-common v16.13.0 2026-08-18 */
7842
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
7626
7843
 
7627
7844
  /*
7628
7845
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7691,6 +7908,22 @@ class SilentFlowClient {
7691
7908
  lastCacheOutcome = CacheOutcome.PROACTIVELY_REFRESHED;
7692
7909
  // don't throw ClientAuthError.createRefreshRequiredError(), return cached token instead
7693
7910
  }
7911
+ const cachedAccessTokenType = cachedAccessToken.tokenType?.toLowerCase();
7912
+ if (cachedAccessTokenType === AuthenticationScheme.DPOP.toLowerCase()) {
7913
+ if (!cachedAccessToken.keyId) {
7914
+ this.logger.info("1enswf", request.correlationId);
7915
+ this.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN, request.correlationId);
7916
+ throw createClientAuthError(tokenRefreshRequired, request.correlationId);
7917
+ }
7918
+ try {
7919
+ await this.config.tokenBindingKeyManager.getTokenBindingPublicKeyJwk(cachedAccessToken.keyId, request.correlationId);
7920
+ }
7921
+ catch {
7922
+ this.logger.info("14djth", request.correlationId);
7923
+ this.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN, request.correlationId);
7924
+ throw createClientAuthError(tokenRefreshRequired, request.correlationId);
7925
+ }
7926
+ }
7694
7927
  const environment = request.authority || this.authority.getPreferredCache();
7695
7928
  const cacheRecord = {
7696
7929
  account: this.cacheManager.getAccount(this.cacheManager.generateAccountKey(request.account), request.correlationId),
@@ -7733,7 +7966,7 @@ class SilentFlowClient {
7733
7966
  }
7734
7967
  }
7735
7968
 
7736
- /*! @azure/msal-common v16.13.0 2026-08-18 */
7969
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
7737
7970
 
7738
7971
  /*
7739
7972
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7749,7 +7982,7 @@ const StubbedNetworkModule = {
7749
7982
  },
7750
7983
  };
7751
7984
 
7752
- /*! @azure/msal-common v16.13.0 2026-08-18 */
7985
+ /*! @azure/msal-common v16.14.0 2026-09-02 */
7753
7986
 
7754
7987
  /*
7755
7988
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8177,7 +8410,7 @@ function ensureArgumentIsJSONString(argName, argValue, correlationId) {
8177
8410
 
8178
8411
  /* eslint-disable header/header */
8179
8412
  const name = "@azure/msal-browser";
8180
- const version = "5.19.0";
8413
+ const version = "5.21.0";
8181
8414
 
8182
8415
  /*
8183
8416
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10534,6 +10767,140 @@ async function clearCacheOnLogout(browserStorage, browserCrypto, logger, correla
10534
10767
  }
10535
10768
  }
10536
10769
 
10770
+ /*
10771
+ * Copyright (c) Microsoft Corporation. All rights reserved.
10772
+ * Licensed under the MIT License.
10773
+ */
10774
+ /**
10775
+ * This class implements MSAL's crypto interface, which allows it to perform base64 encoding and decoding, generating cryptographically random GUIDs and
10776
+ * implementing Proof Key for Code Exchange specs for the OAuth Authorization Code Flow using PKCE (rfc here: https://tools.ietf.org/html/rfc7636).
10777
+ */
10778
+ class CryptoOps {
10779
+ constructor(logger, performanceClient, skipValidateSubtleCrypto) {
10780
+ this.logger = logger;
10781
+ // Browser crypto needs to be validated first before any other classes can be set.
10782
+ validateCryptoAvailable(skipValidateSubtleCrypto ?? false);
10783
+ this.performanceClient = performanceClient;
10784
+ this.tokenBindingKeyManager = new TokenBindingKeyManager(this.logger, this.performanceClient);
10785
+ }
10786
+ /**
10787
+ * Creates a new random GUID - used to populate state and nonce.
10788
+ * @returns string (GUID)
10789
+ */
10790
+ createNewGuid() {
10791
+ return createNewGuid();
10792
+ }
10793
+ /**
10794
+ * Encodes input string to base64.
10795
+ * @param input
10796
+ */
10797
+ base64Encode(input) {
10798
+ return base64Encode(input);
10799
+ }
10800
+ /**
10801
+ * Decodes input string from base64.
10802
+ * @param input
10803
+ */
10804
+ base64Decode(input) {
10805
+ return base64Decode(input);
10806
+ }
10807
+ /**
10808
+ * Encodes input string to base64 URL safe string.
10809
+ * @param input
10810
+ */
10811
+ base64UrlEncode(input) {
10812
+ return urlEncode(input);
10813
+ }
10814
+ /**
10815
+ * Stringifies and base64Url encodes input public key
10816
+ * @param inputKid
10817
+ * @returns Base64Url encoded public key
10818
+ */
10819
+ encodeKid(inputKid) {
10820
+ return this.base64UrlEncode(JSON.stringify({ kid: inputKid }));
10821
+ }
10822
+ /**
10823
+ * Removes cryptographic keypair from key store matching the keyId passed in
10824
+ * @param kid
10825
+ * @param correlationId
10826
+ */
10827
+ async removeTokenBindingKey(kid, correlationId) {
10828
+ await this.tokenBindingKeyManager.removeTokenBindingKey(kid, correlationId);
10829
+ }
10830
+ /**
10831
+ * Removes all cryptographic keys from IndexedDB storage
10832
+ * @param correlationId
10833
+ */
10834
+ async clearKeystore(correlationId) {
10835
+ return this.tokenBindingKeyManager.clearKeystore(correlationId);
10836
+ }
10837
+ /** @internal */
10838
+ async signTokenBindingJwt(header, payload, kid, correlationId) {
10839
+ let telemetry = {};
10840
+ const signTokenBindingJwtMeasurement = this.performanceClient?.startMeasurement(CryptoOptsSignJwt, correlationId);
10841
+ try {
10842
+ const cachedKeyPair = await this.tokenBindingKeyManager.getTokenBindingKeyPair(kid, correlationId);
10843
+ await this.validateTokenBindingJwtHeaderKey(header, kid, correlationId);
10844
+ telemetry = this.tokenBindingKeyManager.getTokenBindingKeyTelemetry(cachedKeyPair, header.alg);
10845
+ const signingAlgorithm = this.getTokenBindingKeySigningAlgorithm(cachedKeyPair, header.alg, correlationId);
10846
+ const tokenString = `${urlEncode(JSON.stringify(header))}.${urlEncode(JSON.stringify(payload))}`;
10847
+ const encodedSignature = await this.signInput(cachedKeyPair, tokenString, signingAlgorithm);
10848
+ signTokenBindingJwtMeasurement?.end({
10849
+ success: true,
10850
+ ...telemetry,
10851
+ });
10852
+ return `${tokenString}.${encodedSignature}`;
10853
+ }
10854
+ catch (e) {
10855
+ signTokenBindingJwtMeasurement?.end({
10856
+ success: false,
10857
+ ...telemetry,
10858
+ });
10859
+ throw e;
10860
+ }
10861
+ }
10862
+ /**
10863
+ * Returns the SHA-256 hash of an input string
10864
+ * @param plainText
10865
+ */
10866
+ async hashString(plainText) {
10867
+ return hashString(plainText);
10868
+ }
10869
+ async signInput(cachedKeyPair, signingInput, algorithm) {
10870
+ const encoder = new TextEncoder();
10871
+ const signatureBuffer = await sign(cachedKeyPair.privateKey, encoder.encode(signingInput), algorithm);
10872
+ return urlEncodeArr(new Uint8Array(signatureBuffer));
10873
+ }
10874
+ getTokenBindingKeySigningAlgorithm(cachedKeyPair, requestedAlgorithm, correlationId) {
10875
+ const keyAlgorithm = cachedKeyPair.privateKey.algorithm;
10876
+ if (requestedAlgorithm === JsonWebTokenAlgorithms.RS256 &&
10877
+ keyAlgorithm.name === RSA_SIGN_ALGORITHM_OPTIONS.name) {
10878
+ return RSA_SIGN_ALGORITHM_OPTIONS;
10879
+ }
10880
+ if (requestedAlgorithm === JsonWebTokenAlgorithms.ES256 &&
10881
+ keyAlgorithm.name ===
10882
+ ECDSA_SHA256_SIGN_ALGORITHM_OPTIONS.name &&
10883
+ keyAlgorithm.namedCurve ===
10884
+ ECDSA_P256_KEYGEN_ALGORITHM_OPTIONS.namedCurve) {
10885
+ return ECDSA_SHA256_SIGN_ALGORITHM_OPTIONS;
10886
+ }
10887
+ if (requestedAlgorithm === JsonWebTokenAlgorithms.RS256 ||
10888
+ requestedAlgorithm === JsonWebTokenAlgorithms.ES256) {
10889
+ throw createBrowserAuthError(unsupportedTokenBindingAlgorithm, correlationId, tokenBindingKeyAlgorithmMismatch);
10890
+ }
10891
+ throw createBrowserAuthError(unsupportedTokenBindingAlgorithm, correlationId);
10892
+ }
10893
+ async validateTokenBindingJwtHeaderKey(header, kid, correlationId) {
10894
+ if (!header.jwk) {
10895
+ return;
10896
+ }
10897
+ const headerKeyId = await computeJwkThumbprint(header.jwk, correlationId);
10898
+ if (headerKeyId !== kid) {
10899
+ throw createBrowserAuthError(invalidPublicJwk, correlationId, tokenBindingKeyJwkThumbprintMismatch);
10900
+ }
10901
+ }
10902
+ }
10903
+
10537
10904
  /*
10538
10905
  * Copyright (c) Microsoft Corporation. All rights reserved.
10539
10906
  * Licensed under the MIT License.
@@ -10541,8 +10908,60 @@ async function clearCacheOnLogout(browserStorage, browserCrypto, logger, correla
10541
10908
  const SUPPORTED_AUTHENTICATION_SCHEMES = new Set([
10542
10909
  AuthenticationScheme.BEARER,
10543
10910
  AuthenticationScheme.POP,
10911
+ AuthenticationScheme.DPOP,
10544
10912
  AuthenticationScheme.SSH,
10545
10913
  ]);
10914
+ function validateSshRequest(request, correlationId) {
10915
+ if (!request.sshJwk) {
10916
+ throw createClientConfigurationError(missingSshJwk, correlationId);
10917
+ }
10918
+ if (!request.sshKid) {
10919
+ throw createClientConfigurationError(missingSshKid, correlationId);
10920
+ }
10921
+ }
10922
+ function validateDpopRequest(request, correlationId) {
10923
+ if (!request.resourceRequestMethod?.trim() ||
10924
+ !request.resourceRequestUri?.trim()) {
10925
+ throw createClientConfigurationError(dpopMissingResourceContext, correlationId);
10926
+ }
10927
+ }
10928
+ /**
10929
+ * Resolves the token-binding parameters needed before building authorize or token requests.
10930
+ * Public PCA DPoP requests use a dpopJkt thumbprint, while platform broker PoP requests use
10931
+ * a reqCnf confirmation claim. Requests that do not require request-time token binding return
10932
+ * no additional parameters.
10933
+ */
10934
+ async function getTokenBindingRequestParams(request, tokenBindingKeyManager, logger, performanceClient) {
10935
+ switch (request.authenticationScheme) {
10936
+ case AuthenticationScheme.DPOP:
10937
+ if (request.platformBroker) {
10938
+ return {};
10939
+ }
10940
+ if (request.dpopJkt) {
10941
+ return { dpopJkt: request.dpopJkt };
10942
+ }
10943
+ return {
10944
+ dpopJkt: await tokenBindingKeyManager.provisionTokenBindingKey({
10945
+ tokenBindingKeyType: AuthenticationScheme.DPOP.toLowerCase(),
10946
+ tokenBindingKeyAlgorithm: JsonWebTokenAlgorithms.ES256,
10947
+ correlationId: request.correlationId,
10948
+ }),
10949
+ };
10950
+ case AuthenticationScheme.POP:
10951
+ if (!request.platformBroker) {
10952
+ return {};
10953
+ }
10954
+ const cryptoOps = new CryptoOps(logger, performanceClient);
10955
+ if (request.popKid) {
10956
+ return { reqCnf: cryptoOps.encodeKid(request.popKid) };
10957
+ }
10958
+ const popTokenGenerator = new PopTokenGenerator(cryptoOps, tokenBindingKeyManager, performanceClient);
10959
+ const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PopTokenGenerateCnf, logger, performanceClient, request.correlationId)(request, logger);
10960
+ return { reqCnf: generatedReqCnfData.reqCnfString };
10961
+ default:
10962
+ return {};
10963
+ }
10964
+ }
10546
10965
  /**
10547
10966
  * Initializer function for all request APIs
10548
10967
  * @param request
@@ -10570,13 +10989,13 @@ async function initializeBaseRequest(request, config, performanceClient, logger,
10570
10989
  if (!SUPPORTED_AUTHENTICATION_SCHEMES.has(validatedRequest.authenticationScheme)) {
10571
10990
  throw createClientConfigurationError(unsupportedAuthenticationScheme, correlationId);
10572
10991
  }
10573
- if (validatedRequest.authenticationScheme ===
10574
- AuthenticationScheme.SSH) {
10575
- if (!request.sshJwk) {
10576
- throw createClientConfigurationError(missingSshJwk, correlationId);
10577
- }
10578
- if (!request.sshKid) {
10579
- throw createClientConfigurationError(missingSshKid, correlationId);
10992
+ switch (validatedRequest.authenticationScheme) {
10993
+ case AuthenticationScheme.SSH:
10994
+ validateSshRequest(request, correlationId);
10995
+ break;
10996
+ case AuthenticationScheme.DPOP: {
10997
+ validateDpopRequest(request, correlationId);
10998
+ break;
10580
10999
  }
10581
11000
  }
10582
11001
  logger.verbose(`1ecmns ${validatedRequest.authenticationScheme}`, correlationId);
@@ -14858,140 +15277,6 @@ class ResetPasswordCodeRequiredState extends ResetPasswordState {
14858
15277
  }
14859
15278
  }
14860
15279
 
14861
- /*
14862
- * Copyright (c) Microsoft Corporation. All rights reserved.
14863
- * Licensed under the MIT License.
14864
- */
14865
- /**
14866
- * This class implements MSAL's crypto interface, which allows it to perform base64 encoding and decoding, generating cryptographically random GUIDs and
14867
- * implementing Proof Key for Code Exchange specs for the OAuth Authorization Code Flow using PKCE (rfc here: https://tools.ietf.org/html/rfc7636).
14868
- */
14869
- class CryptoOps {
14870
- constructor(logger, performanceClient, skipValidateSubtleCrypto) {
14871
- this.logger = logger;
14872
- // Browser crypto needs to be validated first before any other classes can be set.
14873
- validateCryptoAvailable(skipValidateSubtleCrypto ?? false);
14874
- this.performanceClient = performanceClient;
14875
- this.tokenBindingKeyManager = new TokenBindingKeyManager(this.logger, this.performanceClient);
14876
- }
14877
- /**
14878
- * Creates a new random GUID - used to populate state and nonce.
14879
- * @returns string (GUID)
14880
- */
14881
- createNewGuid() {
14882
- return createNewGuid();
14883
- }
14884
- /**
14885
- * Encodes input string to base64.
14886
- * @param input
14887
- */
14888
- base64Encode(input) {
14889
- return base64Encode(input);
14890
- }
14891
- /**
14892
- * Decodes input string from base64.
14893
- * @param input
14894
- */
14895
- base64Decode(input) {
14896
- return base64Decode(input);
14897
- }
14898
- /**
14899
- * Encodes input string to base64 URL safe string.
14900
- * @param input
14901
- */
14902
- base64UrlEncode(input) {
14903
- return urlEncode(input);
14904
- }
14905
- /**
14906
- * Stringifies and base64Url encodes input public key
14907
- * @param inputKid
14908
- * @returns Base64Url encoded public key
14909
- */
14910
- encodeKid(inputKid) {
14911
- return this.base64UrlEncode(JSON.stringify({ kid: inputKid }));
14912
- }
14913
- /**
14914
- * Removes cryptographic keypair from key store matching the keyId passed in
14915
- * @param kid
14916
- * @param correlationId
14917
- */
14918
- async removeTokenBindingKey(kid, correlationId) {
14919
- await this.tokenBindingKeyManager.removeTokenBindingKey(kid, correlationId);
14920
- }
14921
- /**
14922
- * Removes all cryptographic keys from IndexedDB storage
14923
- * @param correlationId
14924
- */
14925
- async clearKeystore(correlationId) {
14926
- return this.tokenBindingKeyManager.clearKeystore(correlationId);
14927
- }
14928
- /** @internal */
14929
- async signTokenBindingJwt(header, payload, kid, correlationId) {
14930
- let telemetry = {};
14931
- const signTokenBindingJwtMeasurement = this.performanceClient?.startMeasurement(CryptoOptsSignJwt, correlationId);
14932
- try {
14933
- const cachedKeyPair = await this.tokenBindingKeyManager.getTokenBindingKeyPair(kid, correlationId);
14934
- await this.validateTokenBindingJwtHeaderKey(header, kid, correlationId);
14935
- telemetry = this.tokenBindingKeyManager.getTokenBindingKeyTelemetry(cachedKeyPair, header.alg);
14936
- const signingAlgorithm = this.getTokenBindingKeySigningAlgorithm(cachedKeyPair, header.alg, correlationId);
14937
- const tokenString = `${urlEncode(JSON.stringify(header))}.${urlEncode(JSON.stringify(payload))}`;
14938
- const encodedSignature = await this.signInput(cachedKeyPair, tokenString, signingAlgorithm);
14939
- signTokenBindingJwtMeasurement?.end({
14940
- success: true,
14941
- ...telemetry,
14942
- });
14943
- return `${tokenString}.${encodedSignature}`;
14944
- }
14945
- catch (e) {
14946
- signTokenBindingJwtMeasurement?.end({
14947
- success: false,
14948
- ...telemetry,
14949
- });
14950
- throw e;
14951
- }
14952
- }
14953
- /**
14954
- * Returns the SHA-256 hash of an input string
14955
- * @param plainText
14956
- */
14957
- async hashString(plainText) {
14958
- return hashString(plainText);
14959
- }
14960
- async signInput(cachedKeyPair, signingInput, algorithm) {
14961
- const encoder = new TextEncoder();
14962
- const signatureBuffer = await sign(cachedKeyPair.privateKey, encoder.encode(signingInput), algorithm);
14963
- return urlEncodeArr(new Uint8Array(signatureBuffer));
14964
- }
14965
- getTokenBindingKeySigningAlgorithm(cachedKeyPair, requestedAlgorithm, correlationId) {
14966
- const keyAlgorithm = cachedKeyPair.privateKey.algorithm;
14967
- if (requestedAlgorithm === JsonWebTokenAlgorithms.RS256 &&
14968
- keyAlgorithm.name === RSA_SIGN_ALGORITHM_OPTIONS.name) {
14969
- return RSA_SIGN_ALGORITHM_OPTIONS;
14970
- }
14971
- if (requestedAlgorithm === JsonWebTokenAlgorithms.ES256 &&
14972
- keyAlgorithm.name ===
14973
- ECDSA_SHA256_SIGN_ALGORITHM_OPTIONS.name &&
14974
- keyAlgorithm.namedCurve ===
14975
- ECDSA_P256_KEYGEN_ALGORITHM_OPTIONS.namedCurve) {
14976
- return ECDSA_SHA256_SIGN_ALGORITHM_OPTIONS;
14977
- }
14978
- if (requestedAlgorithm === JsonWebTokenAlgorithms.RS256 ||
14979
- requestedAlgorithm === JsonWebTokenAlgorithms.ES256) {
14980
- throw createBrowserAuthError(unsupportedTokenBindingAlgorithm, correlationId, tokenBindingKeyAlgorithmMismatch);
14981
- }
14982
- throw createBrowserAuthError(unsupportedTokenBindingAlgorithm, correlationId);
14983
- }
14984
- async validateTokenBindingJwtHeaderKey(header, kid, correlationId) {
14985
- if (!header.jwk) {
14986
- return;
14987
- }
14988
- const headerKeyId = await computeJwkThumbprint(header.jwk, correlationId);
14989
- if (headerKeyId !== kid) {
14990
- throw createBrowserAuthError(invalidPublicJwk, correlationId, tokenBindingKeyJwkThumbprintMismatch);
14991
- }
14992
- }
14993
- }
14994
-
14995
15280
  /*
14996
15281
  * Copyright (c) Microsoft Corporation. All rights reserved.
14997
15282
  * Licensed under the MIT License.
@@ -15477,10 +15762,20 @@ class LocalStorage {
15477
15762
  }
15478
15763
  if (context && context !== this.clientId) {
15479
15764
  this.logger.trace(`04rtdy ${context}`, correlationId);
15480
- perfMeasurement.end({
15481
- success: false,
15482
- errorCode: "contextMismatch",
15483
- });
15765
+ /*
15766
+ * Discarded rather than ended: this is expected routing, not a failure.
15767
+ * BroadcastChannel has no server-side filtering, so every MSAL instance on
15768
+ * the origin receives every message and drops the ones scoped to another
15769
+ * clientId. With N instances sharing an origin each write produces N-1 of
15770
+ * these no-ops, so emitting them scales O(N^2) - and because they were
15771
+ * previously reported with success: false they bypassed both the 1% misc
15772
+ * sampler and the observability trimming in the 1P telemetry reporter,
15773
+ * shipping at full payload. On origins hosting many embedded first-party
15774
+ * apps that dwarfed all other MSAL telemetry combined. These events carry
15775
+ * no diagnostic value, so drop the measurement entirely. Genuine faults
15776
+ * such as the noKey case above are still reported.
15777
+ */
15778
+ perfMeasurement.discard();
15484
15779
  return;
15485
15780
  }
15486
15781
  if (!value) {
@@ -15595,8 +15890,8 @@ const MigrationRemovalReason = {
15595
15890
  * This class implements the cache storage interface for MSAL through browser local or session storage.
15596
15891
  */
15597
15892
  class BrowserCacheManager extends CacheManager {
15598
- constructor(clientId, cacheConfig, cryptoImpl, logger, performanceClient, eventHandler, staticAuthorityOptions) {
15599
- super(clientId, cryptoImpl, logger, performanceClient, staticAuthorityOptions);
15893
+ constructor(clientId, cacheConfig, cryptoImpl, logger, performanceClient, eventHandler, staticAuthorityOptions, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER) {
15894
+ super(clientId, cryptoImpl, logger, performanceClient, staticAuthorityOptions, tokenBindingKeyManager);
15600
15895
  this.cacheConfig = cacheConfig;
15601
15896
  this.logger = logger;
15602
15897
  this.internalStorage = new MemoryStorage();
@@ -17014,12 +17309,12 @@ function getStorageImplementation(clientId, cacheLocation, logger, performanceCl
17014
17309
  }
17015
17310
  return new MemoryStorage();
17016
17311
  }
17017
- const DEFAULT_BROWSER_CACHE_MANAGER = (clientId, logger, performanceClient, eventHandler) => {
17312
+ const DEFAULT_BROWSER_CACHE_MANAGER = (clientId, logger, performanceClient, eventHandler, staticAuthorityOptions, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER) => {
17018
17313
  const cacheOptions = {
17019
17314
  cacheLocation: BrowserCacheLocation.MemoryStorage,
17020
17315
  cacheRetentionDays: 5,
17021
17316
  };
17022
- return new BrowserCacheManager(clientId, cacheOptions, DEFAULT_CRYPTO_IMPLEMENTATION, logger, performanceClient, eventHandler);
17317
+ return new BrowserCacheManager(clientId, cacheOptions, DEFAULT_CRYPTO_IMPLEMENTATION, logger, performanceClient, eventHandler, staticAuthorityOptions, tokenBindingKeyManager);
17023
17318
  };
17024
17319
 
17025
17320
  /*
@@ -18380,22 +18675,16 @@ async function getStandardParameters(config, authority, request, logger, perform
18380
18675
  isPlatformAuthorizeRequest: true,
18381
18676
  }, request.correlationId);
18382
18677
  // pass the req_cnf for POP
18383
- if (request.authenticationScheme === AuthenticationScheme.POP) {
18384
- const cryptoOps = new CryptoOps(logger, performanceClient);
18385
- const tokenBindingKeyManager = new TokenBindingKeyManager(logger, performanceClient);
18386
- const popTokenGenerator = new PopTokenGenerator(cryptoOps, tokenBindingKeyManager, performanceClient);
18387
- // req_cnf is always sent as a string for SPAs
18388
- let reqCnfData;
18389
- if (!request.popKid) {
18390
- const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PopTokenGenerateCnf, logger, performanceClient, request.correlationId)(request, logger);
18391
- reqCnfData = generatedReqCnfData.reqCnfString;
18392
- }
18393
- else {
18394
- reqCnfData = cryptoOps.encodeKid(request.popKid);
18395
- }
18396
- addPopToken(parameters, reqCnfData);
18678
+ if (request.authenticationScheme ===
18679
+ AuthenticationScheme.POP &&
18680
+ request.reqCnf) {
18681
+ addPopToken(parameters, request.reqCnf);
18397
18682
  }
18398
18683
  }
18684
+ if (request.authenticationScheme === AuthenticationScheme.DPOP &&
18685
+ request.dpopJkt) {
18686
+ parameters.set(DPOP_JKT, request.dpopJkt);
18687
+ }
18399
18688
  instrumentBrokerParams(parameters, request.correlationId, performanceClient);
18400
18689
  return parameters;
18401
18690
  }
@@ -19570,9 +19859,11 @@ class PopupClient extends StandardInteractionClient {
19570
19859
  const serverTelemetryManager = initializeServerTelemetryManager(ApiId.acquireTokenPopup, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
19571
19860
  const pkce = pkceCodes ||
19572
19861
  (await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId));
19862
+ const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
19573
19863
  const popupRequest = {
19574
19864
  ...request,
19575
19865
  codeChallenge: pkce.challenge,
19866
+ ...tokenBindingParams,
19576
19867
  };
19577
19868
  try {
19578
19869
  // Initialize the client
@@ -19606,7 +19897,7 @@ class PopupClient extends StandardInteractionClient {
19606
19897
  // Wait for the redirect bridge response
19607
19898
  const responseString = await this.waitForPopupResponse(request, popupWindow, popupParams.popupWindowParent);
19608
19899
  const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
19609
- return await invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(request, serverParams, pkce.verifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
19900
+ return await invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(popupRequest, serverParams, pkce.verifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
19610
19901
  }
19611
19902
  }
19612
19903
  catch (e) {
@@ -19630,10 +19921,12 @@ class PopupClient extends StandardInteractionClient {
19630
19921
  const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
19631
19922
  const pkce = pkceCodes ||
19632
19923
  (await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId));
19924
+ const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
19633
19925
  const popupRequest = {
19634
19926
  ...request,
19635
19927
  earJwk: earJwk,
19636
19928
  codeChallenge: pkce.challenge,
19929
+ ...tokenBindingParams,
19637
19930
  };
19638
19931
  const popupWindow = await this.openPostFormPopup(popupRequest, discoveredAuthority, popupParams, correlationId, true);
19639
19932
  // Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
@@ -20020,9 +20313,11 @@ class RedirectClient extends StandardInteractionClient {
20020
20313
  const correlationId = request.correlationId;
20021
20314
  const serverTelemetryManager = initializeServerTelemetryManager(ApiId.acquireTokenRedirect, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
20022
20315
  const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
20316
+ const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
20023
20317
  const redirectRequest = {
20024
20318
  ...request,
20025
20319
  codeChallenge: pkceCodes.challenge,
20320
+ ...tokenBindingParams,
20026
20321
  };
20027
20322
  this.browserStorage.cacheAuthorizeRequest(redirectRequest, this.correlationId, pkceCodes.verifier);
20028
20323
  try {
@@ -20062,10 +20357,12 @@ class RedirectClient extends StandardInteractionClient {
20062
20357
  const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger, authority, azureCloudOptions, extraQueryParameters, account);
20063
20358
  const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
20064
20359
  const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
20360
+ const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
20065
20361
  const redirectRequest = {
20066
20362
  ...request,
20067
20363
  earJwk: earJwk,
20068
20364
  codeChallenge: pkceCodes.challenge,
20365
+ ...tokenBindingParams,
20069
20366
  };
20070
20367
  this.browserStorage.cacheAuthorizeRequest(redirectRequest, this.correlationId, pkceCodes.verifier);
20071
20368
  const form = await getEARForm(document, this.config, discoveredAuthority, redirectRequest, this.logger, this.performanceClient);
@@ -20635,8 +20932,8 @@ class SilentIframeClient extends StandardInteractionClient {
20635
20932
  * @param userRequestScopes
20636
20933
  */
20637
20934
  async silentTokenHelper(authClient, request) {
20638
- const { serverParams, pkceCodes } = await this.silentAuthorizeHelper(authClient, request);
20639
- return invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, request.correlationId)(request, serverParams, pkceCodes.verifier, this.apiId, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
20935
+ const { serverParams, pkceCodes, silentRequest } = await this.silentAuthorizeHelper(authClient, request);
20936
+ return invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, request.correlationId)(silentRequest, serverParams, pkceCodes.verifier, this.apiId, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
20640
20937
  }
20641
20938
  /**
20642
20939
  * Shared helper that generates PKCE codes, builds the /authorize URL,
@@ -20647,9 +20944,11 @@ class SilentIframeClient extends StandardInteractionClient {
20647
20944
  async silentAuthorizeHelper(authClient, request) {
20648
20945
  const correlationId = request.correlationId;
20649
20946
  const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
20947
+ const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
20650
20948
  const silentRequest = {
20651
20949
  ...request,
20652
20950
  codeChallenge: pkceCodes.challenge,
20951
+ ...tokenBindingParams,
20653
20952
  };
20654
20953
  // Create the iframe, register the response listener, then navigate, so the listener is active before the iframe can respond.
20655
20954
  const iframe = createHiddenIframe();
@@ -20703,9 +21002,11 @@ class SilentRefreshClient extends StandardInteractionClient {
20703
21002
  */
20704
21003
  async acquireToken(request) {
20705
21004
  const baseRequest = await invokeAsync(initializeBaseRequest, InitializeBaseRequest, this.logger, this.performanceClient, request.correlationId)(request, this.config, this.performanceClient, this.logger, this.correlationId);
21005
+ const tokenBindingParams = await getTokenBindingRequestParams(baseRequest, this.tokenBindingKeyManager, this.logger, this.performanceClient);
20706
21006
  const silentRequest = {
20707
21007
  ...request,
20708
21008
  ...baseRequest,
21009
+ ...tokenBindingParams,
20709
21010
  };
20710
21011
  if (request.redirectUri) {
20711
21012
  // Make sure any passed redirectUri is converted to an absolute URL - redirectUri is not a required parameter for refresh token redemption so only include if explicitly provided
@@ -20793,10 +21094,12 @@ class SilentAuthCodeClient extends StandardInteractionClient {
20793
21094
  this.correlationId);
20794
21095
  const serverTelemetryManager = initializeServerTelemetryManager(this.apiId, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
20795
21096
  try {
21097
+ const tokenBindingParams = await getTokenBindingRequestParams(silentRequest, this.tokenBindingKeyManager, this.logger, this.performanceClient);
20796
21098
  // Create auth code request (PKCE not needed)
20797
21099
  const authCodeRequest = {
20798
21100
  ...silentRequest,
20799
21101
  code: request.code,
21102
+ ...tokenBindingParams,
20800
21103
  };
20801
21104
  // Initialize the client
20802
21105
  const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, this.correlationId)({
@@ -20925,14 +21228,14 @@ class StandardController {
20925
21228
  this.eventHandler = new EventHandler(this.logger);
20926
21229
  // Initialize the browser storage class.
20927
21230
  this.browserStorage = this.isBrowserEnvironment
20928
- ? new BrowserCacheManager(this.config.auth.clientId, this.config.cache, this.browserCrypto, this.logger, this.performanceClient, this.eventHandler, buildStaticAuthorityOptions(this.config.auth))
20929
- : DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId, this.logger, this.performanceClient, this.eventHandler);
21231
+ ? new BrowserCacheManager(this.config.auth.clientId, this.config.cache, this.browserCrypto, this.logger, this.performanceClient, this.eventHandler, buildStaticAuthorityOptions(this.config.auth), this.tokenBindingKeyManager)
21232
+ : DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId, this.logger, this.performanceClient, this.eventHandler, undefined, this.tokenBindingKeyManager);
20930
21233
  // initialize in memory storage for native flows
20931
21234
  const nativeCacheOptions = {
20932
21235
  cacheLocation: BrowserCacheLocation.MemoryStorage,
20933
21236
  cacheRetentionDays: 5,
20934
21237
  };
20935
- this.nativeInternalStorage = new BrowserCacheManager(this.config.auth.clientId, nativeCacheOptions, this.browserCrypto, this.logger, this.performanceClient, this.eventHandler);
21238
+ this.nativeInternalStorage = new BrowserCacheManager(this.config.auth.clientId, nativeCacheOptions, this.browserCrypto, this.logger, this.performanceClient, this.eventHandler, undefined, this.tokenBindingKeyManager);
20936
21239
  this.activeSilentTokenRequests = new Map();
20937
21240
  // Register listener functions
20938
21241
  this.trackStateChange = this.trackStateChange.bind(this);