@azure/msal-node 5.5.0 → 6.0.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 (116) hide show
  1. package/dist/cache/CacheHelpers.mjs +1 -1
  2. package/dist/cache/NodeStorage.mjs +3 -3
  3. package/dist/cache/NodeStorage.mjs.map +1 -1
  4. package/dist/cache/TokenCache.mjs +1 -1
  5. package/dist/cache/distributed/DistributedCachePlugin.mjs +1 -1
  6. package/dist/cache/serializer/Deserializer.mjs +1 -1
  7. package/dist/cache/serializer/Serializer.mjs +1 -1
  8. package/dist/client/BaseClient.mjs +1 -1
  9. package/dist/client/ClientApplication.mjs +16 -6
  10. package/dist/client/ClientApplication.mjs.map +1 -1
  11. package/dist/client/ClientAssertion.mjs +1 -1
  12. package/dist/client/ClientCredentialClient.mjs +5 -3
  13. package/dist/client/ClientCredentialClient.mjs.map +1 -1
  14. package/dist/client/ConfidentialClientApplication.mjs +1 -1
  15. package/dist/client/DeviceCodeClient.mjs +2 -2
  16. package/dist/client/DeviceCodeClient.mjs.map +1 -1
  17. package/dist/client/ManagedIdentityApplication.mjs +1 -1
  18. package/dist/client/ManagedIdentityClient.mjs +1 -1
  19. package/dist/client/ManagedIdentitySources/AppService.mjs +1 -1
  20. package/dist/client/ManagedIdentitySources/AzureArc.mjs +93 -16
  21. package/dist/client/ManagedIdentitySources/AzureArc.mjs.map +1 -1
  22. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +1 -1
  23. package/dist/client/ManagedIdentitySources/CloudShell.mjs +1 -1
  24. package/dist/client/ManagedIdentitySources/Imds.mjs +1 -1
  25. package/dist/client/ManagedIdentitySources/MachineLearning.mjs +1 -1
  26. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +1 -1
  27. package/dist/client/OnBehalfOfClient.mjs +6 -3
  28. package/dist/client/OnBehalfOfClient.mjs.map +1 -1
  29. package/dist/client/PublicClientApplication.mjs +5 -8
  30. package/dist/client/PublicClientApplication.mjs.map +1 -1
  31. package/dist/client/UserFederatedIdentityCredentialClient.mjs +2 -2
  32. package/dist/client/UserFederatedIdentityCredentialClient.mjs.map +1 -1
  33. package/dist/client/UsernamePasswordClient.mjs +2 -2
  34. package/dist/client/UsernamePasswordClient.mjs.map +1 -1
  35. package/dist/config/Configuration.mjs +1 -1
  36. package/dist/config/ManagedIdentityId.mjs +1 -1
  37. package/dist/config/ManagedIdentityRequestParameters.mjs +1 -1
  38. package/dist/crypto/CryptoProvider.mjs +13 -13
  39. package/dist/crypto/CryptoProvider.mjs.map +1 -1
  40. package/dist/crypto/GuidGenerator.mjs +1 -1
  41. package/dist/crypto/HashUtils.mjs +1 -1
  42. package/dist/crypto/PkceGenerator.mjs +1 -1
  43. package/dist/error/ClientAuthErrorCodes.mjs +1 -1
  44. package/dist/error/ManagedIdentityError.mjs +5 -4
  45. package/dist/error/ManagedIdentityError.mjs.map +1 -1
  46. package/dist/error/ManagedIdentityErrorCodes.mjs +3 -2
  47. package/dist/error/ManagedIdentityErrorCodes.mjs.map +1 -1
  48. package/dist/error/NodeAuthError.mjs +1 -1
  49. package/dist/index.mjs +1 -1
  50. package/dist/index.mjs.map +1 -1
  51. package/dist/internals.mjs +1 -1
  52. package/dist/network/HttpClient.mjs +1 -1
  53. package/dist/network/HttpClientWithRetries.mjs +1 -1
  54. package/dist/network/LoopbackClient.mjs +1 -1
  55. package/dist/network/LoopbackClient.mjs.map +1 -1
  56. package/dist/packageMetadata.mjs +2 -2
  57. package/dist/protocol/Authorize.mjs +1 -1
  58. package/dist/retry/DefaultManagedIdentityRetryPolicy.mjs +1 -1
  59. package/dist/retry/ExponentialRetryStrategy.mjs +1 -1
  60. package/dist/retry/ImdsRetryPolicy.mjs +1 -1
  61. package/dist/retry/LinearRetryStrategy.mjs +1 -1
  62. package/dist/utils/Constants.mjs +1 -1
  63. package/dist/utils/EncodingUtils.mjs +1 -1
  64. package/dist/utils/TimeUtils.mjs +1 -1
  65. package/lib/msal-node.cjs +723 -186
  66. package/lib/msal-node.cjs.map +1 -1
  67. package/package.json +4 -8
  68. package/src/cache/NodeStorage.ts +3 -1
  69. package/src/client/ClientApplication.ts +15 -5
  70. package/src/client/ClientCredentialClient.ts +6 -2
  71. package/src/client/DeviceCodeClient.ts +2 -1
  72. package/src/client/ManagedIdentitySources/AzureArc.ts +139 -19
  73. package/src/client/OnBehalfOfClient.ts +6 -2
  74. package/src/client/PublicClientApplication.ts +4 -14
  75. package/src/client/UserFederatedIdentityCredentialClient.ts +2 -1
  76. package/src/client/UsernamePasswordClient.ts +2 -1
  77. package/src/crypto/CryptoProvider.ts +31 -13
  78. package/src/error/ManagedIdentityError.ts +4 -2
  79. package/src/error/ManagedIdentityErrorCodes.ts +2 -0
  80. package/src/index.ts +0 -1
  81. package/src/network/LoopbackClient.ts +1 -2
  82. package/src/packageMetadata.ts +1 -1
  83. package/src/request/AuthorizationCodeRequest.ts +4 -0
  84. package/src/request/InteractiveRequest.ts +1 -7
  85. package/src/response/ManagedIdentityTokenResponse.ts +3 -0
  86. package/types/cache/NodeStorage.d.ts.map +1 -1
  87. package/types/client/ClientApplication.d.ts.map +1 -1
  88. package/types/client/ClientCredentialClient.d.ts.map +1 -1
  89. package/types/client/DeviceCodeClient.d.ts.map +1 -1
  90. package/types/client/ManagedIdentitySources/AzureArc.d.ts +22 -8
  91. package/types/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
  92. package/types/client/OnBehalfOfClient.d.ts.map +1 -1
  93. package/types/client/PublicClientApplication.d.ts +1 -1
  94. package/types/client/PublicClientApplication.d.ts.map +1 -1
  95. package/types/client/UserFederatedIdentityCredentialClient.d.ts.map +1 -1
  96. package/types/client/UsernamePasswordClient.d.ts.map +1 -1
  97. package/types/crypto/CryptoProvider.d.ts +11 -9
  98. package/types/crypto/CryptoProvider.d.ts.map +1 -1
  99. package/types/error/ManagedIdentityError.d.ts +1 -0
  100. package/types/error/ManagedIdentityError.d.ts.map +1 -1
  101. package/types/error/ManagedIdentityErrorCodes.d.ts +1 -0
  102. package/types/error/ManagedIdentityErrorCodes.d.ts.map +1 -1
  103. package/types/index.d.ts +0 -1
  104. package/types/index.d.ts.map +1 -1
  105. package/types/network/LoopbackClient.d.ts +1 -2
  106. package/types/network/LoopbackClient.d.ts.map +1 -1
  107. package/types/packageMetadata.d.ts +1 -1
  108. package/types/request/AuthorizationCodeRequest.d.ts +4 -0
  109. package/types/request/AuthorizationCodeRequest.d.ts.map +1 -1
  110. package/types/request/InteractiveRequest.d.ts +1 -7
  111. package/types/request/InteractiveRequest.d.ts.map +1 -1
  112. package/types/response/ManagedIdentityTokenResponse.d.ts +3 -0
  113. package/types/response/ManagedIdentityTokenResponse.d.ts.map +1 -1
  114. package/src/network/ILoopbackClient.ts +0 -19
  115. package/types/network/ILoopbackClient.d.ts +0 -11
  116. package/types/network/ILoopbackClient.d.ts.map +0 -1
package/lib/msal-node.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-node v5.5.0 2026-08-04 */
1
+ /*! @azure/msal-node v6.0.0 2026-08-28 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
@@ -151,7 +151,7 @@ class Serializer {
151
151
  }
152
152
  }
153
153
 
154
- /*! @azure/msal-common v16.12.0 2026-08-04 */
154
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
155
155
  /*
156
156
  * Copyright (c) Microsoft Corporation. All rights reserved.
157
157
  * Licensed under the MIT License.
@@ -209,7 +209,7 @@ const USER_ID = "user_id";
209
209
  const FMI_PATH = "fmi_path";
210
210
  const ATTRIBUTE_TOKENS = "attribute_tokens";
211
211
 
212
- /*! @azure/msal-common v16.12.0 2026-08-04 */
212
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
213
213
  /*
214
214
  * Copyright (c) Microsoft Corporation. All rights reserved.
215
215
  * Licensed under the MIT License.
@@ -221,7 +221,6 @@ const DEFAULT_AUTHORITY_HOST = "login.microsoftonline.com";
221
221
  const DEFAULT_COMMON_TENANT = "common";
222
222
  // ADFS String
223
223
  const ADFS = "adfs";
224
- const DSTS = "dstsv2";
225
224
  // Default AAD Instance Discovery Endpoint
226
225
  const AAD_INSTANCE_DISCOVERY_ENDPT = `${DEFAULT_AUTHORITY}discovery/instance?api-version=1.1&authorization_endpoint=`;
227
226
  // CIAM URL
@@ -278,6 +277,7 @@ const OIDC_SCOPES = [...OIDC_DEFAULT_SCOPES, EMAIL_SCOPE];
278
277
  const HeaderNames = {
279
278
  CONTENT_TYPE: "Content-Type",
280
279
  CONTENT_LENGTH: "Content-Length",
280
+ DPOP: "DPoP",
281
281
  RETRY_AFTER: "Retry-After",
282
282
  CCS_HEADER: "X-AnchorMailbox",
283
283
  WWWAuthenticate: "WWW-Authenticate",
@@ -302,6 +302,7 @@ const ClaimsRequestKeys = {
302
302
  ID_TOKEN: "id_token",
303
303
  SIGNIN_STATE: "signin_state",
304
304
  LOGIN_HINT: "login_hint",
305
+ TENANT_REGION_SUB_SCOPE: "tenant_region_sub_scope",
305
306
  };
306
307
  /**
307
308
  * we considered making this "enum" in the request instead of string, however it looks like the allowed list of
@@ -398,6 +399,7 @@ const SERVER_TELEM_UNKNOWN_ERROR = "unknown_error";
398
399
  const AuthenticationScheme = {
399
400
  BEARER: "Bearer",
400
401
  POP: "pop",
402
+ DPOP: "DPoP",
401
403
  SSH: "ssh-cert",
402
404
  };
403
405
  /**
@@ -454,6 +456,10 @@ const CacheOutcome = {
454
456
  // When the token request goes to the identity provider because refresh_in was used and the existing token needs to be refreshed
455
457
  PROACTIVELY_REFRESHED: "4",
456
458
  };
459
+ const JsonWebTokenTypes = {
460
+ Pop: "pop",
461
+ Dpop: "dpop+jwt",
462
+ };
457
463
  // Token renewal offset default in seconds
458
464
  const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
459
465
  const EncodingTypes = {
@@ -462,7 +468,7 @@ const EncodingTypes = {
462
468
  UTF8: "utf-8",
463
469
  };
464
470
 
465
- /*! @azure/msal-common v16.12.0 2026-08-04 */
471
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
466
472
  /*
467
473
  * Copyright (c) Microsoft Corporation. All rights reserved.
468
474
  * Licensed under the MIT License.
@@ -491,7 +497,7 @@ function createAuthError(code, correlationId, additionalMessage) {
491
497
  return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage(code));
492
498
  }
493
499
 
494
- /*! @azure/msal-common v16.12.0 2026-08-04 */
500
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
495
501
 
496
502
  /*
497
503
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -514,7 +520,7 @@ function createClientAuthError(errorCode, correlationId, additionalMessage) {
514
520
  return new ClientAuthError(errorCode, correlationId, additionalMessage);
515
521
  }
516
522
 
517
- /*! @azure/msal-common v16.12.0 2026-08-04 */
523
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
518
524
  /*
519
525
  * Copyright (c) Microsoft Corporation. All rights reserved.
520
526
  * Licensed under the MIT License.
@@ -543,6 +549,7 @@ const invalidCacheEnvironment = "invalid_cache_environment";
543
549
  const noAccountFound = "no_account_found";
544
550
  const noCryptoObject = "no_crypto_object";
545
551
  const unexpectedCredentialType = "unexpected_credential_type";
552
+ const dpopTokenTypeMismatch = "dpop_token_type_mismatch";
546
553
  const tokenRefreshRequired = "token_refresh_required";
547
554
  const tokenClaimsCnfRequiredForSignedJwt = "token_claims_cnf_required_for_signedjwt";
548
555
  const authorizationCodeMissingFromServerResponse = "authorization_code_missing_from_server_response";
@@ -565,6 +572,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
565
572
  cannotRemoveEmptyScope: cannotRemoveEmptyScope,
566
573
  clientInfoDecodingError: clientInfoDecodingError,
567
574
  clientInfoEmptyError: clientInfoEmptyError,
575
+ dpopTokenTypeMismatch: dpopTokenTypeMismatch,
568
576
  emptyInputScopeSet: emptyInputScopeSet,
569
577
  endSessionEndpointNotSupported: endSessionEndpointNotSupported,
570
578
  endpointResolutionError: endpointResolutionError,
@@ -598,7 +606,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
598
606
  userCanceled: userCanceled
599
607
  });
600
608
 
601
- /*! @azure/msal-common v16.12.0 2026-08-04 */
609
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
602
610
 
603
611
  /*
604
612
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -636,7 +644,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
636
644
  };
637
645
  }
638
646
 
639
- /*! @azure/msal-common v16.12.0 2026-08-04 */
647
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
640
648
 
641
649
  /*
642
650
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -702,7 +710,7 @@ function getJWSPayload(authToken, correlationId) {
702
710
  return matches[2];
703
711
  }
704
712
 
705
- /*! @azure/msal-common v16.12.0 2026-08-04 */
713
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
706
714
 
707
715
  /*
708
716
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -790,7 +798,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
790
798
  return updatedAccountInfo;
791
799
  }
792
800
 
793
- /*! @azure/msal-common v16.12.0 2026-08-04 */
801
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
794
802
  /*
795
803
  * Copyright (c) Microsoft Corporation. All rights reserved.
796
804
  * Licensed under the MIT License.
@@ -801,11 +809,10 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
801
809
  const AuthorityType = {
802
810
  Default: 0,
803
811
  Adfs: 1,
804
- Dsts: 2,
805
812
  Ciam: 3,
806
813
  };
807
814
 
808
- /*! @azure/msal-common v16.12.0 2026-08-04 */
815
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
809
816
  /*
810
817
  * Copyright (c) Microsoft Corporation. All rights reserved.
811
818
  * Licensed under the MIT License.
@@ -827,7 +834,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
827
834
  return null;
828
835
  }
829
836
 
830
- /*! @azure/msal-common v16.12.0 2026-08-04 */
837
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
831
838
  /*
832
839
  * Copyright (c) Microsoft Corporation. All rights reserved.
833
840
  * Licensed under the MIT License.
@@ -851,7 +858,7 @@ const ProtocolMode = {
851
858
  EAR: "EAR",
852
859
  };
853
860
 
854
- /*! @azure/msal-common v16.12.0 2026-08-04 */
861
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
855
862
  /**
856
863
  * Returns the AccountInfo interface for this account.
857
864
  * @internal
@@ -966,8 +973,8 @@ function createAccountEntity(accountDetails, authority, correlationId, base64Dec
966
973
  * @param authType
967
974
  */
968
975
  function generateHomeAccountId(serverClientInfo, authType, logger, cryptoObj, correlationId, idTokenClaims) {
969
- // since ADFS/DSTS do not have tid and does not set client_info
970
- if (!(authType === AuthorityType.Adfs || authType === AuthorityType.Dsts)) {
976
+ // ADFS does not have tid and does not set client_info
977
+ if (authType !== AuthorityType.Adfs) {
971
978
  // for cases where there is clientInfo
972
979
  if (serverClientInfo) {
973
980
  try {
@@ -1000,7 +1007,7 @@ function isAccountEntity(entity) {
1000
1007
  entity.hasOwnProperty("authorityType"));
1001
1008
  }
1002
1009
 
1003
- /*! @azure/msal-common v16.12.0 2026-08-04 */
1010
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
1004
1011
  /*
1005
1012
  * Copyright (c) Microsoft Corporation. All rights reserved.
1006
1013
  * Licensed under the MIT License.
@@ -1017,7 +1024,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
1017
1024
  unexpectedError: unexpectedError
1018
1025
  });
1019
1026
 
1020
- /*! @azure/msal-common v16.12.0 2026-08-04 */
1027
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
1021
1028
 
1022
1029
  /*
1023
1030
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1037,7 +1044,7 @@ function createClientConfigurationError(errorCode, correlationId) {
1037
1044
  return new ClientConfigurationError(errorCode, correlationId);
1038
1045
  }
1039
1046
 
1040
- /*! @azure/msal-common v16.12.0 2026-08-04 */
1047
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
1041
1048
  /*
1042
1049
  * Copyright (c) Microsoft Corporation. All rights reserved.
1043
1050
  * Licensed under the MIT License.
@@ -1058,6 +1065,7 @@ const invalidAuthorityMetadata = "invalid_authority_metadata";
1058
1065
  const untrustedAuthority = "untrusted_authority";
1059
1066
  const missingSshJwk = "missing_ssh_jwk";
1060
1067
  const missingSshKid = "missing_ssh_kid";
1068
+ const unsupportedAuthenticationScheme = "unsupported_authentication_scheme";
1061
1069
  const missingNonceAuthenticationHeader = "missing_nonce_authentication_header";
1062
1070
  const invalidAuthenticationHeader = "invalid_authentication_header";
1063
1071
  const cannotSetOIDCOptions = "cannot_set_OIDCOptions";
@@ -1068,7 +1076,9 @@ const invalidPlatformBrokerConfiguration = "invalid_platform_broker_configuratio
1068
1076
  const issuerValidationFailed = "issuer_validation_failed";
1069
1077
  const invalidResponseMode = "invalid_response_mode";
1070
1078
  const invalidDpopHtm = "invalid_dpop_htm";
1071
- const invalidDpopHtu = "invalid_dpop_htu";
1079
+ const invalidDpopHtu = "invalid_dpop_htu";
1080
+ const invalidDpopNonce = "invalid_dpop_nonce";
1081
+ const dpopMissingResourceContext = "dpop_missing_resource_context";
1072
1082
 
1073
1083
  var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
1074
1084
  __proto__: null,
@@ -1077,6 +1087,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
1077
1087
  cannotAllowPlatformBroker: cannotAllowPlatformBroker,
1078
1088
  cannotSetOIDCOptions: cannotSetOIDCOptions,
1079
1089
  claimsRequestParsingError: claimsRequestParsingError,
1090
+ dpopMissingResourceContext: dpopMissingResourceContext,
1080
1091
  emptyInputScopesError: emptyInputScopesError,
1081
1092
  invalidAuthenticationHeader: invalidAuthenticationHeader,
1082
1093
  invalidAuthorityMetadata: invalidAuthorityMetadata,
@@ -1085,6 +1096,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
1085
1096
  invalidCodeChallengeMethod: invalidCodeChallengeMethod,
1086
1097
  invalidDpopHtm: invalidDpopHtm,
1087
1098
  invalidDpopHtu: invalidDpopHtu,
1099
+ invalidDpopNonce: invalidDpopNonce,
1088
1100
  invalidPlatformBrokerConfiguration: invalidPlatformBrokerConfiguration,
1089
1101
  invalidRequestMethodForEAR: invalidRequestMethodForEAR,
1090
1102
  invalidResponseMode: invalidResponseMode,
@@ -1096,12 +1108,13 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
1096
1108
  pkceParamsMissing: pkceParamsMissing,
1097
1109
  redirectUriEmpty: redirectUriEmpty,
1098
1110
  tokenRequestEmpty: tokenRequestEmpty,
1111
+ unsupportedAuthenticationScheme: unsupportedAuthenticationScheme,
1099
1112
  untrustedAuthority: untrustedAuthority,
1100
1113
  urlEmptyError: urlEmptyError,
1101
1114
  urlParseError: urlParseError
1102
1115
  });
1103
1116
 
1104
- /*! @azure/msal-common v16.12.0 2026-08-04 */
1117
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
1105
1118
  /*
1106
1119
  * Copyright (c) Microsoft Corporation. All rights reserved.
1107
1120
  * Licensed under the MIT License.
@@ -1113,7 +1126,7 @@ function isOpenIdConfigResponse(response) {
1113
1126
  response.hasOwnProperty("jwks_uri"));
1114
1127
  }
1115
1128
 
1116
- /*! @azure/msal-common v16.12.0 2026-08-04 */
1129
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
1117
1130
  /*
1118
1131
  * Copyright (c) Microsoft Corporation. All rights reserved.
1119
1132
  * Licensed under the MIT License.
@@ -1193,7 +1206,7 @@ class StringUtils {
1193
1206
  }
1194
1207
  }
1195
1208
 
1196
- /*! @azure/msal-common v16.12.0 2026-08-04 */
1209
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
1197
1210
 
1198
1211
  /*
1199
1212
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1351,7 +1364,7 @@ class UrlString {
1351
1364
  }
1352
1365
  }
1353
1366
 
1354
- /*! @azure/msal-common v16.12.0 2026-08-04 */
1367
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
1355
1368
 
1356
1369
  /*
1357
1370
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1360,10 +1373,7 @@ class UrlString {
1360
1373
  // Build endpoint metadata dynamically to avoid string duplication
1361
1374
  const endpointHosts = [
1362
1375
  { host: "login.microsoftonline.com" },
1363
- {
1364
- host: "login.chinacloudapi.cn",
1365
- issuerHost: "login.partner.microsoftonline.cn", // Issuer differs
1366
- },
1376
+ { host: "login.partner.microsoftonline.cn" },
1367
1377
  { host: "login.microsoftonline.us" },
1368
1378
  { host: "login.sovcloud-identity.fr" },
1369
1379
  { host: "login.sovcloud-identity.de" },
@@ -1437,15 +1447,6 @@ const rawMetdataJSON = {
1437
1447
  preferred_cache: "login.sovcloud-identity.sg",
1438
1448
  aliases: ["login.sovcloud-identity.sg"],
1439
1449
  },
1440
- {
1441
- preferred_network: "login.windows-ppe.net",
1442
- preferred_cache: "login.windows-ppe.net",
1443
- aliases: [
1444
- "login.windows-ppe.net",
1445
- "sts.windows-ppe.net",
1446
- "login.microsoft-ppe.com",
1447
- ],
1448
- },
1449
1450
  ],
1450
1451
  },
1451
1452
  };
@@ -1517,7 +1518,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
1517
1518
  return null;
1518
1519
  }
1519
1520
 
1520
- /*! @azure/msal-common v16.12.0 2026-08-04 */
1521
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
1521
1522
  /*
1522
1523
  * Copyright (c) Microsoft Corporation. All rights reserved.
1523
1524
  * Licensed under the MIT License.
@@ -1527,8 +1528,6 @@ const AzureCloudInstance = {
1527
1528
  None: "none",
1528
1529
  // Microsoft Azure public cloud
1529
1530
  AzurePublic: "https://login.microsoftonline.com",
1530
- // Microsoft PPE
1531
- AzurePpe: "https://login.windows-ppe.net",
1532
1531
  // Microsoft Chinese national/regional cloud
1533
1532
  AzureChina: "https://login.chinacloudapi.cn",
1534
1533
  // Microsoft German national/regional cloud ("Black Forest")
@@ -1537,7 +1536,7 @@ const AzureCloudInstance = {
1537
1536
  AzureUsGovernment: "https://login.microsoftonline.us",
1538
1537
  };
1539
1538
 
1540
- /*! @azure/msal-common v16.12.0 2026-08-04 */
1539
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
1541
1540
  /*
1542
1541
  * Copyright (c) Microsoft Corporation. All rights reserved.
1543
1542
  * Licensed under the MIT License.
@@ -1547,7 +1546,7 @@ function isCloudInstanceDiscoveryResponse(response) {
1547
1546
  response.hasOwnProperty("metadata"));
1548
1547
  }
1549
1548
 
1550
- /*! @azure/msal-common v16.12.0 2026-08-04 */
1549
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
1551
1550
  /*
1552
1551
  * Copyright (c) Microsoft Corporation. All rights reserved.
1553
1552
  * Licensed under the MIT License.
@@ -1557,7 +1556,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
1557
1556
  response.hasOwnProperty("error_description"));
1558
1557
  }
1559
1558
 
1560
- /*! @azure/msal-common v16.12.0 2026-08-04 */
1559
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
1561
1560
  /*
1562
1561
  * Copyright (c) Microsoft Corporation. All rights reserved.
1563
1562
  * Licensed under the MIT License.
@@ -1619,7 +1618,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
1619
1618
  */
1620
1619
  const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
1621
1620
 
1622
- /*! @azure/msal-common v16.12.0 2026-08-04 */
1621
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
1623
1622
  /*
1624
1623
  * Copyright (c) Microsoft Corporation. All rights reserved.
1625
1624
  * Licensed under the MIT License.
@@ -1712,7 +1711,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
1712
1711
  };
1713
1712
  };
1714
1713
 
1715
- /*! @azure/msal-common v16.12.0 2026-08-04 */
1714
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
1716
1715
 
1717
1716
  /*
1718
1717
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1823,7 +1822,7 @@ RegionDiscovery.IMDS_OPTIONS = {
1823
1822
  },
1824
1823
  };
1825
1824
 
1826
- /*! @azure/msal-common v16.12.0 2026-08-04 */
1825
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
1827
1826
  /*
1828
1827
  * Copyright (c) Microsoft Corporation. All rights reserved.
1829
1828
  * Licensed under the MIT License.
@@ -1878,7 +1877,7 @@ function delay(t, value) {
1878
1877
  return new Promise((resolve) => setTimeout(() => resolve(value), t));
1879
1878
  }
1880
1879
 
1881
- /*! @azure/msal-common v16.12.0 2026-08-04 */
1880
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
1882
1881
 
1883
1882
  /*
1884
1883
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1935,6 +1934,7 @@ function createAccessTokenEntity(homeAccountId, environment, accessToken, client
1935
1934
  if (refreshOn) {
1936
1935
  atEntity.refreshOn = refreshOn.toString();
1937
1936
  }
1937
+ const normalizedTokenType = atEntity.tokenType?.toLowerCase();
1938
1938
  /*
1939
1939
  * Create Access Token With Auth Scheme instead of regular access token
1940
1940
  * Cast to lower to handle "bearer" from ADFS
@@ -1943,7 +1943,7 @@ function createAccessTokenEntity(homeAccountId, environment, accessToken, client
1943
1943
  AuthenticationScheme.BEARER.toLowerCase()) {
1944
1944
  atEntity.credentialType =
1945
1945
  CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME;
1946
- switch (atEntity.tokenType) {
1946
+ switch (normalizedTokenType) {
1947
1947
  case AuthenticationScheme.POP:
1948
1948
  // Make sure keyId is present and add it to credential
1949
1949
  const tokenClaims = extractTokenClaims(accessToken, base64Decode, correlationId);
@@ -1952,6 +1952,12 @@ function createAccessTokenEntity(homeAccountId, environment, accessToken, client
1952
1952
  }
1953
1953
  atEntity.keyId = tokenClaims.cnf.kid;
1954
1954
  break;
1955
+ case "dpop":
1956
+ if (!keyId) {
1957
+ throw createClientAuthError(keyIdMissing, correlationId);
1958
+ }
1959
+ atEntity.keyId = keyId;
1960
+ break;
1955
1961
  case AuthenticationScheme.SSH:
1956
1962
  atEntity.keyId = keyId;
1957
1963
  }
@@ -2158,7 +2164,7 @@ function serializeAttributeTokens(attributeTokens) {
2158
2164
  return [...attributeTokens].sort().join(" ");
2159
2165
  }
2160
2166
 
2161
- /*! @azure/msal-common v16.12.0 2026-08-04 */
2167
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
2162
2168
 
2163
2169
  /*
2164
2170
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2202,8 +2208,6 @@ class Authority {
2202
2208
  switch (pathSegments[0].toLowerCase()) {
2203
2209
  case ADFS:
2204
2210
  return AuthorityType.Adfs;
2205
- case DSTS:
2206
- return AuthorityType.Dsts;
2207
2211
  }
2208
2212
  }
2209
2213
  return AuthorityType.Default;
@@ -3128,7 +3132,7 @@ function buildStaticAuthorityOptions(authOptions) {
3128
3132
  };
3129
3133
  }
3130
3134
 
3131
- /*! @azure/msal-common v16.12.0 2026-08-04 */
3135
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
3132
3136
 
3133
3137
  /*
3134
3138
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3162,7 +3166,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
3162
3166
  }
3163
3167
  }
3164
3168
 
3165
- /*! @azure/msal-common v16.12.0 2026-08-04 */
3169
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
3166
3170
 
3167
3171
  /*
3168
3172
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3358,7 +3362,7 @@ class ScopeSet {
3358
3362
  }
3359
3363
  }
3360
3364
 
3361
- /*! @azure/msal-common v16.12.0 2026-08-04 */
3365
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
3362
3366
 
3363
3367
  /*
3364
3368
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3667,11 +3671,15 @@ function addExtraParameters(parameters, extraParams) {
3667
3671
  }
3668
3672
  /**
3669
3673
  * Default optional idToken claims requested on all auth requests.
3670
- * signin_state enables KMSI detection; login_hint enables login hint propagation.
3674
+ * signin_state enables KMSI detection; login_hint enables login hint propagation;
3675
+ * tenant_region_sub_scope identifies the sovereign enclave a tenant belongs to.
3671
3676
  */
3672
3677
  const DEFAULT_ID_TOKEN_CLAIMS = {
3673
3678
  [ClaimsRequestKeys.SIGNIN_STATE]: { essential: false },
3674
3679
  [ClaimsRequestKeys.LOGIN_HINT]: { essential: false },
3680
+ [ClaimsRequestKeys.TENANT_REGION_SUB_SCOPE]: {
3681
+ essential: false,
3682
+ },
3675
3683
  };
3676
3684
  /**
3677
3685
  * Parses a claims JSON string into an object, throwing a ClientConfigurationError
@@ -3690,7 +3698,7 @@ function parseClaims(claims, correlationId = "") {
3690
3698
  // Malformed JSON
3691
3699
  throw createClientConfigurationError(invalidClaims, correlationId);
3692
3700
  }
3693
- if (!isPlainObject(parsed)) {
3701
+ if (!isPlainObject$1(parsed)) {
3694
3702
  // Valid JSON, but not an object (e.g. an array, a scalar, or the literal `null`).
3695
3703
  throw createClientConfigurationError(invalidClaims, correlationId);
3696
3704
  }
@@ -3701,7 +3709,7 @@ function parseClaims(claims, correlationId = "") {
3701
3709
  * @param value - The value to test
3702
3710
  * @returns True when value is a plain object that can be deep-merged
3703
3711
  */
3704
- function isPlainObject(value) {
3712
+ function isPlainObject$1(value) {
3705
3713
  return typeof value === "object" && value !== null && !Array.isArray(value);
3706
3714
  }
3707
3715
  /**
@@ -3718,7 +3726,7 @@ function deepMergeClaims(baseClaims, claimsToMerge) {
3718
3726
  const merged = { ...baseClaims };
3719
3727
  for (const [key, mergeInValue] of Object.entries(claimsToMerge)) {
3720
3728
  const baseValue = merged[key];
3721
- if (isPlainObject(baseValue) && isPlainObject(mergeInValue)) {
3729
+ if (isPlainObject$1(baseValue) && isPlainObject$1(mergeInValue)) {
3722
3730
  merged[key] = deepMergeClaims(baseValue, mergeInValue);
3723
3731
  }
3724
3732
  else {
@@ -3730,8 +3738,8 @@ function deepMergeClaims(baseClaims, claimsToMerge) {
3730
3738
  /**
3731
3739
  * Parses claims JSON, optionally deep-merges a second client-originated claims string
3732
3740
  * (`claimsToMerge`, e.g. `claimsFromClient`) with precedence on conflicting keys, merges
3733
- * default optional idToken claims (signin_state, login_hint), and appends client
3734
- * capabilities (xms_cc) to the access_token section.
3741
+ * default optional idToken claims (signin_state, login_hint, tenant_region_sub_scope), and appends client
3742
+ * capabilities (xms_cc) to the access_token section
3735
3743
  * Does not overwrite idToken claims already specified by the caller.
3736
3744
  * @param claims - Existing claims JSON string from the request (may be undefined)
3737
3745
  * @param clientCapabilities - Client capabilities array from configuration
@@ -3858,7 +3866,7 @@ function addAttributeTokens(parameters, attributeTokens) {
3858
3866
  }
3859
3867
  }
3860
3868
 
3861
- /*! @azure/msal-common v16.12.0 2026-08-04 */
3869
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
3862
3870
 
3863
3871
  /*
3864
3872
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3916,12 +3924,20 @@ function mapToQueryString(parameters) {
3916
3924
  return queryParameterArray.join("&");
3917
3925
  }
3918
3926
 
3919
- /*! @azure/msal-common v16.12.0 2026-08-04 */
3927
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
3920
3928
 
3921
3929
  /*
3922
3930
  * Copyright (c) Microsoft Corporation. All rights reserved.
3923
3931
  * Licensed under the MIT License.
3924
3932
  */
3933
+ /**
3934
+ * Shared JOSE algorithm literals used by MSAL package internals.
3935
+ * @internal
3936
+ */
3937
+ const JsonWebTokenAlgorithms = {
3938
+ ES256: "ES256",
3939
+ RS256: "RS256",
3940
+ };
3925
3941
  /**
3926
3942
  * Default crypto implementation used when a platform-specific implementation has
3927
3943
  * not been provided.
@@ -3942,24 +3958,44 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
3942
3958
  encodeKid: () => {
3943
3959
  throw createClientAuthError(methodNotImplemented, "");
3944
3960
  },
3945
- async getPublicKeyThumbprint() {
3946
- throw createClientAuthError(methodNotImplemented, "");
3947
- },
3948
- async removeTokenBindingKey() {
3949
- throw createClientAuthError(methodNotImplemented, "");
3961
+ async removeTokenBindingKey(kid, correlationId) {
3962
+ throw createClientAuthError(methodNotImplemented, correlationId);
3950
3963
  },
3951
- async clearKeystore() {
3952
- throw createClientAuthError(methodNotImplemented, "");
3964
+ async clearKeystore(correlationId) {
3965
+ throw createClientAuthError(methodNotImplemented, correlationId);
3953
3966
  },
3954
- async signJwt() {
3955
- throw createClientAuthError(methodNotImplemented, "");
3967
+ async signTokenBindingJwt(header, payload, kid, correlationId) {
3968
+ throw createClientAuthError(methodNotImplemented, correlationId);
3956
3969
  },
3957
3970
  async hashString() {
3958
3971
  throw createClientAuthError(methodNotImplemented, "");
3959
3972
  },
3960
3973
  };
3961
3974
 
3962
- /*! @azure/msal-common v16.12.0 2026-08-04 */
3975
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
3976
+
3977
+ /*
3978
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3979
+ * Licensed under the MIT License.
3980
+ */
3981
+ /**
3982
+ * Default token-binding key manager used when a platform-specific implementation
3983
+ * has not been provided.
3984
+ * @internal
3985
+ */
3986
+ const DEFAULT_TOKEN_BINDING_KEY_MANAGER = {
3987
+ async provisionTokenBindingKey(request) {
3988
+ throw createClientAuthError(methodNotImplemented, request.correlationId);
3989
+ },
3990
+ async removeTokenBindingKey(_kid, correlationId) {
3991
+ throw createClientAuthError(methodNotImplemented, correlationId);
3992
+ },
3993
+ async getTokenBindingPublicKeyJwk(_kid, correlationId) {
3994
+ throw createClientAuthError(methodNotImplemented, correlationId);
3995
+ },
3996
+ };
3997
+
3998
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
3963
3999
  /*
3964
4000
  * Copyright (c) Microsoft Corporation. All rights reserved.
3965
4001
  * Licensed under the MIT License.
@@ -4234,12 +4270,12 @@ class Logger {
4234
4270
  }
4235
4271
  }
4236
4272
 
4237
- /*! @azure/msal-common v16.12.0 2026-08-04 */
4273
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
4238
4274
  /* eslint-disable header/header */
4239
4275
  const name$1 = "@azure/msal-common";
4240
- const version$1 = "16.12.0";
4276
+ const version$1 = "16.14.0";
4241
4277
 
4242
- /*! @azure/msal-common v16.12.0 2026-08-04 */
4278
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
4243
4279
  /*
4244
4280
  * Copyright (c) Microsoft Corporation. All rights reserved.
4245
4281
  * Licensed under the MIT License.
@@ -4247,7 +4283,7 @@ const version$1 = "16.12.0";
4247
4283
  const cacheQuotaExceeded = "cache_quota_exceeded";
4248
4284
  const cacheErrorUnknown = "cache_error_unknown";
4249
4285
 
4250
- /*! @azure/msal-common v16.12.0 2026-08-04 */
4286
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
4251
4287
 
4252
4288
  /*
4253
4289
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4285,7 +4321,7 @@ function createCacheError(e) {
4285
4321
  }
4286
4322
  }
4287
4323
 
4288
- /*! @azure/msal-common v16.12.0 2026-08-04 */
4324
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
4289
4325
 
4290
4326
  /*
4291
4327
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4296,9 +4332,10 @@ function createCacheError(e) {
4296
4332
  * @internal
4297
4333
  */
4298
4334
  class CacheManager {
4299
- constructor(clientId, cryptoImpl, logger, performanceClient, staticAuthorityOptions) {
4335
+ constructor(clientId, cryptoImpl, logger, performanceClient, staticAuthorityOptions, tokenBindingKeyManager) {
4300
4336
  this.clientId = clientId;
4301
4337
  this.cryptoImpl = cryptoImpl;
4338
+ this.tokenBindingKeyManager = tokenBindingKeyManager;
4302
4339
  this.commonLogger = logger.clone(name$1, version$1);
4303
4340
  this.staticAuthorityOptions = staticAuthorityOptions;
4304
4341
  this.performanceClient = performanceClient;
@@ -4646,16 +4683,9 @@ class CacheManager {
4646
4683
  // Access Token with Auth Scheme specific matching
4647
4684
  if (entity.credentialType ===
4648
4685
  CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME) {
4649
- if (!!filter.tokenType &&
4650
- !this.matchTokenType(entity, filter.tokenType)) {
4686
+ if (!this.matchAccessTokenWithAuthScheme(entity, filter)) {
4651
4687
  return false;
4652
4688
  }
4653
- // KeyId (sshKid) in request must match cached SSH certificate keyId because SSH cert is bound to a specific key
4654
- if (filter.tokenType === AuthenticationScheme.SSH) {
4655
- if (filter.keyId && !this.matchKeyId(entity, filter.keyId)) {
4656
- return false;
4657
- }
4658
- }
4659
4689
  }
4660
4690
  // Additional cache key components matching (bidirectional isolation)
4661
4691
  const entityComponents = entity.additionalCacheKeyComponents;
@@ -4794,19 +4824,24 @@ class CacheManager {
4794
4824
  }
4795
4825
  this.removeItem(key, correlationId);
4796
4826
  this.performanceClient.incrementFields({ accessTokensRemoved: 1 }, correlationId);
4797
- // Remove Token Binding Key from key store for PoP Tokens Credentials
4827
+ // Remove Token Binding Key from key store for token-bound access token credentials
4798
4828
  if (credential.credentialType.toLowerCase() ===
4799
4829
  CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) {
4800
- if (credential.tokenType === AuthenticationScheme.POP) {
4801
- const accessTokenWithAuthSchemeEntity = credential;
4802
- const kid = accessTokenWithAuthSchemeEntity.keyId;
4803
- if (kid) {
4804
- void this.cryptoImpl
4805
- .removeTokenBindingKey(kid, correlationId)
4806
- .catch(() => {
4807
- this.commonLogger.error(`Failed to remove token binding key '${kid}'`, correlationId);
4808
- this.performanceClient?.incrementFields({ removeTokenBindingKeyFailure: 1 }, correlationId);
4809
- });
4830
+ const tokenType = credential.tokenType?.toLowerCase();
4831
+ switch (tokenType) {
4832
+ case AuthenticationScheme.POP:
4833
+ case AuthenticationScheme.DPOP.toLowerCase(): {
4834
+ const accessTokenWithAuthSchemeEntity = credential;
4835
+ const kid = accessTokenWithAuthSchemeEntity.keyId;
4836
+ if (kid) {
4837
+ void this.tokenBindingKeyManager
4838
+ .removeTokenBindingKey(kid, correlationId)
4839
+ .catch(() => {
4840
+ this.commonLogger.error("Failed to remove token binding key", correlationId);
4841
+ this.performanceClient?.incrementFields({ removeTokenBindingKeyFailure: 1 }, correlationId);
4842
+ });
4843
+ }
4844
+ break;
4810
4845
  }
4811
4846
  }
4812
4847
  }
@@ -4971,7 +5006,9 @@ class CacheManager {
4971
5006
  realm: targetRealm || account.tenantId,
4972
5007
  target: scopes,
4973
5008
  tokenType: authScheme,
4974
- keyId: request.sshKid,
5009
+ keyId: authScheme === AuthenticationScheme.SSH
5010
+ ? request.sshKid
5011
+ : undefined,
4975
5012
  additionalCacheKeyComponents: additionalCacheKeyComponents,
4976
5013
  };
4977
5014
  const accessTokenKeys = (tokenKeys && tokenKeys.accessToken) ||
@@ -5333,7 +5370,28 @@ class CacheManager {
5333
5370
  * @param tokenType
5334
5371
  */
5335
5372
  matchTokenType(entity, tokenType) {
5336
- return !!(entity.tokenType && entity.tokenType === tokenType);
5373
+ return !!(entity.tokenType &&
5374
+ entity.tokenType.toLowerCase() === tokenType.toLowerCase());
5375
+ }
5376
+ matchAccessTokenWithAuthScheme(entity, filter) {
5377
+ const normalizedFilterTokenType = filter.tokenType?.toLowerCase();
5378
+ if (!!filter.tokenType &&
5379
+ !this.matchTokenType(entity, filter.tokenType)) {
5380
+ return false;
5381
+ }
5382
+ switch (normalizedFilterTokenType) {
5383
+ case "dpop":
5384
+ case AuthenticationScheme.SSH:
5385
+ return this.matchKeyBoundAccessToken(entity, filter);
5386
+ default:
5387
+ return true;
5388
+ }
5389
+ }
5390
+ matchKeyBoundAccessToken(entity, filter) {
5391
+ if (!filter.keyId) {
5392
+ return true;
5393
+ }
5394
+ return this.matchKeyId(entity, filter.keyId);
5337
5395
  }
5338
5396
  /**
5339
5397
  * Returns true if the credential's keyId matches the one in the request, false otherwise
@@ -5450,7 +5508,7 @@ class DefaultStorageClass extends CacheManager {
5450
5508
  }
5451
5509
  }
5452
5510
 
5453
- /*! @azure/msal-common v16.12.0 2026-08-04 */
5511
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
5454
5512
  /*
5455
5513
  * Copyright (c) Microsoft Corporation. All rights reserved.
5456
5514
  * Licensed under the MIT License.
@@ -5464,7 +5522,7 @@ class DefaultStorageClass extends CacheManager {
5464
5522
  const PerformanceEventStatus = {
5465
5523
  InProgress: 1};
5466
5524
 
5467
- /*! @azure/msal-common v16.12.0 2026-08-04 */
5525
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
5468
5526
 
5469
5527
  /*
5470
5528
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5522,7 +5580,7 @@ class StubPerformanceClient {
5522
5580
  }
5523
5581
  }
5524
5582
 
5525
- /*! @azure/msal-common v16.12.0 2026-08-04 */
5583
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
5526
5584
 
5527
5585
  /*
5528
5586
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5576,19 +5634,21 @@ const DEFAULT_TELEMETRY_OPTIONS$1 = {
5576
5634
  * @returns Configuration
5577
5635
  * @internal
5578
5636
  */
5579
- function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }) {
5637
+ function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, tokenBindingKeyManager: tokenBindingKeyManager, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }) {
5580
5638
  const loggerOptions = {
5581
5639
  ...DEFAULT_LOGGER_IMPLEMENTATION,
5582
5640
  ...userLoggerOption,
5583
5641
  };
5642
+ const resolvedTokenBindingKeyManager = tokenBindingKeyManager || DEFAULT_TOKEN_BINDING_KEY_MANAGER;
5584
5643
  return {
5585
5644
  authOptions: buildAuthOptions(userAuthOptions),
5586
5645
  systemOptions: { ...DEFAULT_SYSTEM_OPTIONS$1, ...userSystemOptions },
5587
5646
  loggerOptions: loggerOptions,
5588
5647
  storageInterface: storageImplementation ||
5589
- new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions, name$1, version$1), new StubPerformanceClient()),
5648
+ new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions, name$1, version$1), new StubPerformanceClient(), undefined, resolvedTokenBindingKeyManager),
5590
5649
  networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,
5591
5650
  cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION,
5651
+ tokenBindingKeyManager: resolvedTokenBindingKeyManager,
5592
5652
  clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS,
5593
5653
  libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo },
5594
5654
  telemetry: { ...DEFAULT_TELEMETRY_OPTIONS$1, ...telemetry },
@@ -5618,7 +5678,7 @@ function isOidcProtocolMode(config) {
5618
5678
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
5619
5679
  }
5620
5680
 
5621
- /*! @azure/msal-common v16.12.0 2026-08-04 */
5681
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
5622
5682
  /*
5623
5683
  * Copyright (c) Microsoft Corporation. All rights reserved.
5624
5684
  * Licensed under the MIT License.
@@ -5645,7 +5705,129 @@ function isOidcProtocolMode(config) {
5645
5705
  }
5646
5706
  }
5647
5707
 
5648
- /*! @azure/msal-common v16.12.0 2026-08-04 */
5708
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
5709
+
5710
+ /*
5711
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5712
+ * Licensed under the MIT License.
5713
+ */
5714
+ /**
5715
+ * Error thrown when there is an error in the client code running on the browser.
5716
+ */
5717
+ class JoseHeaderError extends AuthError {
5718
+ constructor(errorCode, correlationId, errorMessage) {
5719
+ super(errorCode, correlationId, errorMessage);
5720
+ this.name = "JoseHeaderError";
5721
+ Object.setPrototypeOf(this, JoseHeaderError.prototype);
5722
+ }
5723
+ }
5724
+ /** Returns JoseHeaderError object */
5725
+ function createJoseHeaderError(code, correlationId) {
5726
+ return new JoseHeaderError(code, correlationId);
5727
+ }
5728
+
5729
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
5730
+ /*
5731
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5732
+ * Licensed under the MIT License.
5733
+ */
5734
+ /**
5735
+ * Checks whether a value is a plain JSON-like object.
5736
+ * Allows objects with null prototypes, but rejects arrays and object subclasses.
5737
+ */
5738
+ function isPlainObject(value) {
5739
+ if (typeof value !== "object" ||
5740
+ value === null ||
5741
+ Object.prototype.toString.call(value) !== "[object Object]") {
5742
+ return false;
5743
+ }
5744
+ if (Object.getPrototypeOf(value) === null) {
5745
+ return true;
5746
+ }
5747
+ let proto = value;
5748
+ while (Object.getPrototypeOf(proto) !== null) {
5749
+ proto = Object.getPrototypeOf(proto);
5750
+ }
5751
+ return Object.getPrototypeOf(value) === proto;
5752
+ }
5753
+
5754
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
5755
+ /*
5756
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5757
+ * Licensed under the MIT License.
5758
+ */
5759
+ const missingKidError = "missing_kid_error";
5760
+ const missingAlgError = "missing_alg_error";
5761
+ const missingJwkError = "missing_jwk_error";
5762
+ const invalidJwkError = "invalid_jwk_error";
5763
+
5764
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
5765
+
5766
+ /*
5767
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5768
+ * Licensed under the MIT License.
5769
+ */
5770
+ /** @internal */
5771
+ class JoseHeader {
5772
+ constructor(options, correlationId) {
5773
+ if (typeof options.alg !== "string" || !options.alg) {
5774
+ throw createJoseHeaderError(missingAlgError, correlationId);
5775
+ }
5776
+ this.typ = options.typ;
5777
+ this.alg = options.alg;
5778
+ this.kid = options.kid;
5779
+ this.jwk = options.jwk;
5780
+ }
5781
+ /**
5782
+ * Builds SignedHttpRequest formatted JOSE Header from the
5783
+ * JOSE Header options provided or previously set on the object.
5784
+ * Throws if keyId or algorithm aren't provided since they are required for Access Token Binding.
5785
+ * @param shrHeaderOptions
5786
+ * @param correlationId
5787
+ * @returns
5788
+ */
5789
+ static getShrHeader(shrHeaderOptions, correlationId) {
5790
+ // KeyID is required on the SHR header
5791
+ if (!shrHeaderOptions.kid) {
5792
+ throw createJoseHeaderError(missingKidError, correlationId);
5793
+ }
5794
+ // Alg is required on the SHR header
5795
+ if (!shrHeaderOptions.alg) {
5796
+ throw createJoseHeaderError(missingAlgError, correlationId);
5797
+ }
5798
+ return new JoseHeader({
5799
+ // Access Token PoP headers must have type pop, but the type header can be overriden for special cases
5800
+ typ: shrHeaderOptions.typ || JsonWebTokenTypes.Pop,
5801
+ kid: shrHeaderOptions.kid,
5802
+ alg: shrHeaderOptions.alg,
5803
+ }, correlationId);
5804
+ }
5805
+ /**
5806
+ * Builds a DPoP formatted JOSE Header from the JOSE Header options provided.
5807
+ * Throws if public JWK or algorithm aren't provided since they are required for DPoP.
5808
+ * @param dpopHeaderOptions
5809
+ * @param correlationId
5810
+ * @returns
5811
+ */
5812
+ static getDpopHeader(dpopHeaderOptions, correlationId) {
5813
+ if (!isPlainObject(dpopHeaderOptions.jwk)) {
5814
+ throw createJoseHeaderError(missingJwkError, correlationId);
5815
+ }
5816
+ if (!dpopHeaderOptions.alg) {
5817
+ throw createJoseHeaderError(missingAlgError, correlationId);
5818
+ }
5819
+ if (Object.keys(dpopHeaderOptions.jwk).length === 0) {
5820
+ throw createJoseHeaderError(invalidJwkError, correlationId);
5821
+ }
5822
+ return new JoseHeader({
5823
+ typ: JsonWebTokenTypes.Dpop,
5824
+ alg: dpopHeaderOptions.alg,
5825
+ jwk: dpopHeaderOptions.jwk,
5826
+ }, correlationId);
5827
+ }
5828
+ }
5829
+
5830
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
5649
5831
 
5650
5832
  /*
5651
5833
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5653,10 +5835,13 @@ function isOidcProtocolMode(config) {
5653
5835
  */
5654
5836
  const KeyLocation = {
5655
5837
  SW: "sw"};
5838
+ const SHR_TOKEN_BINDING_KEY_TYPE = "shr";
5839
+ const SHR_TOKEN_BINDING_KEY_ALGORITHM = JsonWebTokenAlgorithms.RS256;
5656
5840
  /** @internal */
5657
5841
  class PopTokenGenerator {
5658
- constructor(cryptoUtils, performanceClient) {
5842
+ constructor(cryptoUtils, tokenBindingKeyManager, performanceClient) {
5659
5843
  this.cryptoUtils = cryptoUtils;
5844
+ this.tokenBindingKeyManager = tokenBindingKeyManager;
5660
5845
  this.performanceClient = performanceClient;
5661
5846
  }
5662
5847
  /**
@@ -5679,7 +5864,11 @@ class PopTokenGenerator {
5679
5864
  * @returns
5680
5865
  */
5681
5866
  async generateKid(request) {
5682
- const kidThumbprint = await this.cryptoUtils.getPublicKeyThumbprint(request);
5867
+ const kidThumbprint = await this.tokenBindingKeyManager.provisionTokenBindingKey({
5868
+ correlationId: request.correlationId,
5869
+ tokenBindingKeyType: SHR_TOKEN_BINDING_KEY_TYPE,
5870
+ tokenBindingKeyAlgorithm: SHR_TOKEN_BINDING_KEY_ALGORITHM,
5871
+ });
5683
5872
  return {
5684
5873
  kid: kidThumbprint,
5685
5874
  xms_ksl: KeyLocation.SW,
@@ -5709,7 +5898,17 @@ class PopTokenGenerator {
5709
5898
  ? new UrlString(resourceRequestUri, request.correlationId)
5710
5899
  : undefined;
5711
5900
  const resourceUrlComponents = resourceUrlString?.getUrlComponents();
5712
- return this.cryptoUtils.signJwt({
5901
+ const publicKeyJwk = await this.tokenBindingKeyManager.getTokenBindingPublicKeyJwk(keyId, request.correlationId);
5902
+ const encodedKeyIdThumbprint = this.cryptoUtils.base64UrlEncode(JSON.stringify({ kid: keyId }));
5903
+ const shrAlgorithm = shrOptions?.header?.alg ||
5904
+ publicKeyJwk.alg ||
5905
+ SHR_TOKEN_BINDING_KEY_ALGORITHM;
5906
+ const shrHeader = JoseHeader.getShrHeader({
5907
+ ...shrOptions?.header,
5908
+ alg: shrAlgorithm,
5909
+ kid: encodedKeyIdThumbprint,
5910
+ }, request.correlationId);
5911
+ const shrPayload = {
5713
5912
  at: payload,
5714
5913
  ts: nowSeconds(),
5715
5914
  m: resourceRequestMethod?.toUpperCase(),
@@ -5721,11 +5920,160 @@ class PopTokenGenerator {
5721
5920
  : undefined,
5722
5921
  client_claims: shrClaims || undefined,
5723
5922
  ...claims,
5724
- }, keyId, shrOptions, request.correlationId);
5923
+ cnf: {
5924
+ jwk: publicKeyJwk,
5925
+ },
5926
+ };
5927
+ return this.cryptoUtils.signTokenBindingJwt(shrHeader, shrPayload, keyId, request.correlationId);
5725
5928
  }
5726
5929
  }
5727
5930
 
5728
- /*! @azure/msal-common v16.12.0 2026-08-04 */
5931
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
5932
+
5933
+ /*
5934
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5935
+ * Licensed under the MIT License.
5936
+ */
5937
+ const DPOP_HTM_REGEX = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
5938
+ const DPOP_TOKEN_BINDING_KEY_TYPE = "dpop";
5939
+ const DPOP_JWT_HEADER_ALGORITHM = JsonWebTokenAlgorithms.ES256;
5940
+ function buildProofHeader(publicJwk, correlationId) {
5941
+ return JoseHeader.getDpopHeader({
5942
+ alg: DPOP_JWT_HEADER_ALGORITHM,
5943
+ jwk: publicJwk,
5944
+ }, correlationId);
5945
+ }
5946
+ function normalizeHtm(htm, correlationId) {
5947
+ if (typeof htm !== "string" || !DPOP_HTM_REGEX.test(htm)) {
5948
+ throw createClientConfigurationError(invalidDpopHtm, correlationId);
5949
+ }
5950
+ return htm.toUpperCase();
5951
+ }
5952
+ /**
5953
+ * Normalizes a URL for use as the DPoP htu claim.
5954
+ * Per RFC 9449 §4.2, htu is the target URI without query and fragment components.
5955
+ * WHATWG URL serialization handles RFC 3986 syntax- and scheme-based normalization
5956
+ * such as lowercasing scheme/host and eliding default ports.
5957
+ */
5958
+ function normalizeHtu(url, correlationId) {
5959
+ let parsedUrl;
5960
+ try {
5961
+ parsedUrl = new URL(url);
5962
+ }
5963
+ catch {
5964
+ throw createClientConfigurationError(urlParseError, correlationId);
5965
+ }
5966
+ if (!/^https:\/\//i.test(url) ||
5967
+ parsedUrl.protocol !== "https:" ||
5968
+ parsedUrl.username ||
5969
+ parsedUrl.password) {
5970
+ throw createClientConfigurationError(invalidDpopHtu, correlationId);
5971
+ }
5972
+ parsedUrl.search = "";
5973
+ parsedUrl.hash = "";
5974
+ return parsedUrl.href;
5975
+ }
5976
+ function validateDpopNonce(nonce, correlationId) {
5977
+ if (nonce !== undefined && nonce.trim().length === 0) {
5978
+ throw createClientConfigurationError(invalidDpopNonce, correlationId);
5979
+ }
5980
+ }
5981
+ /**
5982
+ * Builds RFC 9449 DPoP proof JWT payloads for token-endpoint and
5983
+ * resource-endpoint proof bindings.
5984
+ *
5985
+ * Not exported from any public package entry point.
5986
+ * This helper is internal-only until DPoP is wired into acquisition flows
5987
+ * in a subsequent work item.
5988
+ *
5989
+ * DPoP proofs do not contain SHR fields (at, ts, m, u, p, q).
5990
+ * @internal
5991
+ */
5992
+ class DpopProofGenerator {
5993
+ constructor(cryptoUtils, tokenBindingKeyManager) {
5994
+ this.cryptoUtils = cryptoUtils;
5995
+ this.tokenBindingKeyManager = tokenBindingKeyManager;
5996
+ }
5997
+ /**
5998
+ * Provisions a fresh DPoP key and returns the RFC 7638 JWK thumbprint used
5999
+ * as `dpop_jkt`.
6000
+ */
6001
+ async generateJkt(correlationId = "") {
6002
+ return this.tokenBindingKeyManager.provisionTokenBindingKey({
6003
+ tokenBindingKeyType: DPOP_TOKEN_BINDING_KEY_TYPE,
6004
+ tokenBindingKeyAlgorithm: DPOP_JWT_HEADER_ALGORITHM,
6005
+ correlationId,
6006
+ });
6007
+ }
6008
+ /**
6009
+ * Builds RFC 9449 claims for a token-endpoint DPoP proof.
6010
+ * - htm is always "POST" because token endpoint requests use HTTP POST (RFC 9449 §5).
6011
+ * - htu is the normalized token endpoint URI (query and fragment stripped).
6012
+ * - jti is a fresh CSPRNG-backed unique identifier for every proof.
6013
+ */
6014
+ buildTokenProofClaims(params, correlationId = "") {
6015
+ validateDpopNonce(params.nonce, correlationId);
6016
+ const claims = {
6017
+ jti: this.cryptoUtils.createNewGuid(),
6018
+ htm: "POST",
6019
+ htu: normalizeHtu(params.tokenEndpoint, correlationId),
6020
+ iat: nowSeconds(),
6021
+ };
6022
+ if (params.nonce !== undefined) {
6023
+ claims.nonce = params.nonce;
6024
+ }
6025
+ return claims;
6026
+ }
6027
+ /**
6028
+ * Builds and signs a compact DPoP proof JWT for a token-endpoint request.
6029
+ */
6030
+ async generateTokenProof(params, keyId, correlationId = "") {
6031
+ return this.generateProof(this.buildTokenProofClaims(params, correlationId), keyId, correlationId);
6032
+ }
6033
+ /**
6034
+ * Builds RFC 9449 claims for a resource-endpoint DPoP proof.
6035
+ * - htm is uppercased per RFC 9449 §4.2.
6036
+ * - htu is the normalized resource URI (query and fragment stripped).
6037
+ * - ath is the base64url-encoded SHA-256 hash of the ASCII access token.
6038
+ * - jti is a fresh CSPRNG-backed unique identifier for every proof.
6039
+ */
6040
+ buildResourceProofClaims(params, correlationId = "") {
6041
+ validateDpopNonce(params.nonce, correlationId);
6042
+ const claims = {
6043
+ jti: this.cryptoUtils.createNewGuid(),
6044
+ htm: normalizeHtm(params.htm, correlationId),
6045
+ htu: normalizeHtu(params.htu, correlationId),
6046
+ ath: params.ath,
6047
+ iat: nowSeconds(),
6048
+ };
6049
+ if (params.nonce !== undefined) {
6050
+ claims.nonce = params.nonce;
6051
+ }
6052
+ return claims;
6053
+ }
6054
+ /**
6055
+ * Builds and signs a compact DPoP proof JWT for a resource request.
6056
+ */
6057
+ async generateResourceProof(params, keyId, correlationId = "") {
6058
+ const { htu, htm, nonce } = params;
6059
+ if (!htu || !htm) {
6060
+ throw createClientConfigurationError(dpopMissingResourceContext, correlationId);
6061
+ }
6062
+ const ath = await this.cryptoUtils.hashString(params.accessToken);
6063
+ return this.generateProof(this.buildResourceProofClaims({
6064
+ htu,
6065
+ htm,
6066
+ ath,
6067
+ nonce,
6068
+ }, correlationId), keyId, correlationId);
6069
+ }
6070
+ async generateProof(claims, keyId, correlationId) {
6071
+ const publicJwk = await this.tokenBindingKeyManager.getTokenBindingPublicKeyJwk(keyId, correlationId);
6072
+ return this.cryptoUtils.signTokenBindingJwt(buildProofHeader(publicJwk, correlationId), claims, keyId, correlationId);
6073
+ }
6074
+ }
6075
+
6076
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
5729
6077
  /*
5730
6078
  * Copyright (c) Microsoft Corporation. All rights reserved.
5731
6079
  * Licensed under the MIT License.
@@ -5789,7 +6137,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
5789
6137
  uiNotAllowed: uiNotAllowed
5790
6138
  });
5791
6139
 
5792
- /*! @azure/msal-common v16.12.0 2026-08-04 */
6140
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
5793
6141
 
5794
6142
  /*
5795
6143
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5856,7 +6204,7 @@ function createInteractionRequiredAuthError(errorCode, correlationId, errorMessa
5856
6204
  return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
5857
6205
  }
5858
6206
 
5859
- /*! @azure/msal-common v16.12.0 2026-08-04 */
6207
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
5860
6208
 
5861
6209
  /*
5862
6210
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5875,7 +6223,7 @@ class ServerError extends AuthError {
5875
6223
  }
5876
6224
  }
5877
6225
 
5878
- /*! @azure/msal-common v16.12.0 2026-08-04 */
6226
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
5879
6227
  /**
5880
6228
  * Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.
5881
6229
  * @param base64Decode
@@ -5908,7 +6256,7 @@ function parseRequestState(base64Decode, state, correlationId) {
5908
6256
  }
5909
6257
  }
5910
6258
 
5911
- /*! @azure/msal-common v16.12.0 2026-08-04 */
6259
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
5912
6260
 
5913
6261
  /*
5914
6262
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5919,10 +6267,11 @@ function parseRequestState(base64Decode, state, correlationId) {
5919
6267
  * @internal
5920
6268
  */
5921
6269
  class ResponseHandler {
5922
- constructor(clientId, cacheStorage, cryptoObj, logger, performanceClient, serializableCache, persistencePlugin) {
6270
+ constructor(clientId, cacheStorage, cryptoObj, logger, performanceClient, serializableCache, persistencePlugin, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER) {
5923
6271
  this.clientId = clientId;
5924
6272
  this.cacheStorage = cacheStorage;
5925
6273
  this.cryptoObj = cryptoObj;
6274
+ this.tokenBindingKeyManager = tokenBindingKeyManager;
5926
6275
  this.logger = logger;
5927
6276
  this.performanceClient = performanceClient;
5928
6277
  this.serializableCache = serializableCache;
@@ -5996,7 +6345,21 @@ class ResponseHandler {
5996
6345
  }
5997
6346
  // Add keyId from request to serverTokenResponse if defined
5998
6347
  serverTokenResponse.key_id =
5999
- serverTokenResponse.key_id || request.sshKid || undefined;
6348
+ serverTokenResponse.key_id ||
6349
+ request.dpopJkt ||
6350
+ request.sshKid ||
6351
+ undefined;
6352
+ if (request.authenticationScheme === AuthenticationScheme.DPOP) {
6353
+ if (serverTokenResponse.token_type?.toLowerCase() !==
6354
+ AuthenticationScheme.DPOP.toLowerCase()) {
6355
+ this.performanceClient?.addFields({
6356
+ dpopTokenTypeMismatch: serverTokenResponse.token_type,
6357
+ }, request.correlationId);
6358
+ throw createClientAuthError(dpopTokenTypeMismatch, request.correlationId);
6359
+ }
6360
+ serverTokenResponse.token_type =
6361
+ AuthenticationScheme.DPOP;
6362
+ }
6000
6363
  // Compute components once for entity storage (fallback if hash not provided by client)
6001
6364
  const attributeTokenPartition = serializeAttributeTokens(request.attributeTokens);
6002
6365
  const cacheKeyComponents = additionalCacheKeyComponents ??
@@ -6031,7 +6394,12 @@ class ResponseHandler {
6031
6394
  this.performanceClient?.addFields({
6032
6395
  acntLoggedOut: true,
6033
6396
  }, request.correlationId);
6034
- return await ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, this.performanceClient, idTokenClaims, requestStateObj, undefined, serverRequestId);
6397
+ return await ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, this.performanceClient, {
6398
+ idTokenClaims,
6399
+ requestState: requestStateObj,
6400
+ requestId: serverRequestId,
6401
+ tokenBindingKeyManager: this.tokenBindingKeyManager,
6402
+ });
6035
6403
  }
6036
6404
  }
6037
6405
  await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), apiId, request.storeInCache);
@@ -6044,7 +6412,13 @@ class ResponseHandler {
6044
6412
  await this.persistencePlugin.afterCacheAccess(cacheContext);
6045
6413
  }
6046
6414
  }
6047
- return ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, this.performanceClient, idTokenClaims, requestStateObj, serverTokenResponse, serverRequestId);
6415
+ return ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, this.performanceClient, {
6416
+ idTokenClaims,
6417
+ requestState: requestStateObj,
6418
+ serverTokenResponse,
6419
+ requestId: serverRequestId,
6420
+ tokenBindingKeyManager: this.tokenBindingKeyManager,
6421
+ });
6048
6422
  }
6049
6423
  /**
6050
6424
  * Generates CacheRecord
@@ -6140,14 +6514,17 @@ class ResponseHandler {
6140
6514
  * @param fromTokenCache
6141
6515
  * @param stateString
6142
6516
  */
6143
- static async generateAuthenticationResult(cryptoObj, authority, cacheRecord, fromTokenCache, request, performanceClient, idTokenClaims, requestState, serverTokenResponse, requestId) {
6517
+ static async generateAuthenticationResult(cryptoObj, authority, cacheRecord, fromTokenCache, request, performanceClient, options = {}) {
6518
+ const { idTokenClaims, requestState, serverTokenResponse, requestId, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER, } = options;
6144
6519
  let accessToken = "";
6145
6520
  let responseScopes = [];
6146
6521
  let expiresOn = null;
6147
6522
  let extExpiresOn;
6148
6523
  let refreshOn;
6149
6524
  let familyId = "";
6525
+ let dpopProof;
6150
6526
  if (cacheRecord.accessToken) {
6527
+ const accessTokenType = cacheRecord.accessToken.tokenType?.toLowerCase();
6151
6528
  /*
6152
6529
  * if the request object has `popKid` property, `signPopToken` will be set to false and
6153
6530
  * the token will be returned unsigned
@@ -6155,7 +6532,7 @@ class ResponseHandler {
6155
6532
  if (cacheRecord.accessToken.tokenType ===
6156
6533
  AuthenticationScheme.POP &&
6157
6534
  !request.popKid) {
6158
- const popTokenGenerator = new PopTokenGenerator(cryptoObj, performanceClient);
6535
+ const popTokenGenerator = new PopTokenGenerator(cryptoObj, tokenBindingKeyManager, performanceClient);
6159
6536
  const { secret, keyId } = cacheRecord.accessToken;
6160
6537
  if (!keyId) {
6161
6538
  throw createClientAuthError(keyIdMissing, request.correlationId);
@@ -6165,6 +6542,18 @@ class ResponseHandler {
6165
6542
  else {
6166
6543
  accessToken = cacheRecord.accessToken.secret;
6167
6544
  }
6545
+ if (accessTokenType ===
6546
+ AuthenticationScheme.DPOP.toLowerCase()) {
6547
+ if (!cacheRecord.accessToken.keyId) {
6548
+ throw createClientAuthError(keyIdMissing, request.correlationId);
6549
+ }
6550
+ const dpopProofGenerator = new DpopProofGenerator(cryptoObj, tokenBindingKeyManager);
6551
+ dpopProof = await dpopProofGenerator.generateResourceProof({
6552
+ htu: request.resourceRequestUri,
6553
+ htm: request.resourceRequestMethod,
6554
+ accessToken: cacheRecord.accessToken.secret,
6555
+ }, cacheRecord.accessToken.keyId, request.correlationId);
6556
+ }
6168
6557
  responseScopes = ScopeSet.fromString(cacheRecord.accessToken.target, request.correlationId).asArray();
6169
6558
  // Access token expiresOn cached in seconds, converting to Date for AuthenticationResult
6170
6559
  expiresOn = toDateFromSeconds(cacheRecord.accessToken.expiresOn);
@@ -6181,6 +6570,15 @@ class ResponseHandler {
6181
6570
  }
6182
6571
  const uid = idTokenClaims?.oid || idTokenClaims?.sub || "";
6183
6572
  const tid = idTokenClaims?.tid || "";
6573
+ /*
6574
+ * Surface the sovereign enclave for telemetry. This runs for both freshly acquired
6575
+ * and cache-served tokens because SilentFlowClient shares this method, so the field
6576
+ * is present on silent requests that never hit the network.
6577
+ */
6578
+ const regionSubScope = idTokenClaims?.tenant_region_sub_scope;
6579
+ if (typeof regionSubScope === "string") {
6580
+ performanceClient?.addFields({ regionSubScope }, request.correlationId);
6581
+ }
6184
6582
  // for hybrid + native bridge enablement, send back the native account Id
6185
6583
  if (serverTokenResponse?.spa_accountid && !!cacheRecord.account) {
6186
6584
  // Set on deprecated top-level for downgrade compat
@@ -6209,6 +6607,7 @@ class ResponseHandler {
6209
6607
  idToken: cacheRecord?.idToken?.secret || "",
6210
6608
  idTokenClaims: idTokenClaims || {},
6211
6609
  accessToken: accessToken,
6610
+ dpopProof,
6212
6611
  fromCache: fromTokenCache,
6213
6612
  expiresOn: expiresOn,
6214
6613
  extExpiresOn: extExpiresOn,
@@ -6216,7 +6615,10 @@ class ResponseHandler {
6216
6615
  correlationId: request.correlationId,
6217
6616
  requestId: requestId || "",
6218
6617
  familyId: familyId,
6219
- tokenType: cacheRecord.accessToken?.tokenType || "",
6618
+ tokenType: cacheRecord.accessToken?.tokenType?.toLowerCase() ===
6619
+ AuthenticationScheme.DPOP.toLowerCase()
6620
+ ? AuthenticationScheme.DPOP
6621
+ : cacheRecord.accessToken?.tokenType || "",
6220
6622
  state: requestState ? requestState.userRequestState : "",
6221
6623
  cloudGraphHostName: cacheRecord.account?.cloudGraphHostName || "",
6222
6624
  msGraphHost: cacheRecord.account?.msGraphHost || "",
@@ -6267,7 +6669,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
6267
6669
  return baseAccount;
6268
6670
  }
6269
6671
 
6270
- /*! @azure/msal-common v16.12.0 2026-08-04 */
6672
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
6271
6673
  /*
6272
6674
  * Copyright (c) Microsoft Corporation. All rights reserved.
6273
6675
  * Licensed under the MIT License.
@@ -6277,7 +6679,7 @@ const CcsCredentialType = {
6277
6679
  UPN: "UPN",
6278
6680
  };
6279
6681
 
6280
- /*! @azure/msal-common v16.12.0 2026-08-04 */
6682
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
6281
6683
  /*
6282
6684
  * Copyright (c) Microsoft Corporation. All rights reserved.
6283
6685
  * Licensed under the MIT License.
@@ -6296,7 +6698,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint, fmiP
6296
6698
  }
6297
6699
  }
6298
6700
 
6299
- /*! @azure/msal-common v16.12.0 2026-08-04 */
6701
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
6300
6702
 
6301
6703
  /*
6302
6704
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6320,7 +6722,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
6320
6722
  };
6321
6723
  }
6322
6724
 
6323
- /*! @azure/msal-common v16.12.0 2026-08-04 */
6725
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
6324
6726
 
6325
6727
  /*
6326
6728
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6406,7 +6808,7 @@ class ThrottlingUtils {
6406
6808
  }
6407
6809
  }
6408
6810
 
6409
- /*! @azure/msal-common v16.12.0 2026-08-04 */
6811
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
6410
6812
 
6411
6813
  /*
6412
6814
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6437,7 +6839,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
6437
6839
  return new NetworkError(error, httpStatus, responseHeaders);
6438
6840
  }
6439
6841
 
6440
- /*! @azure/msal-common v16.12.0 2026-08-04 */
6842
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
6441
6843
 
6442
6844
  /*
6443
6845
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6467,6 +6869,23 @@ function createTokenRequestHeaders(logger, preventCorsPreflight, ccsCred) {
6467
6869
  }
6468
6870
  return headers;
6469
6871
  }
6872
+ /**
6873
+ * Adds the DPoP proof header for token endpoint requests when DPoP is requested.
6874
+ * @internal
6875
+ */
6876
+ async function addDpopTokenProofHeader(headers, request, tokenEndpoint, cryptoUtils, tokenBindingKeyManager) {
6877
+ if (request.authenticationScheme !== AuthenticationScheme.DPOP) {
6878
+ return;
6879
+ }
6880
+ const dpopProofGenerator = new DpopProofGenerator(cryptoUtils, tokenBindingKeyManager);
6881
+ const keyId = request.dpopJkt;
6882
+ if (!keyId?.trim()) {
6883
+ throw createClientAuthError(keyIdMissing, request.correlationId);
6884
+ }
6885
+ headers[HeaderNames.DPOP] = await dpopProofGenerator.generateTokenProof({
6886
+ tokenEndpoint,
6887
+ }, keyId, request.correlationId);
6888
+ }
6470
6889
  /**
6471
6890
  * Creates query string for the /token request
6472
6891
  * @param request
@@ -6553,7 +6972,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
6553
6972
  return response;
6554
6973
  }
6555
6974
 
6556
- /*! @azure/msal-common v16.12.0 2026-08-04 */
6975
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
6557
6976
 
6558
6977
  /*
6559
6978
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6603,7 +7022,7 @@ class AuthorizationCodeClient {
6603
7022
  const response = await invokeAsync(this.executeTokenRequest.bind(this), AuthClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(this.authority, request, this.serverTelemetryManager);
6604
7023
  // Retrieve requestId from response headers
6605
7024
  const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
6606
- const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
7025
+ const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager);
6607
7026
  // Validate response. This function throws a server error if an error is returned by the server.
6608
7027
  responseHandler.validateTokenResponse(response.body, request.correlationId);
6609
7028
  return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, authCodePayload, undefined, undefined, undefined, requestId);
@@ -6645,6 +7064,7 @@ class AuthorizationCodeClient {
6645
7064
  }
6646
7065
  }
6647
7066
  const headers = createTokenRequestHeaders(this.logger, this.config.systemOptions.preventCorsPreflight, ccsCredential || request.ccsCredential);
7067
+ await addDpopTokenProofHeader(headers, request, endpoint, this.cryptoUtils, this.config.tokenBindingKeyManager);
6648
7068
  const thumbprint = getRequestThumbprint(this.config.authOptions.clientId, request);
6649
7069
  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);
6650
7070
  }
@@ -6704,7 +7124,7 @@ class AuthorizationCodeClient {
6704
7124
  addGrantType(parameters, GrantType.AUTHORIZATION_CODE_GRANT);
6705
7125
  addClientInfo(parameters);
6706
7126
  if (request.authenticationScheme === AuthenticationScheme.POP) {
6707
- const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient);
7127
+ const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.config.tokenBindingKeyManager, this.performanceClient);
6708
7128
  let reqCnfData;
6709
7129
  if (!request.popKid) {
6710
7130
  const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger);
@@ -6816,7 +7236,7 @@ class AuthorizationCodeClient {
6816
7236
  }
6817
7237
  }
6818
7238
 
6819
- /*! @azure/msal-common v16.12.0 2026-08-04 */
7239
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
6820
7240
 
6821
7241
  /*
6822
7242
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6967,7 +7387,7 @@ function extractLoginHint(account) {
6967
7387
  return account.loginHint || account.idTokenClaims?.login_hint || null;
6968
7388
  }
6969
7389
 
6970
- /*! @azure/msal-common v16.12.0 2026-08-04 */
7390
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
6971
7391
 
6972
7392
  /*
6973
7393
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7002,7 +7422,7 @@ class RefreshTokenClient {
7002
7422
  const response = await invokeAsync(this.executeTokenRequest.bind(this), RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority);
7003
7423
  // Retrieve requestId from response headers
7004
7424
  const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
7005
- const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
7425
+ const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager);
7006
7426
  responseHandler.validateTokenResponse(response.body, request.correlationId);
7007
7427
  return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, undefined, undefined, true, request.forceCache, requestId);
7008
7428
  }
@@ -7078,6 +7498,12 @@ class RefreshTokenClient {
7078
7498
  type: CcsCredentialType.HOME_ACCOUNT_ID,
7079
7499
  },
7080
7500
  };
7501
+ if (refreshTokenRequest.authenticationScheme ===
7502
+ AuthenticationScheme.DPOP &&
7503
+ !refreshTokenRequest.dpopJkt) {
7504
+ const dpopProofGenerator = new DpopProofGenerator(this.cryptoUtils, this.config.tokenBindingKeyManager);
7505
+ refreshTokenRequest.dpopJkt = await dpopProofGenerator.generateJkt(request.correlationId);
7506
+ }
7081
7507
  try {
7082
7508
  return await invokeAsync(this.acquireToken.bind(this), RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest, apiId);
7083
7509
  }
@@ -7103,6 +7529,7 @@ class RefreshTokenClient {
7103
7529
  const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString);
7104
7530
  const requestBody = await invokeAsync(this.createTokenRequestBody.bind(this), RefreshTokenClientCreateTokenRequestBody, this.logger, this.performanceClient, request.correlationId)(request);
7105
7531
  const headers = createTokenRequestHeaders(this.logger, this.config.systemOptions.preventCorsPreflight, request.ccsCredential);
7532
+ await addDpopTokenProofHeader(headers, request, endpoint, this.cryptoUtils, this.config.tokenBindingKeyManager);
7106
7533
  const thumbprint = getRequestThumbprint(this.config.authOptions.clientId, request);
7107
7534
  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);
7108
7535
  }
@@ -7143,7 +7570,7 @@ class RefreshTokenClient {
7143
7570
  addClientAssertionType(parameters, clientAssertion.assertionType);
7144
7571
  }
7145
7572
  if (request.authenticationScheme === AuthenticationScheme.POP) {
7146
- const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient);
7573
+ const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.config.tokenBindingKeyManager, this.performanceClient);
7147
7574
  let reqCnfData;
7148
7575
  if (!request.popKid) {
7149
7576
  const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger);
@@ -7194,7 +7621,7 @@ class RefreshTokenClient {
7194
7621
  }
7195
7622
  }
7196
7623
 
7197
- /*! @azure/msal-common v16.12.0 2026-08-04 */
7624
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
7198
7625
 
7199
7626
  /*
7200
7627
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7460,7 +7887,7 @@ class ServerTelemetryManager {
7460
7887
  }
7461
7888
  }
7462
7889
 
7463
- /*! @azure/msal-common v16.12.0 2026-08-04 */
7890
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
7464
7891
 
7465
7892
  /*
7466
7893
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7529,6 +7956,22 @@ class SilentFlowClient {
7529
7956
  lastCacheOutcome = CacheOutcome.PROACTIVELY_REFRESHED;
7530
7957
  // don't throw ClientAuthError.createRefreshRequiredError(), return cached token instead
7531
7958
  }
7959
+ const cachedAccessTokenType = cachedAccessToken.tokenType?.toLowerCase();
7960
+ if (cachedAccessTokenType === AuthenticationScheme.DPOP.toLowerCase()) {
7961
+ if (!cachedAccessToken.keyId) {
7962
+ this.logger.info("SilentFlowClient:acquireCachedToken - Cached DPoP access token is missing keyId; refresh required", request.correlationId);
7963
+ this.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN, request.correlationId);
7964
+ throw createClientAuthError(tokenRefreshRequired, request.correlationId);
7965
+ }
7966
+ try {
7967
+ await this.config.tokenBindingKeyManager.getTokenBindingPublicKeyJwk(cachedAccessToken.keyId, request.correlationId);
7968
+ }
7969
+ catch {
7970
+ this.logger.info("SilentFlowClient:acquireCachedToken - Local DPoP key was not found for cached access token; refresh required", request.correlationId);
7971
+ this.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN, request.correlationId);
7972
+ throw createClientAuthError(tokenRefreshRequired, request.correlationId);
7973
+ }
7974
+ }
7532
7975
  const environment = request.authority || this.authority.getPreferredCache();
7533
7976
  const cacheRecord = {
7534
7977
  account: this.cacheManager.getAccount(this.cacheManager.generateAccountKey(request.account), request.correlationId),
@@ -7564,11 +8007,14 @@ class SilentFlowClient {
7564
8007
  if (cacheRecord.idToken) {
7565
8008
  idTokenClaims = extractTokenClaims(cacheRecord.idToken.secret, this.config.cryptoInterface.base64Decode, request.correlationId);
7566
8009
  }
7567
- return ResponseHandler.generateAuthenticationResult(this.cryptoUtils, this.authority, cacheRecord, true, request, this.performanceClient, idTokenClaims);
8010
+ return ResponseHandler.generateAuthenticationResult(this.cryptoUtils, this.authority, cacheRecord, true, request, this.performanceClient, {
8011
+ idTokenClaims,
8012
+ tokenBindingKeyManager: this.config.tokenBindingKeyManager,
8013
+ });
7568
8014
  }
7569
8015
  }
7570
8016
 
7571
- /*! @azure/msal-common v16.12.0 2026-08-04 */
8017
+ /*! @azure/msal-common v16.14.0 2026-08-28 */
7572
8018
 
7573
8019
  /*
7574
8020
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8117,6 +8563,7 @@ const unableToCreateCloudShell = "unable_to_create_cloud_shell";
8117
8563
  const unableToCreateSource = "unable_to_create_source";
8118
8564
  const unableToReadSecretFile = "unable_to_read_secret_file";
8119
8565
  const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime";
8566
+ const userAssignedManagedIdentityNotConfirmed = "user_assigned_managed_identity_not_confirmed";
8120
8567
  const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing";
8121
8568
  const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format";
8122
8569
  const MsiEnvironmentVariableUrlMalformedErrorCodes = {
@@ -8154,8 +8601,9 @@ const ManagedIdentityErrorMessages = {
8154
8601
  [unableToCreateSource]: "Unable to create a Managed Identity source based on environment variables.",
8155
8602
  [unableToReadSecretFile]: "Unable to read the secret file.",
8156
8603
  [userAssignedNotAvailableAtRuntime]: "Service Fabric user assigned managed identity ClientId or ResourceId is not configurable at runtime.",
8157
- [wwwAuthenticateHeaderMissing]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is missing.",
8158
- [wwwAuthenticateHeaderUnsupportedFormat]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is in an unsupported format.",
8604
+ [userAssignedManagedIdentityNotConfirmed]: "Azure Arc did not confirm the requested user-assigned managed identity in the token response. The agent likely does not support user-assigned managed identity and returned the system-assigned identity.",
8605
+ [wwwAuthenticateHeaderMissing]: "A 401 response was received from the Azure Arc Managed Identity, but the www-authenticate header is missing.",
8606
+ [wwwAuthenticateHeaderUnsupportedFormat]: "A 401 response was received from the Azure Arc Managed Identity, but the www-authenticate header is in an unsupported format.",
8159
8607
  };
8160
8608
  class ManagedIdentityError extends AuthError {
8161
8609
  constructor(errorCode, correlationId) {
@@ -8612,30 +9060,30 @@ class CryptoProvider {
8612
9060
  generatePkceCodes() {
8613
9061
  return this.pkceGenerator.generatePkceCodes();
8614
9062
  }
8615
- /**
8616
- * Generates a keypair, stores it and returns a thumbprint - not yet implemented for node
8617
- */
8618
- getPublicKeyThumbprint() {
8619
- throw new Error("Method not implemented.");
8620
- }
8621
9063
  /**
8622
9064
  * Removes cryptographic keypair from key store matching the keyId passed in
8623
9065
  * @param kid - public key id
9066
+ * @param correlationId - correlation id
8624
9067
  */
8625
- removeTokenBindingKey() {
9068
+ removeTokenBindingKey(kid, correlationId) {
8626
9069
  throw new Error("Method not implemented.");
8627
9070
  }
8628
9071
  /**
8629
9072
  * Removes all cryptographic keys from Keystore
9073
+ * @param correlationId - correlation id
8630
9074
  */
8631
- clearKeystore() {
9075
+ clearKeystore(correlationId) {
8632
9076
  throw new Error("Method not implemented.");
8633
9077
  }
8634
9078
  /**
8635
- * Signs the given object as a jwt payload with private key retrieved by given kid - currently not implemented for node
9079
+ * Signs a compact JWT with a token-binding key - not yet implemented for node
9080
+ * @param header - JOSE header
9081
+ * @param payload - JWT payload
9082
+ * @param kid - public key id
9083
+ * @param correlationId - correlation id
8636
9084
  */
8637
- signJwt() {
8638
- throw new Error("Method not implemented.");
9085
+ signTokenBindingJwt(header, payload, kid, correlationId) {
9086
+ throw createClientAuthError(methodNotImplemented, correlationId);
8639
9087
  }
8640
9088
  /**
8641
9089
  * Returns the SHA-256 hash of an input string
@@ -8731,7 +9179,7 @@ function generateAccountKey(account) {
8731
9179
  */
8732
9180
  class NodeStorage extends CacheManager {
8733
9181
  constructor(logger, clientId, cryptoImpl, staticAuthorityOptions) {
8734
- super(clientId, cryptoImpl, logger, new StubPerformanceClient(), staticAuthorityOptions);
9182
+ super(clientId, cryptoImpl, logger, new StubPerformanceClient(), staticAuthorityOptions, DEFAULT_TOKEN_BINDING_KEY_MANAGER);
8735
9183
  this.cache = {};
8736
9184
  this.changeEmitters = [];
8737
9185
  this.logger = logger;
@@ -9596,7 +10044,7 @@ class ClientAssertion {
9596
10044
 
9597
10045
  /* eslint-disable header/header */
9598
10046
  const name = "@azure/msal-node";
9599
- const version = "5.5.0";
10047
+ const version = "6.0.0";
9600
10048
 
9601
10049
  /*
9602
10050
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9682,7 +10130,7 @@ class UsernamePasswordClient extends BaseClient {
9682
10130
  this.logger.info("in acquireToken call in username-password client", request.correlationId);
9683
10131
  const reqTimestamp = nowSeconds();
9684
10132
  const response = await this.executeTokenRequest(this.authority, request);
9685
- const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
10133
+ const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager);
9686
10134
  // Validate response. This function throws a server error if an error is returned by the server.
9687
10135
  responseHandler.validateTokenResponse(response.body, request.correlationId);
9688
10136
  const tokenResponse = responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, ApiId.acquireTokenByUsernamePassword);
@@ -9843,11 +10291,21 @@ class ClientApplication {
9843
10291
  */
9844
10292
  async acquireTokenByCode(request, authCodePayLoad) {
9845
10293
  this.logger.info("acquireTokenByCode called", request.correlationId || "");
9846
- if (request.state && authCodePayLoad) {
10294
+ let validatedAuthCodePayload = authCodePayLoad;
10295
+ if (request.state && validatedAuthCodePayload) {
9847
10296
  this.logger.info("acquireTokenByCode - validating state", request.correlationId || "");
9848
- this.validateState(request.state, authCodePayLoad.state || "", request.correlationId || "");
9849
- // eslint-disable-next-line no-param-reassign
9850
- authCodePayLoad = { ...authCodePayLoad, state: "" };
10297
+ this.validateState(request.state, validatedAuthCodePayload.state || "", request.correlationId || "");
10298
+ validatedAuthCodePayload = {
10299
+ ...validatedAuthCodePayload,
10300
+ state: "",
10301
+ };
10302
+ }
10303
+ if (request.nonce) {
10304
+ validatedAuthCodePayload = {
10305
+ ...validatedAuthCodePayload,
10306
+ code: request.code,
10307
+ nonce: request.nonce,
10308
+ };
9851
10309
  }
9852
10310
  const validRequest = {
9853
10311
  ...request,
@@ -9860,7 +10318,7 @@ class ClientApplication {
9860
10318
  const authClientConfig = await this.buildOauthClientConfiguration(discoveredAuthority, validRequest.correlationId, validRequest.redirectUri, serverTelemetryManager);
9861
10319
  const authorizationCodeClient = new AuthorizationCodeClient(authClientConfig, new StubPerformanceClient());
9862
10320
  this.logger.verbose("Auth code client created", validRequest.correlationId);
9863
- return await authorizationCodeClient.acquireToken(validRequest, ApiId.acquireTokenByCode, authCodePayLoad);
10321
+ return await authorizationCodeClient.acquireToken(validRequest, ApiId.acquireTokenByCode, validatedAuthCodePayload);
9864
10322
  }
9865
10323
  catch (e) {
9866
10324
  if (e instanceof AuthError) {
@@ -10343,7 +10801,7 @@ class DeviceCodeClient extends BaseClient {
10343
10801
  request.deviceCodeCallback(deviceCodeResponse);
10344
10802
  const reqTimestamp = nowSeconds();
10345
10803
  const response = await this.acquireTokenWithDeviceCode(request, deviceCodeResponse);
10346
- const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
10804
+ const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager);
10347
10805
  // Validate response. This function throws a server error if an error is returned by the server.
10348
10806
  responseHandler.validateTokenResponse(response, request.correlationId);
10349
10807
  return responseHandler.handleServerTokenResponse(response, this.authority, reqTimestamp, request, ApiId.acquireTokenByDeviceCode);
@@ -10613,10 +11071,7 @@ class PublicClientApplication extends ClientApplication {
10613
11071
  const correlationId = request.correlationId || this.cryptoProvider.createNewGuid();
10614
11072
  this.logger.trace("acquireTokenInteractive called", correlationId);
10615
11073
  enforceResourceParameter(this.config.auth.isMcp, request);
10616
- const { openBrowser, successTemplate, errorTemplate, windowHandle, loopbackClient: customLoopbackClient, preferredPort, ...remainingProperties } = request;
10617
- if (customLoopbackClient) {
10618
- this.logger.warning("The loopbackClient option is deprecated and will be removed in a future major version. Omit it to use the built-in loopback server, and set preferredPort when a fixed port is required.", correlationId);
10619
- }
11074
+ const { openBrowser, successTemplate, errorTemplate, windowHandle, preferredPort, ...remainingProperties } = request;
10620
11075
  if (this.nativeBrokerPlugin) {
10621
11076
  const brokerRequest = {
10622
11077
  ...remainingProperties,
@@ -10643,10 +11098,10 @@ class PublicClientApplication extends ClientApplication {
10643
11098
  request.redirectUri = "";
10644
11099
  }
10645
11100
  const { verifier, challenge } = await this.cryptoProvider.generatePkceCodes();
10646
- const loopbackClient = customLoopbackClient || new LoopbackClient(preferredPort);
11101
+ const loopbackClient = new LoopbackClient(preferredPort);
10647
11102
  // Validate and resolve responseMode
10648
11103
  const responseMode = remainingProperties.responseMode ??
10649
- ResponseMode$1.QUERY;
11104
+ ResponseMode$1.FORM_POST;
10650
11105
  if (responseMode !== ResponseMode$1.QUERY &&
10651
11106
  responseMode !== ResponseMode$1.FORM_POST) {
10652
11107
  throw createClientConfigurationError(invalidResponseMode, correlationId);
@@ -10781,7 +11236,7 @@ class PublicClientApplication extends ClientApplication {
10781
11236
  }
10782
11237
  /**
10783
11238
  * Attempts to retrieve the redirectUri from the loopback server. If the loopback server does not start listening for requests within the timeout this will throw.
10784
- * @param loopbackClient - developer provided custom loopback server implementation
11239
+ * @param loopbackClient - built-in loopback server implementation
10785
11240
  * @param correlationId - correlation id of the request
10786
11241
  * @returns
10787
11242
  */
@@ -10926,7 +11381,9 @@ class ClientCredentialClient extends BaseClient {
10926
11381
  accessToken: cachedAccessToken,
10927
11382
  refreshToken: null,
10928
11383
  appMetadata: null,
10929
- }, true, request, this.performanceClient),
11384
+ }, true, request, this.performanceClient, {
11385
+ tokenBindingKeyManager: this.config.tokenBindingKeyManager,
11386
+ }),
10930
11387
  lastCacheOutcome,
10931
11388
  ];
10932
11389
  }
@@ -10999,7 +11456,7 @@ class ClientCredentialClient extends BaseClient {
10999
11456
  serverTokenResponse = response.body;
11000
11457
  serverTokenResponse.status = response.status;
11001
11458
  }
11002
- const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
11459
+ const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager);
11003
11460
  responseHandler.validateTokenResponse(serverTokenResponse, request.correlationId, refreshAccessToken);
11004
11461
  const tokenResponse = await responseHandler.handleServerTokenResponse(serverTokenResponse, this.authority, reqTimestamp, request, ApiId.acquireTokenByClientCredential, undefined, // authCodePayload
11005
11462
  undefined, // userAssertionHash
@@ -11149,7 +11606,10 @@ class OnBehalfOfClient extends BaseClient {
11149
11606
  idToken: cachedIdToken,
11150
11607
  refreshToken: null,
11151
11608
  appMetadata: null,
11152
- }, true, request, this.performanceClient, idTokenClaims);
11609
+ }, true, request, this.performanceClient, {
11610
+ idTokenClaims,
11611
+ tokenBindingKeyManager: this.config.tokenBindingKeyManager,
11612
+ });
11153
11613
  }
11154
11614
  /**
11155
11615
  * read idtoken from cache, this is a specific implementation for OBO as the requirements differ from a generic lookup in the cacheManager
@@ -11229,7 +11689,7 @@ class OnBehalfOfClient extends BaseClient {
11229
11689
  };
11230
11690
  const reqTimestamp = nowSeconds();
11231
11691
  const response = await this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId);
11232
- const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
11692
+ const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager);
11233
11693
  responseHandler.validateTokenResponse(response.body, request.correlationId);
11234
11694
  const tokenResponse = await responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, ApiId.acquireTokenByOBO, undefined, // authCodePayload
11235
11695
  userAssertionHash, // userAssertionHash
@@ -11329,7 +11789,7 @@ class UserFederatedIdentityCredentialClient extends BaseClient {
11329
11789
  };
11330
11790
  const reqTimestamp = nowSeconds();
11331
11791
  const response = await this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId);
11332
- const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
11792
+ const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager);
11333
11793
  responseHandler.validateTokenResponse(response.body, request.correlationId);
11334
11794
  const tokenResponse = await responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, ApiId.acquireTokenByUserFederatedIdentityCredential);
11335
11795
  return tokenResponse;
@@ -12209,22 +12669,24 @@ class AzureArc extends BaseManagedIdentitySource {
12209
12669
  * Attempts to create an AzureArc managed identity source instance.
12210
12670
  *
12211
12671
  * Validates the Azure Arc environment by checking environment variables
12212
- * and performing file-based detection. It ensures that only system-assigned managed identities
12213
- * are supported for Azure Arc scenarios. The method performs comprehensive validation of
12214
- * endpoint URLs and logs detailed information about the detection process.
12672
+ * and performing file-based detection. Azure Arc supports both system-assigned and user-assigned
12673
+ * managed identities; when a user-assigned identity is requested, its selector is forwarded on the
12674
+ * request and validated against the token response echo (fail closed). The method performs
12675
+ * comprehensive validation of endpoint URLs and logs detailed information about the detection process.
12215
12676
  *
12216
12677
  * @param logger - Logger instance for capturing creation and validation steps
12217
12678
  * @param nodeStorage - Storage implementation for the managed identity source
12218
12679
  * @param networkClient - Network client for HTTP communication
12219
12680
  * @param cryptoProvider - Cryptographic operations provider
12220
12681
  * @param disableInternalRetries - Whether to disable automatic retry mechanisms
12221
- * @param managedIdentityId - The managed identity configuration, must be system-assigned
12682
+ * @param _managedIdentityId - Unused; Azure Arc now supports user-assigned identities, which are
12683
+ * forwarded on the request and validated against the token response echo (fail closed).
12222
12684
  *
12223
12685
  * @returns AzureArc instance if the environment supports Azure Arc managed identity, null otherwise
12224
- *
12225
- * @throws {ManagedIdentityError} When a user-assigned managed identity is specified (not supported for Azure Arc)
12226
12686
  */
12227
- static tryCreate(logger, nodeStorage, networkClient, cryptoProvider, disableInternalRetries, managedIdentityId) {
12687
+ static tryCreate(logger, nodeStorage, networkClient, cryptoProvider, disableInternalRetries,
12688
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
12689
+ _managedIdentityId) {
12228
12690
  const [identityEndpoint, imdsEndpoint] = AzureArc.getEnvironmentVariables();
12229
12691
  // if either of the identity or imds endpoints are undefined (even after himds file detection)
12230
12692
  if (!identityEndpoint || !imdsEndpoint) {
@@ -12245,9 +12707,6 @@ class AzureArc extends BaseManagedIdentitySource {
12245
12707
  AzureArc.getValidatedEnvVariableUrlString(ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT, imdsEndpoint, ManagedIdentitySourceNames.AZURE_ARC, logger);
12246
12708
  logger.info(`[Managed Identity] Environment variables validation passed for ${ManagedIdentitySourceNames.AZURE_ARC} managed identity. Endpoint URI: ${validatedIdentityEndpoint}. Creating ${ManagedIdentitySourceNames.AZURE_ARC} managed identity.`, "");
12247
12709
  }
12248
- if (managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED) {
12249
- throw createManagedIdentityError(unableToCreateAzureArc, "");
12250
- }
12251
12710
  return new AzureArc(logger, nodeStorage, networkClient, cryptoProvider, disableInternalRetries, identityEndpoint);
12252
12711
  }
12253
12712
  /**
@@ -12261,16 +12720,85 @@ class AzureArc extends BaseManagedIdentitySource {
12261
12720
  *
12262
12721
  * @returns A configured ManagedIdentityRequestParameters object ready for network execution
12263
12722
  */
12264
- createRequest(resource) {
12723
+ createRequest(resource, managedIdentityId) {
12265
12724
  const request = new ManagedIdentityRequestParameters(HttpMethod.GET, this.identityEndpoint.replace("localhost", "127.0.0.1"));
12266
12725
  request.headers[ManagedIdentityHeaders.METADATA_HEADER_NAME] = "true";
12267
12726
  request.queryParameters[ManagedIdentityQueryParameters.API_VERSION] =
12268
12727
  ARC_API_VERSION;
12269
12728
  request.queryParameters[ManagedIdentityQueryParameters.RESOURCE] =
12270
12729
  resource;
12730
+ if (managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED) {
12731
+ /*
12732
+ * Forward the user-assigned selector. Azure Arc honors the IMDS "msi_res_id" spelling for
12733
+ * the resource-id selector (isImds = true); "mi_res_id" is silently ignored and returns
12734
+ * the system-assigned identity.
12735
+ */
12736
+ request.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityId.idType, true // isImds -> msi_res_id for the resource-id selector
12737
+ )] = managedIdentityId.id;
12738
+ }
12271
12739
  // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity
12272
12740
  return request;
12273
12741
  }
12742
+ /**
12743
+ * Fails closed when a user-assigned identity was requested but the Azure Arc token response does
12744
+ * not confirm it. A legacy Azure Arc agent ignores the client_id / object_id / msi_res_id selector
12745
+ * and silently returns the machine's system-assigned identity; an agent that supports user-assigned
12746
+ * managed identity echoes the identity it used. When the echoed identity is missing or does not
12747
+ * match the requested selector, MSAL must not return a token for a different identity than requested.
12748
+ *
12749
+ * @param networkRequest - The request that produced this response; its query parameters carry the
12750
+ * requested user-assigned selector (client_id / object_id / msi_res_id)
12751
+ * @param responseBody - The deserialized Azure Arc token response
12752
+ *
12753
+ * @throws {ManagedIdentityError} When a user-assigned identity was requested but not confirmed
12754
+ */
12755
+ validateUserAssignedIdentityWasHonored(networkRequest, responseBody) {
12756
+ /*
12757
+ * Derive the requested selector from the request that produced this response rather than from
12758
+ * instance state. The managed identity source instance is cached and reused across acquireToken
12759
+ * calls, so relying on a stored field could compare against a different identity than the one
12760
+ * this request actually asked for. The network request is scoped to this call and carries exactly
12761
+ * one user-assigned selector (client_id, object_id, or msi_res_id) when a UAMI was requested.
12762
+ */
12763
+ const queryParameters = networkRequest.queryParameters;
12764
+ let requestedIdentity;
12765
+ let echoedIdentity;
12766
+ if (queryParameters[ManagedIdentityUserAssignedIdQueryParameterNames
12767
+ .MANAGED_IDENTITY_CLIENT_ID]) {
12768
+ requestedIdentity =
12769
+ queryParameters[ManagedIdentityUserAssignedIdQueryParameterNames
12770
+ .MANAGED_IDENTITY_CLIENT_ID];
12771
+ echoedIdentity = responseBody.client_id;
12772
+ }
12773
+ else if (queryParameters[ManagedIdentityUserAssignedIdQueryParameterNames
12774
+ .MANAGED_IDENTITY_OBJECT_ID]) {
12775
+ requestedIdentity =
12776
+ queryParameters[ManagedIdentityUserAssignedIdQueryParameterNames
12777
+ .MANAGED_IDENTITY_OBJECT_ID];
12778
+ echoedIdentity = responseBody.object_id;
12779
+ }
12780
+ else if (queryParameters[ManagedIdentityUserAssignedIdQueryParameterNames
12781
+ .MANAGED_IDENTITY_RESOURCE_ID_IMDS]) {
12782
+ requestedIdentity =
12783
+ queryParameters[ManagedIdentityUserAssignedIdQueryParameterNames
12784
+ .MANAGED_IDENTITY_RESOURCE_ID_IMDS];
12785
+ // Accept either spelling on the echo as a safety net; Azure Arc returns msi_res_id.
12786
+ echoedIdentity = responseBody.msi_res_id || responseBody.mi_res_id;
12787
+ }
12788
+ else {
12789
+ // System-assigned (no user-assigned selector forwarded): nothing to confirm.
12790
+ return;
12791
+ }
12792
+ /*
12793
+ * Compare case-insensitively: client_id / object_id are GUIDs, and an ARM resource id can
12794
+ * legitimately differ in segment casing.
12795
+ */
12796
+ if (!echoedIdentity ||
12797
+ echoedIdentity.toLowerCase() !== requestedIdentity.toLowerCase()) {
12798
+ this.logger.error("[Managed Identity] Azure Arc did not confirm the requested user-assigned identity in the token response. The agent likely does not support user-assigned managed identity and returned the system-assigned identity.", "");
12799
+ throw createManagedIdentityError(userAssignedManagedIdentityNotConfirmed, "");
12800
+ }
12801
+ }
12274
12802
  /**
12275
12803
  * Processes the server response and handles Azure Arc-specific authentication challenges.
12276
12804
  *
@@ -12361,7 +12889,16 @@ class AzureArc extends BaseManagedIdentitySource {
12361
12889
  }
12362
12890
  }
12363
12891
  }
12364
- return this.getServerTokenResponse(retryResponse || originalResponse);
12892
+ const finalResponse = retryResponse || originalResponse;
12893
+ /*
12894
+ * Fail closed: when a user-assigned identity was requested and the agent returned a token,
12895
+ * ensure the echoed identity matches. A genuine service error (no access_token, e.g. a 404
12896
+ * for a non-existent identity) is surfaced normally by the response handler.
12897
+ */
12898
+ if (finalResponse.body.access_token) {
12899
+ this.validateUserAssignedIdentityWasHonored(networkRequest, finalResponse.body);
12900
+ }
12901
+ return this.getServerTokenResponse(finalResponse);
12365
12902
  }
12366
12903
  }
12367
12904