@cosmotech/core 3.0.0-dev.0 → 3.0.1

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.
package/dist/index.cjs.js CHANGED
@@ -7174,7 +7174,12 @@ var includesStringExports = includesString.exports;
7174
7174
  var before_at = before_slash.substring(0, at_position);
7175
7175
  var valid_auth_regex = /^[a-zA-Z0-9\-_.%:]*$/;
7176
7176
  var is_valid_auth = valid_auth_regex.test(before_at);
7177
- if (is_valid_auth) {
7177
+
7178
+ // Check if this contains URL-encoded content that could be malicious
7179
+ // For example: javascript:%61%6c%65%72%74%28%31%29@example.com
7180
+ // The encoded part decodes to: alert(1)
7181
+ var has_encoded_content = /%[0-9a-fA-F]{2}/.test(before_at);
7182
+ if (is_valid_auth && !has_encoded_content) {
7178
7183
  // This looks like authentication (e.g., user:password@host), not a protocol
7179
7184
  if (options.require_protocol) {
7180
7185
  return false;
@@ -7183,6 +7188,7 @@ var includesStringExports = includesString.exports;
7183
7188
  // Don't consume the colon; let the auth parsing handle it later
7184
7189
  } else {
7185
7190
  // This looks like a malicious protocol (e.g., javascript:alert();@host)
7191
+ // or URL-encoded protocol handler (e.g., javascript:%61%6c%65%72%74%28%31%29@host)
7186
7192
  url = cleanUpProtocol(potential_protocol);
7187
7193
  if (url === false) {
7188
7194
  return false;
@@ -8429,11 +8435,18 @@ var isHexColor = {exports: {}};
8429
8435
  });
8430
8436
  exports$1.default = isHexColor;
8431
8437
  var _assertString = _interopRequireDefault(assertStringExports);
8438
+ var _merge = _interopRequireDefault(mergeExports);
8432
8439
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
8433
8440
  var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;
8434
- function isHexColor(str) {
8441
+ var hexcolor_with_prefix = /^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;
8442
+ var default_is_hexcolor_options = {
8443
+ require_hashtag: false
8444
+ };
8445
+ function isHexColor(str, options) {
8435
8446
  (0, _assertString.default)(str);
8436
- return hexcolor.test(str);
8447
+ options = (0, _merge.default)(options, default_is_hexcolor_options);
8448
+ var hexcolor_regex = options.require_hashtag ? hexcolor_with_prefix : hexcolor;
8449
+ return hexcolor_regex.test(str);
8437
8450
  }
8438
8451
  module.exports = exports$1.default;
8439
8452
  module.exports.default = exports$1.default;
@@ -8591,7 +8604,7 @@ var ibanRegexThroughCountryCode = {
8591
8604
  IE: /^(IE[0-9]{2})[A-Z]{4}\d{14}$/,
8592
8605
  IL: /^(IL[0-9]{2})\d{19}$/,
8593
8606
  IQ: /^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,
8594
- IR: /^(IR[0-9]{2})0\d{2}0\d{18}$/,
8607
+ IR: /^(IR[0-9]{2})\d{22}$/,
8595
8608
  IS: /^(IS[0-9]{2})\d{22}$/,
8596
8609
  IT: /^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,
8597
8610
  JO: /^(JO[0-9]{2})[A-Z]{4}\d{22}$/,
@@ -13358,7 +13371,7 @@ function isVAT(str, countryCode) {
13358
13371
  var _isVAT = _interopRequireDefault(isVAT$1);
13359
13372
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
13360
13373
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13361
- var version = '13.15.23';
13374
+ var version = '13.15.26';
13362
13375
  var validator = {
13363
13376
  version: version,
13364
13377
  toDate: _toDate.default,
@@ -42489,7 +42502,7 @@ var AuthDev = {
42489
42502
  acquireTokensByRequest
42490
42503
  };
42491
42504
 
42492
- /*! @azure/msal-common v15.13.3 2025-12-04 */
42505
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
42493
42506
  /*
42494
42507
  * Copyright (c) Microsoft Corporation. All rights reserved.
42495
42508
  * Licensed under the MIT License.
@@ -42763,7 +42776,7 @@ const JsonWebTokenTypes = {
42763
42776
  // Token renewal offset default in seconds
42764
42777
  const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
42765
42778
 
42766
- /*! @azure/msal-common v15.13.3 2025-12-04 */
42779
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
42767
42780
  /*
42768
42781
  * Copyright (c) Microsoft Corporation. All rights reserved.
42769
42782
  * Licensed under the MIT License.
@@ -42774,7 +42787,7 @@ const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
42774
42787
  const unexpectedError = "unexpected_error";
42775
42788
  const postRequestFailed$1 = "post_request_failed";
42776
42789
 
42777
- /*! @azure/msal-common v15.13.3 2025-12-04 */
42790
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
42778
42791
 
42779
42792
  /*
42780
42793
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -42809,7 +42822,7 @@ function createAuthError(code, additionalMessage) {
42809
42822
  : AuthErrorMessages[code]);
42810
42823
  }
42811
42824
 
42812
- /*! @azure/msal-common v15.13.3 2025-12-04 */
42825
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
42813
42826
  /*
42814
42827
  * Copyright (c) Microsoft Corporation. All rights reserved.
42815
42828
  * Licensed under the MIT License.
@@ -42860,7 +42873,7 @@ const methodNotImplemented = "method_not_implemented";
42860
42873
  const nestedAppAuthBridgeDisabled = "nested_app_auth_bridge_disabled";
42861
42874
  const platformBrokerError = "platform_broker_error";
42862
42875
 
42863
- /*! @azure/msal-common v15.13.3 2025-12-04 */
42876
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
42864
42877
 
42865
42878
  /*
42866
42879
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -42935,7 +42948,7 @@ function createClientAuthError(errorCode, additionalMessage) {
42935
42948
  return new ClientAuthError(errorCode, additionalMessage);
42936
42949
  }
42937
42950
 
42938
- /*! @azure/msal-common v15.13.3 2025-12-04 */
42951
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
42939
42952
 
42940
42953
  /*
42941
42954
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -42974,7 +42987,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
42974
42987
  },
42975
42988
  };
42976
42989
 
42977
- /*! @azure/msal-common v15.13.3 2025-12-04 */
42990
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
42978
42991
 
42979
42992
  /*
42980
42993
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -43165,12 +43178,12 @@ class Logger {
43165
43178
  }
43166
43179
  }
43167
43180
 
43168
- /*! @azure/msal-common v15.13.3 2025-12-04 */
43181
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
43169
43182
  /* eslint-disable header/header */
43170
43183
  const name$2 = "@azure/msal-common";
43171
- const version$1 = "15.13.3";
43184
+ const version$1 = "15.14.2";
43172
43185
 
43173
- /*! @azure/msal-common v15.13.3 2025-12-04 */
43186
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
43174
43187
  /*
43175
43188
  * Copyright (c) Microsoft Corporation. All rights reserved.
43176
43189
  * Licensed under the MIT License.
@@ -43179,7 +43192,7 @@ const AzureCloudInstance = {
43179
43192
  // AzureCloudInstance is not specified.
43180
43193
  None: "none"};
43181
43194
 
43182
- /*! @azure/msal-common v15.13.3 2025-12-04 */
43195
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
43183
43196
  /*
43184
43197
  * Copyright (c) Microsoft Corporation. All rights reserved.
43185
43198
  * Licensed under the MIT License.
@@ -43209,7 +43222,7 @@ const invalidRequestMethodForEAR = "invalid_request_method_for_EAR";
43209
43222
  const invalidAuthorizePostBodyParameters = "invalid_authorize_post_body_parameters";
43210
43223
  const invalidPlatformBrokerConfiguration = "invalid_platform_broker_configuration";
43211
43224
 
43212
- /*! @azure/msal-common v15.13.3 2025-12-04 */
43225
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
43213
43226
 
43214
43227
  /*
43215
43228
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -43255,7 +43268,7 @@ function createClientConfigurationError(errorCode) {
43255
43268
  return new ClientConfigurationError(errorCode);
43256
43269
  }
43257
43270
 
43258
- /*! @azure/msal-common v15.13.3 2025-12-04 */
43271
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
43259
43272
  /*
43260
43273
  * Copyright (c) Microsoft Corporation. All rights reserved.
43261
43274
  * Licensed under the MIT License.
@@ -43352,7 +43365,7 @@ class StringUtils {
43352
43365
  }
43353
43366
  }
43354
43367
 
43355
- /*! @azure/msal-common v15.13.3 2025-12-04 */
43368
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
43356
43369
 
43357
43370
  /*
43358
43371
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -43547,7 +43560,7 @@ class ScopeSet {
43547
43560
  }
43548
43561
  }
43549
43562
 
43550
- /*! @azure/msal-common v15.13.3 2025-12-04 */
43563
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
43551
43564
 
43552
43565
  /*
43553
43566
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -43587,7 +43600,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
43587
43600
  };
43588
43601
  }
43589
43602
 
43590
- /*! @azure/msal-common v15.13.3 2025-12-04 */
43603
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
43591
43604
  /*
43592
43605
  * Copyright (c) Microsoft Corporation. All rights reserved.
43593
43606
  * Licensed under the MIT License.
@@ -43669,7 +43682,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
43669
43682
  return updatedAccountInfo;
43670
43683
  }
43671
43684
 
43672
- /*! @azure/msal-common v15.13.3 2025-12-04 */
43685
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
43673
43686
  /*
43674
43687
  * Copyright (c) Microsoft Corporation. All rights reserved.
43675
43688
  * Licensed under the MIT License.
@@ -43684,7 +43697,7 @@ const AuthorityType = {
43684
43697
  Ciam: 3,
43685
43698
  };
43686
43699
 
43687
- /*! @azure/msal-common v15.13.3 2025-12-04 */
43700
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
43688
43701
  /*
43689
43702
  * Copyright (c) Microsoft Corporation. All rights reserved.
43690
43703
  * Licensed under the MIT License.
@@ -43706,7 +43719,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
43706
43719
  return null;
43707
43720
  }
43708
43721
 
43709
- /*! @azure/msal-common v15.13.3 2025-12-04 */
43722
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
43710
43723
  /*
43711
43724
  * Copyright (c) Microsoft Corporation. All rights reserved.
43712
43725
  * Licensed under the MIT License.
@@ -43730,7 +43743,7 @@ const ProtocolMode = {
43730
43743
  EAR: "EAR",
43731
43744
  };
43732
43745
 
43733
- /*! @azure/msal-common v15.13.3 2025-12-04 */
43746
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
43734
43747
 
43735
43748
  /*
43736
43749
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -43764,6 +43777,13 @@ class AccountEntity {
43764
43777
  * Returns the AccountInfo interface for this account.
43765
43778
  */
43766
43779
  static getAccountInfo(accountEntity) {
43780
+ const tenantProfiles = accountEntity.tenantProfiles || [];
43781
+ // Ensure at least the home tenant profile exists
43782
+ if (tenantProfiles.length === 0 &&
43783
+ accountEntity.realm &&
43784
+ accountEntity.localAccountId) {
43785
+ tenantProfiles.push(buildTenantProfile(accountEntity.homeAccountId, accountEntity.localAccountId, accountEntity.realm));
43786
+ }
43767
43787
  return {
43768
43788
  homeAccountId: accountEntity.homeAccountId,
43769
43789
  environment: accountEntity.environment,
@@ -43775,7 +43795,7 @@ class AccountEntity {
43775
43795
  nativeAccountId: accountEntity.nativeAccountId,
43776
43796
  authorityType: accountEntity.authorityType,
43777
43797
  // Deserialize tenant profiles array into a Map
43778
- tenantProfiles: new Map((accountEntity.tenantProfiles || []).map((tenantProfile) => {
43798
+ tenantProfiles: new Map(tenantProfiles.map((tenantProfile) => {
43779
43799
  return [tenantProfile.tenantId, tenantProfile];
43780
43800
  })),
43781
43801
  dataBoundary: accountEntity.dataBoundary,
@@ -43876,7 +43896,14 @@ class AccountEntity {
43876
43896
  account.cloudGraphHostName = cloudGraphHostName;
43877
43897
  account.msGraphHost = msGraphHost;
43878
43898
  // Serialize tenant profiles map into an array
43879
- account.tenantProfiles = Array.from(accountInfo.tenantProfiles?.values() || []);
43899
+ const tenantProfiles = Array.from(accountInfo.tenantProfiles?.values() || []);
43900
+ // Ensure at least the home tenant profile exists
43901
+ if (tenantProfiles.length === 0 &&
43902
+ accountInfo.tenantId &&
43903
+ accountInfo.localAccountId) {
43904
+ tenantProfiles.push(buildTenantProfile(accountInfo.homeAccountId, accountInfo.localAccountId, accountInfo.tenantId, accountInfo.idTokenClaims));
43905
+ }
43906
+ account.tenantProfiles = tenantProfiles;
43880
43907
  account.dataBoundary = accountInfo.dataBoundary;
43881
43908
  return account;
43882
43909
  }
@@ -43951,7 +43978,7 @@ class AccountEntity {
43951
43978
  }
43952
43979
  }
43953
43980
 
43954
- /*! @azure/msal-common v15.13.3 2025-12-04 */
43981
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
43955
43982
 
43956
43983
  /*
43957
43984
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -44032,7 +44059,7 @@ function checkMaxAge(authTime, maxAge) {
44032
44059
  }
44033
44060
  }
44034
44061
 
44035
- /*! @azure/msal-common v15.13.3 2025-12-04 */
44062
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
44036
44063
 
44037
44064
  /*
44038
44065
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -44148,7 +44175,7 @@ function normalizeUrlForComparison(url) {
44148
44175
  }
44149
44176
  }
44150
44177
 
44151
- /*! @azure/msal-common v15.13.3 2025-12-04 */
44178
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
44152
44179
 
44153
44180
  /*
44154
44181
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -44312,7 +44339,7 @@ class UrlString {
44312
44339
  }
44313
44340
  }
44314
44341
 
44315
- /*! @azure/msal-common v15.13.3 2025-12-04 */
44342
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
44316
44343
 
44317
44344
  /*
44318
44345
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -44341,6 +44368,27 @@ const rawMetdataJSON = {
44341
44368
  authorization_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",
44342
44369
  end_session_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout",
44343
44370
  },
44371
+ "login.sovcloud-identity.fr": {
44372
+ token_endpoint: "https://login.sovcloud-identity.fr/{tenantid}/oauth2/v2.0/token",
44373
+ jwks_uri: "https://login.sovcloud-identity.fr/{tenantid}/discovery/v2.0/keys",
44374
+ issuer: "https://login.sovcloud-identity.fr/{tenantid}/v2.0",
44375
+ authorization_endpoint: "https://login.sovcloud-identity.fr/{tenantid}/oauth2/v2.0/authorize",
44376
+ end_session_endpoint: "https://login.sovcloud-identity.fr/{tenantid}/oauth2/v2.0/logout",
44377
+ },
44378
+ "login.sovcloud-identity.de": {
44379
+ token_endpoint: "https://login.sovcloud-identity.de/{tenantid}/oauth2/v2.0/token",
44380
+ jwks_uri: "https://login.sovcloud-identity.de/{tenantid}/discovery/v2.0/keys",
44381
+ issuer: "https://login.sovcloud-identity.de/{tenantid}/v2.0",
44382
+ authorization_endpoint: "https://login.sovcloud-identity.de/{tenantid}/oauth2/v2.0/authorize",
44383
+ end_session_endpoint: "https://login.sovcloud-identity.de/{tenantid}/oauth2/v2.0/logout",
44384
+ },
44385
+ "login.sovcloud-identity.sg": {
44386
+ token_endpoint: "https://login.sovcloud-identity.sg/common/oauth2/v2.0/token",
44387
+ jwks_uri: "https://login.sovcloud-identity.sg/common/discovery/v2.0/keys",
44388
+ issuer: "https://login.sovcloud-identity.sg/{tenantid}/v2.0",
44389
+ authorization_endpoint: "https://login.sovcloud-identity.sg/common/oauth2/v2.0/authorize",
44390
+ end_session_endpoint: "https://login.sovcloud-identity.sg/common/oauth2/v2.0/logout",
44391
+ },
44344
44392
  },
44345
44393
  instanceDiscoveryMetadata: {
44346
44394
  metadata: [
@@ -44380,6 +44428,21 @@ const rawMetdataJSON = {
44380
44428
  preferred_cache: "login-us.microsoftonline.com",
44381
44429
  aliases: ["login-us.microsoftonline.com"],
44382
44430
  },
44431
+ {
44432
+ preferred_network: "login.sovcloud-identity.fr",
44433
+ preferred_cache: "login.sovcloud-identity.fr",
44434
+ aliases: ["login.sovcloud-identity.fr"],
44435
+ },
44436
+ {
44437
+ preferred_network: "login.sovcloud-identity.de",
44438
+ preferred_cache: "login.sovcloud-identity.de",
44439
+ aliases: ["login.sovcloud-identity.de"],
44440
+ },
44441
+ {
44442
+ preferred_network: "login.sovcloud-identity.sg",
44443
+ preferred_cache: "login.sovcloud-identity.sg",
44444
+ aliases: ["login.sovcloud-identity.sg"],
44445
+ },
44383
44446
  ],
44384
44447
  },
44385
44448
  };
@@ -44451,7 +44514,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
44451
44514
  return null;
44452
44515
  }
44453
44516
 
44454
- /*! @azure/msal-common v15.13.3 2025-12-04 */
44517
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
44455
44518
  /*
44456
44519
  * Copyright (c) Microsoft Corporation. All rights reserved.
44457
44520
  * Licensed under the MIT License.
@@ -44459,7 +44522,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
44459
44522
  const cacheQuotaExceeded = "cache_quota_exceeded";
44460
44523
  const cacheErrorUnknown = "cache_error_unknown";
44461
44524
 
44462
- /*! @azure/msal-common v15.13.3 2025-12-04 */
44525
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
44463
44526
 
44464
44527
  /*
44465
44528
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -44504,7 +44567,7 @@ function createCacheError(e) {
44504
44567
  }
44505
44568
  }
44506
44569
 
44507
- /*! @azure/msal-common v15.13.3 2025-12-04 */
44570
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
44508
44571
 
44509
44572
  /*
44510
44573
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -44674,15 +44737,16 @@ class CacheManager {
44674
44737
  * @param cacheRecord {CacheRecord}
44675
44738
  * @param correlationId {?string} correlation id
44676
44739
  * @param kmsi - Keep Me Signed In
44740
+ * @param apiId - API identifier for telemetry tracking
44677
44741
  * @param storeInCache {?StoreInCache}
44678
44742
  */
44679
- async saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache) {
44743
+ async saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache) {
44680
44744
  if (!cacheRecord) {
44681
44745
  throw createClientAuthError(invalidCacheRecord);
44682
44746
  }
44683
44747
  try {
44684
44748
  if (!!cacheRecord.account) {
44685
- await this.setAccount(cacheRecord.account, correlationId, kmsi);
44749
+ await this.setAccount(cacheRecord.account, correlationId, kmsi, apiId);
44686
44750
  }
44687
44751
  if (!!cacheRecord.idToken && storeInCache?.idToken !== false) {
44688
44752
  await this.setIdTokenCredential(cacheRecord.idToken, correlationId, kmsi);
@@ -45613,7 +45677,7 @@ class DefaultStorageClass extends CacheManager {
45613
45677
  }
45614
45678
  }
45615
45679
 
45616
- /*! @azure/msal-common v15.13.3 2025-12-04 */
45680
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
45617
45681
  /*
45618
45682
  * Copyright (c) Microsoft Corporation. All rights reserved.
45619
45683
  * Licensed under the MIT License.
@@ -45870,6 +45934,11 @@ const PerformanceEvents = {
45870
45934
  Decrypt: "decrypt",
45871
45935
  GenerateEarKey: "generateEarKey",
45872
45936
  DecryptEarResponse: "decryptEarResponse",
45937
+ LoadExternalTokens: "LoadExternalTokens",
45938
+ LoadAccount: "loadAccount",
45939
+ LoadIdToken: "loadIdToken",
45940
+ LoadAccessToken: "loadAccessToken",
45941
+ LoadRefreshToken: "loadRefreshToken",
45873
45942
  };
45874
45943
  /**
45875
45944
  * State of the performance event.
@@ -45880,7 +45949,7 @@ const PerformanceEvents = {
45880
45949
  const PerformanceEventStatus = {
45881
45950
  InProgress: 1};
45882
45951
 
45883
- /*! @azure/msal-common v15.13.3 2025-12-04 */
45952
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
45884
45953
 
45885
45954
  /*
45886
45955
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -45959,7 +46028,7 @@ class StubPerformanceClient {
45959
46028
  }
45960
46029
  }
45961
46030
 
45962
- /*! @azure/msal-common v15.13.3 2025-12-04 */
46031
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
45963
46032
 
45964
46033
  /*
45965
46034
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -46059,7 +46128,7 @@ function isOidcProtocolMode(config) {
46059
46128
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
46060
46129
  }
46061
46130
 
46062
- /*! @azure/msal-common v15.13.3 2025-12-04 */
46131
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
46063
46132
  /*
46064
46133
  * Copyright (c) Microsoft Corporation. All rights reserved.
46065
46134
  * Licensed under the MIT License.
@@ -46069,7 +46138,7 @@ const CcsCredentialType = {
46069
46138
  UPN: "UPN",
46070
46139
  };
46071
46140
 
46072
- /*! @azure/msal-common v15.13.3 2025-12-04 */
46141
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
46073
46142
  /*
46074
46143
  * Copyright (c) Microsoft Corporation. All rights reserved.
46075
46144
  * Licensed under the MIT License.
@@ -46119,7 +46188,7 @@ const INSTANCE_AWARE = "instance_aware";
46119
46188
  const EAR_JWK = "ear_jwk";
46120
46189
  const EAR_JWE_CRYPTO = "ear_jwe_crypto";
46121
46190
 
46122
- /*! @azure/msal-common v15.13.3 2025-12-04 */
46191
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
46123
46192
 
46124
46193
  /*
46125
46194
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -46499,7 +46568,7 @@ function addPostBodyParameters(parameters, bodyParameters) {
46499
46568
  });
46500
46569
  }
46501
46570
 
46502
- /*! @azure/msal-common v15.13.3 2025-12-04 */
46571
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
46503
46572
  /*
46504
46573
  * Copyright (c) Microsoft Corporation. All rights reserved.
46505
46574
  * Licensed under the MIT License.
@@ -46511,7 +46580,7 @@ function isOpenIdConfigResponse(response) {
46511
46580
  response.hasOwnProperty("jwks_uri"));
46512
46581
  }
46513
46582
 
46514
- /*! @azure/msal-common v15.13.3 2025-12-04 */
46583
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
46515
46584
  /*
46516
46585
  * Copyright (c) Microsoft Corporation. All rights reserved.
46517
46586
  * Licensed under the MIT License.
@@ -46521,7 +46590,7 @@ function isCloudInstanceDiscoveryResponse(response) {
46521
46590
  response.hasOwnProperty("metadata"));
46522
46591
  }
46523
46592
 
46524
- /*! @azure/msal-common v15.13.3 2025-12-04 */
46593
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
46525
46594
  /*
46526
46595
  * Copyright (c) Microsoft Corporation. All rights reserved.
46527
46596
  * Licensed under the MIT License.
@@ -46531,7 +46600,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
46531
46600
  response.hasOwnProperty("error_description"));
46532
46601
  }
46533
46602
 
46534
- /*! @azure/msal-common v15.13.3 2025-12-04 */
46603
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
46535
46604
  /*
46536
46605
  * Copyright (c) Microsoft Corporation. All rights reserved.
46537
46606
  * Licensed under the MIT License.
@@ -46627,7 +46696,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
46627
46696
  };
46628
46697
  };
46629
46698
 
46630
- /*! @azure/msal-common v15.13.3 2025-12-04 */
46699
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
46631
46700
 
46632
46701
  /*
46633
46702
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -46733,7 +46802,7 @@ RegionDiscovery.IMDS_OPTIONS = {
46733
46802
  },
46734
46803
  };
46735
46804
 
46736
- /*! @azure/msal-common v15.13.3 2025-12-04 */
46805
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
46737
46806
  /*
46738
46807
  * Copyright (c) Microsoft Corporation. All rights reserved.
46739
46808
  * Licensed under the MIT License.
@@ -46798,7 +46867,7 @@ function wasClockTurnedBack(cachedAt) {
46798
46867
  return cachedAtSec > nowSeconds();
46799
46868
  }
46800
46869
 
46801
- /*! @azure/msal-common v15.13.3 2025-12-04 */
46870
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
46802
46871
 
46803
46872
  /*
46804
46873
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -47060,7 +47129,7 @@ function isAuthorityMetadataExpired(metadata) {
47060
47129
  return metadata.expiresAt <= nowSeconds();
47061
47130
  }
47062
47131
 
47063
- /*! @azure/msal-common v15.13.3 2025-12-04 */
47132
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
47064
47133
 
47065
47134
  /*
47066
47135
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -47899,7 +47968,7 @@ function buildStaticAuthorityOptions(authOptions) {
47899
47968
  };
47900
47969
  }
47901
47970
 
47902
- /*! @azure/msal-common v15.13.3 2025-12-04 */
47971
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
47903
47972
 
47904
47973
  /*
47905
47974
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -47930,7 +47999,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
47930
47999
  }
47931
48000
  }
47932
48001
 
47933
- /*! @azure/msal-common v15.13.3 2025-12-04 */
48002
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
47934
48003
 
47935
48004
  /*
47936
48005
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -47949,7 +48018,7 @@ class ServerError extends AuthError {
47949
48018
  }
47950
48019
  }
47951
48020
 
47952
- /*! @azure/msal-common v15.13.3 2025-12-04 */
48021
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
47953
48022
  /*
47954
48023
  * Copyright (c) Microsoft Corporation. All rights reserved.
47955
48024
  * Licensed under the MIT License.
@@ -47970,7 +48039,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
47970
48039
  };
47971
48040
  }
47972
48041
 
47973
- /*! @azure/msal-common v15.13.3 2025-12-04 */
48042
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
47974
48043
 
47975
48044
  /*
47976
48045
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -48057,7 +48126,7 @@ class ThrottlingUtils {
48057
48126
  }
48058
48127
  }
48059
48128
 
48060
- /*! @azure/msal-common v15.13.3 2025-12-04 */
48129
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
48061
48130
 
48062
48131
  /*
48063
48132
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -48088,7 +48157,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
48088
48157
  return new NetworkError(error, httpStatus, responseHeaders);
48089
48158
  }
48090
48159
 
48091
- /*! @azure/msal-common v15.13.3 2025-12-04 */
48160
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
48092
48161
 
48093
48162
  /*
48094
48163
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -48236,7 +48305,7 @@ class BaseClient {
48236
48305
  }
48237
48306
  }
48238
48307
 
48239
- /*! @azure/msal-common v15.13.3 2025-12-04 */
48308
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
48240
48309
  /*
48241
48310
  * Copyright (c) Microsoft Corporation. All rights reserved.
48242
48311
  * Licensed under the MIT License.
@@ -48252,7 +48321,7 @@ const consentRequired = "consent_required";
48252
48321
  const loginRequired = "login_required";
48253
48322
  const badToken = "bad_token";
48254
48323
 
48255
- /*! @azure/msal-common v15.13.3 2025-12-04 */
48324
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
48256
48325
 
48257
48326
  /*
48258
48327
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -48324,7 +48393,7 @@ function createInteractionRequiredAuthError(errorCode) {
48324
48393
  return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
48325
48394
  }
48326
48395
 
48327
- /*! @azure/msal-common v15.13.3 2025-12-04 */
48396
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
48328
48397
 
48329
48398
  /*
48330
48399
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -48396,7 +48465,7 @@ class ProtocolUtils {
48396
48465
  }
48397
48466
  }
48398
48467
 
48399
- /*! @azure/msal-common v15.13.3 2025-12-04 */
48468
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
48400
48469
 
48401
48470
  /*
48402
48471
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -48478,7 +48547,7 @@ class PopTokenGenerator {
48478
48547
  }
48479
48548
  }
48480
48549
 
48481
- /*! @azure/msal-common v15.13.3 2025-12-04 */
48550
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
48482
48551
  /*
48483
48552
  * Copyright (c) Microsoft Corporation. All rights reserved.
48484
48553
  * Licensed under the MIT License.
@@ -48505,7 +48574,7 @@ class PopTokenGenerator {
48505
48574
  }
48506
48575
  }
48507
48576
 
48508
- /*! @azure/msal-common v15.13.3 2025-12-04 */
48577
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
48509
48578
 
48510
48579
  /*
48511
48580
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -48569,7 +48638,7 @@ class ResponseHandler {
48569
48638
  * @param serverTokenResponse
48570
48639
  * @param authority
48571
48640
  */
48572
- async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {
48641
+ async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, apiId, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {
48573
48642
  this.performanceClient?.addQueueMeasurement(PerformanceEvents.HandleServerTokenResponse, serverTokenResponse.correlation_id);
48574
48643
  // create an idToken object (not entity)
48575
48644
  let idTokenClaims;
@@ -48617,14 +48686,19 @@ class ResponseHandler {
48617
48686
  if (handlingRefreshTokenResponse &&
48618
48687
  !forceCacheRefreshTokenResponse &&
48619
48688
  cacheRecord.account) {
48620
- const key = this.cacheStorage.generateAccountKey(AccountEntity.getAccountInfo(cacheRecord.account));
48621
- const account = this.cacheStorage.getAccount(key, request.correlationId);
48622
- if (!account) {
48689
+ const cachedAccounts = this.cacheStorage.getAllAccounts({
48690
+ homeAccountId: cacheRecord.account.homeAccountId,
48691
+ environment: cacheRecord.account.environment,
48692
+ }, request.correlationId);
48693
+ if (cachedAccounts.length < 1) {
48623
48694
  this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache");
48695
+ this.performanceClient?.addFields({
48696
+ acntLoggedOut: true,
48697
+ }, request.correlationId);
48624
48698
  return await ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenClaims, requestStateObj, undefined, serverRequestId);
48625
48699
  }
48626
48700
  }
48627
- await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), request.storeInCache);
48701
+ await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), apiId, request.storeInCache);
48628
48702
  }
48629
48703
  finally {
48630
48704
  if (this.persistencePlugin &&
@@ -48694,6 +48768,9 @@ class ResponseHandler {
48694
48768
  ? parseInt(serverTokenResponse.refresh_token_expires_in, 10)
48695
48769
  : serverTokenResponse.refresh_token_expires_in;
48696
48770
  rtExpiresOn = reqTimestamp + rtExpiresIn;
48771
+ this.performanceClient?.addFields({
48772
+ ntwkRtExpiresOnSeconds: rtExpiresOn,
48773
+ }, request.correlationId);
48697
48774
  }
48698
48775
  cachedRefreshToken = createRefreshTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.refresh_token, this.clientId, serverTokenResponse.foci, userAssertionHash, rtExpiresOn);
48699
48776
  }
@@ -48836,7 +48913,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
48836
48913
  return baseAccount;
48837
48914
  }
48838
48915
 
48839
- /*! @azure/msal-common v15.13.3 2025-12-04 */
48916
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
48840
48917
  /*
48841
48918
  * Copyright (c) Microsoft Corporation. All rights reserved.
48842
48919
  * Licensed under the MIT License.
@@ -48854,7 +48931,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {
48854
48931
  }
48855
48932
  }
48856
48933
 
48857
- /*! @azure/msal-common v15.13.3 2025-12-04 */
48934
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
48858
48935
 
48859
48936
  /*
48860
48937
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -48876,8 +48953,9 @@ class AuthorizationCodeClient extends BaseClient {
48876
48953
  * API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the
48877
48954
  * authorization_code_grant
48878
48955
  * @param request
48956
+ * @param apiId - API identifier for telemetry tracking
48879
48957
  */
48880
- async acquireToken(request, authCodePayload) {
48958
+ async acquireToken(request, apiId, authCodePayload) {
48881
48959
  this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientAcquireToken, request.correlationId);
48882
48960
  if (!request.code) {
48883
48961
  throw createClientAuthError(requestCannotBeMade);
@@ -48889,7 +48967,7 @@ class AuthorizationCodeClient extends BaseClient {
48889
48967
  const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin, this.performanceClient);
48890
48968
  // Validate response. This function throws a server error if an error is returned by the server.
48891
48969
  responseHandler.validateTokenResponse(response.body);
48892
- return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId);
48970
+ return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, authCodePayload, undefined, undefined, undefined, requestId);
48893
48971
  }
48894
48972
  /**
48895
48973
  * Used to log out the current user, and redirect the user to the postLogoutRedirectUri.
@@ -49089,7 +49167,7 @@ class AuthorizationCodeClient extends BaseClient {
49089
49167
  }
49090
49168
  }
49091
49169
 
49092
- /*! @azure/msal-common v15.13.3 2025-12-04 */
49170
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
49093
49171
 
49094
49172
  /*
49095
49173
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -49104,7 +49182,7 @@ class RefreshTokenClient extends BaseClient {
49104
49182
  constructor(configuration, performanceClient) {
49105
49183
  super(configuration, performanceClient);
49106
49184
  }
49107
- async acquireToken(request) {
49185
+ async acquireToken(request, apiId) {
49108
49186
  this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
49109
49187
  const reqTimestamp = nowSeconds();
49110
49188
  const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority);
@@ -49112,13 +49190,13 @@ class RefreshTokenClient extends BaseClient {
49112
49190
  const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
49113
49191
  const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
49114
49192
  responseHandler.validateTokenResponse(response.body);
49115
- return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId);
49193
+ return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, undefined, undefined, true, request.forceCache, requestId);
49116
49194
  }
49117
49195
  /**
49118
49196
  * Gets cached refresh token and attaches to request, then calls acquireToken API
49119
49197
  * @param request
49120
49198
  */
49121
- async acquireTokenByRefreshToken(request) {
49199
+ async acquireTokenByRefreshToken(request, apiId) {
49122
49200
  // Cannot renew token if no request object is given.
49123
49201
  if (!request) {
49124
49202
  throw createClientConfigurationError(tokenRequestEmpty);
@@ -49133,7 +49211,7 @@ class RefreshTokenClient extends BaseClient {
49133
49211
  // if the app is part of the family, retrive a Family refresh token if present and make a refreshTokenRequest
49134
49212
  if (isFOCI) {
49135
49213
  try {
49136
- return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true);
49214
+ return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true, apiId);
49137
49215
  }
49138
49216
  catch (e) {
49139
49217
  const noFamilyRTInCache = e instanceof InteractionRequiredAuthError &&
@@ -49144,7 +49222,7 @@ class RefreshTokenClient extends BaseClient {
49144
49222
  e.subError === Errors.CLIENT_MISMATCH_ERROR;
49145
49223
  // if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)
49146
49224
  if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {
49147
- return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
49225
+ return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false, apiId);
49148
49226
  // throw in all other cases
49149
49227
  }
49150
49228
  else {
@@ -49153,26 +49231,30 @@ class RefreshTokenClient extends BaseClient {
49153
49231
  }
49154
49232
  }
49155
49233
  // fall back to application refresh token acquisition
49156
- return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
49234
+ return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false, apiId);
49157
49235
  }
49158
49236
  /**
49159
49237
  * makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached
49160
49238
  * @param request
49161
49239
  */
49162
- async acquireTokenWithCachedRefreshToken(request, foci) {
49240
+ async acquireTokenWithCachedRefreshToken(request, foci, apiId) {
49163
49241
  this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, request.correlationId);
49164
49242
  // fetches family RT or application RT based on FOCI value
49165
49243
  const refreshToken = invoke(this.cacheManager.getRefreshToken.bind(this.cacheManager), PerformanceEvents.CacheManagerGetRefreshToken, this.logger, this.performanceClient, request.correlationId)(request.account, foci, request.correlationId, undefined, this.performanceClient);
49166
49244
  if (!refreshToken) {
49167
49245
  throw createInteractionRequiredAuthError(noTokensFound);
49168
49246
  }
49169
- if (refreshToken.expiresOn &&
49170
- isTokenExpired(refreshToken.expiresOn, request.refreshTokenExpirationOffsetSeconds ||
49171
- DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS)) {
49172
- this.performanceClient?.addFields({ rtExpiresOnMs: Number(refreshToken.expiresOn) }, request.correlationId);
49173
- throw createInteractionRequiredAuthError(refreshTokenExpired);
49247
+ if (refreshToken.expiresOn) {
49248
+ const offset = request.refreshTokenExpirationOffsetSeconds ||
49249
+ DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS;
49250
+ this.performanceClient?.addFields({
49251
+ cacheRtExpiresOnSeconds: Number(refreshToken.expiresOn),
49252
+ rtOffsetSeconds: offset,
49253
+ }, request.correlationId);
49254
+ if (isTokenExpired(refreshToken.expiresOn, offset)) {
49255
+ throw createInteractionRequiredAuthError(refreshTokenExpired);
49256
+ }
49174
49257
  }
49175
- // attach cached RT size to the current measurement
49176
49258
  const refreshTokenRequest = {
49177
49259
  ...request,
49178
49260
  refreshToken: refreshToken.secret,
@@ -49183,11 +49265,10 @@ class RefreshTokenClient extends BaseClient {
49183
49265
  },
49184
49266
  };
49185
49267
  try {
49186
- return await invokeAsync(this.acquireToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest);
49268
+ return await invokeAsync(this.acquireToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest, apiId);
49187
49269
  }
49188
49270
  catch (e) {
49189
49271
  if (e instanceof InteractionRequiredAuthError) {
49190
- this.performanceClient?.addFields({ rtExpiresOnMs: Number(refreshToken.expiresOn) }, request.correlationId);
49191
49272
  if (e.subError === badToken) {
49192
49273
  // Remove bad refresh token from cache
49193
49274
  this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");
@@ -49298,7 +49379,7 @@ class RefreshTokenClient extends BaseClient {
49298
49379
  }
49299
49380
  }
49300
49381
 
49301
- /*! @azure/msal-common v15.13.3 2025-12-04 */
49382
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
49302
49383
 
49303
49384
  /*
49304
49385
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -49396,7 +49477,7 @@ class SilentFlowClient extends BaseClient {
49396
49477
  }
49397
49478
  }
49398
49479
 
49399
- /*! @azure/msal-common v15.13.3 2025-12-04 */
49480
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
49400
49481
 
49401
49482
  /*
49402
49483
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -49411,7 +49492,7 @@ const StubbedNetworkModule = {
49411
49492
  },
49412
49493
  };
49413
49494
 
49414
- /*! @azure/msal-common v15.13.3 2025-12-04 */
49495
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
49415
49496
 
49416
49497
  /*
49417
49498
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -49635,7 +49716,7 @@ function extractLoginHint(account) {
49635
49716
  return account.loginHint || account.idTokenClaims?.login_hint || null;
49636
49717
  }
49637
49718
 
49638
- /*! @azure/msal-common v15.13.3 2025-12-04 */
49719
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
49639
49720
 
49640
49721
  /*
49641
49722
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -49898,7 +49979,7 @@ class ServerTelemetryManager {
49898
49979
  }
49899
49980
  }
49900
49981
 
49901
- /*! @azure/msal-common v15.13.3 2025-12-04 */
49982
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
49902
49983
  /*
49903
49984
  * Copyright (c) Microsoft Corporation. All rights reserved.
49904
49985
  * Licensed under the MIT License.
@@ -49906,7 +49987,7 @@ class ServerTelemetryManager {
49906
49987
  const missingKidError = "missing_kid_error";
49907
49988
  const missingAlgError = "missing_alg_error";
49908
49989
 
49909
- /*! @azure/msal-common v15.13.3 2025-12-04 */
49990
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
49910
49991
 
49911
49992
  /*
49912
49993
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -49931,7 +50012,7 @@ function createJoseHeaderError(code) {
49931
50012
  return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
49932
50013
  }
49933
50014
 
49934
- /*! @azure/msal-common v15.13.3 2025-12-04 */
50015
+ /*! @azure/msal-common v15.14.2 2026-02-10 */
49935
50016
 
49936
50017
  /*
49937
50018
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -49971,7 +50052,7 @@ class JoseHeader {
49971
50052
  }
49972
50053
  }
49973
50054
 
49974
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
50055
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
49975
50056
  /*
49976
50057
  * Copyright (c) Microsoft Corporation. All rights reserved.
49977
50058
  * Licensed under the MIT License.
@@ -50028,7 +50109,7 @@ const failedToParseHeaders = "failed_to_parse_headers";
50028
50109
  const failedToDecryptEarResponse = "failed_to_decrypt_ear_response";
50029
50110
  const timedOut = "timed_out";
50030
50111
 
50031
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
50112
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
50032
50113
 
50033
50114
  /*
50034
50115
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -50105,7 +50186,7 @@ function createBrowserAuthError(errorCode, subError) {
50105
50186
  return new BrowserAuthError(errorCode, subError);
50106
50187
  }
50107
50188
 
50108
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
50189
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
50109
50190
 
50110
50191
  /*
50111
50192
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -50192,9 +50273,9 @@ const InMemoryCacheKeys = {
50192
50273
  };
50193
50274
  /**
50194
50275
  * API Codes for Telemetry purposes.
50195
- * Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs
50196
50276
  * 0-99 Silent Flow
50197
50277
  * 800-899 Auth Code Flow
50278
+ * 900-999 Miscellaneous
50198
50279
  */
50199
50280
  const ApiId = {
50200
50281
  acquireTokenRedirect: 861,
@@ -50206,6 +50287,30 @@ const ApiId = {
50206
50287
  acquireTokenSilent_silentFlow: 61,
50207
50288
  logout: 961,
50208
50289
  logoutPopup: 962,
50290
+ hydrateCache: 963,
50291
+ loadExternalTokens: 964,
50292
+ };
50293
+ /**
50294
+ * API Names for Telemetry purposes.
50295
+ */
50296
+ const ApiName = {
50297
+ 861: "acquireTokenRedirect",
50298
+ 862: "acquireTokenPopup",
50299
+ 863: "ssoSilent",
50300
+ 864: "acquireTokenSilent_authCode",
50301
+ 865: "handleRedirectPromise",
50302
+ 866: "acquireTokenByCode",
50303
+ 61: "acquireTokenSilent_silentFlow",
50304
+ 961: "logout",
50305
+ 962: "logoutPopup",
50306
+ 963: "hydrateCache",
50307
+ 964: "loadExternalTokens",
50308
+ };
50309
+ const apiIdToName = (id) => {
50310
+ if (typeof id === "number" && id in ApiName) {
50311
+ return ApiName[id];
50312
+ }
50313
+ return "unknown";
50209
50314
  };
50210
50315
  /*
50211
50316
  * Interaction type of the API - used for state and telemetry
@@ -50270,7 +50375,7 @@ const iFrameRenewalPolicies = [
50270
50375
  CacheLookupPolicy.RefreshTokenAndNetwork,
50271
50376
  ];
50272
50377
 
50273
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
50378
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
50274
50379
  /*
50275
50380
  * Copyright (c) Microsoft Corporation. All rights reserved.
50276
50381
  * Licensed under the MIT License.
@@ -50315,7 +50420,7 @@ function base64EncArr(aBytes) {
50315
50420
  return btoa(binString);
50316
50421
  }
50317
50422
 
50318
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
50423
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
50319
50424
 
50320
50425
  /*
50321
50426
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -50354,7 +50459,7 @@ function base64DecToArr(base64String) {
50354
50459
  return Uint8Array.from(binString, (m) => m.codePointAt(0) || 0);
50355
50460
  }
50356
50461
 
50357
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
50462
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
50358
50463
 
50359
50464
  /*
50360
50465
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -50653,7 +50758,7 @@ async function hashString(plainText) {
50653
50758
  return urlEncodeArr(hashBytes);
50654
50759
  }
50655
50760
 
50656
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
50761
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
50657
50762
  /*
50658
50763
  * Copyright (c) Microsoft Corporation. All rights reserved.
50659
50764
  * Licensed under the MIT License.
@@ -50662,7 +50767,7 @@ const storageNotSupported = "storage_not_supported";
50662
50767
  const stubbedPublicClientApplicationCalled = "stubbed_public_client_application_called";
50663
50768
  const inMemRedirectUnavailable = "in_mem_redirect_unavailable";
50664
50769
 
50665
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
50770
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
50666
50771
 
50667
50772
  /*
50668
50773
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -50702,7 +50807,7 @@ function createBrowserConfigurationAuthError(errorCode) {
50702
50807
  return new BrowserConfigurationAuthError(errorCode, BrowserConfigurationAuthErrorMessages[errorCode]);
50703
50808
  }
50704
50809
 
50705
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
50810
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
50706
50811
 
50707
50812
  /*
50708
50813
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -50864,7 +50969,7 @@ function createGuid() {
50864
50969
  return createNewGuid();
50865
50970
  }
50866
50971
 
50867
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
50972
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
50868
50973
 
50869
50974
  /*
50870
50975
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -50907,7 +51012,7 @@ class NavigationClient {
50907
51012
  }
50908
51013
  }
50909
51014
 
50910
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
51015
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
50911
51016
 
50912
51017
  /*
50913
51018
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -51028,7 +51133,7 @@ function getHeaderDict(headers) {
51028
51133
  }
51029
51134
  }
51030
51135
 
51031
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
51136
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
51032
51137
 
51033
51138
  /*
51034
51139
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -51163,12 +51268,12 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
51163
51268
  return overlayedConfig;
51164
51269
  }
51165
51270
 
51166
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
51271
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
51167
51272
  /* eslint-disable header/header */
51168
51273
  const name$1 = "@azure/msal-browser";
51169
- const version = "4.27.0";
51274
+ const version = "4.28.2";
51170
51275
 
51171
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
51276
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
51172
51277
  /*
51173
51278
  * Copyright (c) Microsoft Corporation. All rights reserved.
51174
51279
  * Licensed under the MIT License.
@@ -51196,7 +51301,7 @@ function getTokenKeysCacheKey(clientId, schema = CREDENTIAL_SCHEMA_VERSION) {
51196
51301
  return `${PREFIX}.${schema}.${TOKEN_KEYS}.${clientId}`;
51197
51302
  }
51198
51303
 
51199
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
51304
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
51200
51305
 
51201
51306
  /*
51202
51307
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -51293,7 +51398,7 @@ class BaseOperatingContext {
51293
51398
  }
51294
51399
  }
51295
51400
 
51296
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
51401
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
51297
51402
 
51298
51403
  /*
51299
51404
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -51339,7 +51444,7 @@ StandardOperatingContext.MODULE_NAME = "";
51339
51444
  */
51340
51445
  StandardOperatingContext.ID = "StandardOperatingContext";
51341
51446
 
51342
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
51447
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
51343
51448
 
51344
51449
  /*
51345
51450
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -51542,7 +51647,7 @@ class DatabaseStorage {
51542
51647
  }
51543
51648
  }
51544
51649
 
51545
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
51650
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
51546
51651
  /*
51547
51652
  * Copyright (c) Microsoft Corporation. All rights reserved.
51548
51653
  * Licensed under the MIT License.
@@ -51588,7 +51693,7 @@ class MemoryStorage {
51588
51693
  }
51589
51694
  }
51590
51695
 
51591
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
51696
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
51592
51697
 
51593
51698
  /*
51594
51699
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -51722,7 +51827,7 @@ class AsyncMemoryStorage {
51722
51827
  }
51723
51828
  }
51724
51829
 
51725
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
51830
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
51726
51831
 
51727
51832
  /*
51728
51833
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -51903,7 +52008,7 @@ function getSortedObjectString(obj) {
51903
52008
  return JSON.stringify(obj, Object.keys(obj).sort());
51904
52009
  }
51905
52010
 
51906
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
52011
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
51907
52012
 
51908
52013
  /*
51909
52014
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -51981,7 +52086,7 @@ function getCookieExpirationTime(cookieLifeDays) {
51981
52086
  return expr.toUTCString();
51982
52087
  }
51983
52088
 
51984
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
52089
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
51985
52090
 
51986
52091
  /*
51987
52092
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -52023,7 +52128,7 @@ function getTokenKeys(clientId, storage, schemaVersion) {
52023
52128
  };
52024
52129
  }
52025
52130
 
52026
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
52131
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
52027
52132
  /*
52028
52133
  * Copyright (c) Microsoft Corporation. All rights reserved.
52029
52134
  * Licensed under the MIT License.
@@ -52034,7 +52139,7 @@ function isEncrypted(data) {
52034
52139
  data.hasOwnProperty("data"));
52035
52140
  }
52036
52141
 
52037
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
52142
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
52038
52143
 
52039
52144
  /*
52040
52145
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -52324,7 +52429,7 @@ class LocalStorage {
52324
52429
  }
52325
52430
  }
52326
52431
 
52327
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
52432
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
52328
52433
 
52329
52434
  /*
52330
52435
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -52366,7 +52471,7 @@ class SessionStorage {
52366
52471
  }
52367
52472
  }
52368
52473
 
52369
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
52474
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
52370
52475
  /*
52371
52476
  * Copyright (c) Microsoft Corporation. All rights reserved.
52372
52477
  * Licensed under the MIT License.
@@ -52401,7 +52506,7 @@ const EventType = {
52401
52506
  BROKER_CONNECTION_ESTABLISHED: "msal:brokerConnectionEstablished",
52402
52507
  };
52403
52508
 
52404
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
52509
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
52405
52510
  /*
52406
52511
  * Copyright (c) Microsoft Corporation. All rights reserved.
52407
52512
  * Licensed under the MIT License.
@@ -52418,7 +52523,7 @@ function removeElementFromArray(array, element) {
52418
52523
  }
52419
52524
  }
52420
52525
 
52421
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
52526
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
52422
52527
 
52423
52528
  /*
52424
52529
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -52975,17 +53080,21 @@ class BrowserCacheManager extends CacheManager {
52975
53080
  if (!parsedAccount || !AccountEntity.isAccountEntity(parsedAccount)) {
52976
53081
  return null;
52977
53082
  }
53083
+ this.performanceClient.addFields({
53084
+ accountCachedBy: apiIdToName(parsedAccount.cachedByApiId),
53085
+ }, correlationId);
52978
53086
  return CacheManager.toObject(new AccountEntity(), parsedAccount);
52979
53087
  }
52980
53088
  /**
52981
53089
  * set account entity in the platform cache
52982
53090
  * @param account
52983
53091
  */
52984
- async setAccount(account, correlationId, kmsi) {
53092
+ async setAccount(account, correlationId, kmsi, apiId) {
52985
53093
  this.logger.trace("BrowserCacheManager.setAccount called");
52986
53094
  const key = this.generateAccountKey(AccountEntity.getAccountInfo(account));
52987
53095
  const timestamp = Date.now().toString();
52988
53096
  account.lastUpdatedAt = timestamp;
53097
+ account.cachedByApiId = apiId;
52989
53098
  await this.setUserData(key, JSON.stringify(account), correlationId, timestamp, kmsi);
52990
53099
  const wasAdded = this.addAccountKeyToMap(key, correlationId);
52991
53100
  this.performanceClient.addFields({ kmsi: kmsi }, correlationId);
@@ -53740,7 +53849,7 @@ class BrowserCacheManager extends CacheManager {
53740
53849
  * @param request
53741
53850
  */
53742
53851
  async hydrateCache(result, request) {
53743
- const idTokenEntity = createIdTokenEntity(result.account?.homeAccountId, result.account?.environment, result.idToken, this.clientId, result.tenantId);
53852
+ const idTokenEntity = createIdTokenEntity(result.account.homeAccountId, result.account.environment, result.idToken, this.clientId, result.tenantId);
53744
53853
  let claimsHash;
53745
53854
  if (request.claims) {
53746
53855
  claimsHash = await this.cryptoImpl.hashString(request.claims);
@@ -53752,7 +53861,7 @@ class BrowserCacheManager extends CacheManager {
53752
53861
  *
53753
53862
  * The next MSAL VFuture should map these both to same value if possible
53754
53863
  */
53755
- const accessTokenEntity = createAccessTokenEntity(result.account?.homeAccountId, result.account.environment, result.accessToken, this.clientId, result.tenantId, result.scopes.join(" "),
53864
+ const accessTokenEntity = createAccessTokenEntity(result.account.homeAccountId, result.account.environment, result.accessToken, this.clientId, result.tenantId, result.scopes.join(" "),
53756
53865
  // Access token expiresOn stored in seconds, converting from AuthenticationResult expiresOn stored as Date
53757
53866
  result.expiresOn
53758
53867
  ? toSecondsFromDate(result.expiresOn)
@@ -53765,7 +53874,7 @@ class BrowserCacheManager extends CacheManager {
53765
53874
  idToken: idTokenEntity,
53766
53875
  accessToken: accessTokenEntity,
53767
53876
  };
53768
- return this.saveCacheRecord(cacheRecord, result.correlationId, isKmsi(extractTokenClaims(result.idToken, base64Decode)));
53877
+ return this.saveCacheRecord(cacheRecord, result.correlationId, isKmsi(extractTokenClaims(result.idToken, base64Decode)), ApiId.hydrateCache);
53769
53878
  }
53770
53879
  /**
53771
53880
  * saves a cache record
@@ -53773,9 +53882,9 @@ class BrowserCacheManager extends CacheManager {
53773
53882
  * @param storeInCache {?StoreInCache}
53774
53883
  * @param correlationId {?string} correlation id
53775
53884
  */
53776
- async saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache) {
53885
+ async saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache) {
53777
53886
  try {
53778
- await super.saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache);
53887
+ await super.saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache);
53779
53888
  }
53780
53889
  catch (e) {
53781
53890
  if (e instanceof CacheError &&
@@ -53829,7 +53938,7 @@ const DEFAULT_BROWSER_CACHE_MANAGER = (clientId, logger, performanceClient, even
53829
53938
  return new BrowserCacheManager(clientId, cacheOptions, DEFAULT_CRYPTO_IMPLEMENTATION, logger, performanceClient, eventHandler);
53830
53939
  };
53831
53940
 
53832
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
53941
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
53833
53942
  /*
53834
53943
  * Copyright (c) Microsoft Corporation. All rights reserved.
53835
53944
  * Licensed under the MIT License.
@@ -53954,7 +54063,7 @@ function getActiveAccount(browserStorage, correlationId) {
53954
54063
  return browserStorage.getActiveAccount(correlationId);
53955
54064
  }
53956
54065
 
53957
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
54066
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
53958
54067
 
53959
54068
  /*
53960
54069
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -54060,7 +54169,7 @@ class EventHandler {
54060
54169
  }
54061
54170
  }
54062
54171
 
54063
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
54172
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
54064
54173
 
54065
54174
  /*
54066
54175
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -54176,7 +54285,7 @@ class BaseInteractionClient {
54176
54285
  }
54177
54286
  }
54178
54287
 
54179
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
54288
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
54180
54289
 
54181
54290
  /*
54182
54291
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -54261,7 +54370,7 @@ function validateRequestMethod(interactionRequest, protocolMode) {
54261
54370
  return httpMethod;
54262
54371
  }
54263
54372
 
54264
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
54373
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
54265
54374
 
54266
54375
  /*
54267
54376
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -54465,7 +54574,7 @@ class StandardInteractionClient extends BaseInteractionClient {
54465
54574
  }
54466
54575
  }
54467
54576
 
54468
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
54577
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
54469
54578
 
54470
54579
  /*
54471
54580
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -54489,7 +54598,7 @@ function extractBrowserRequestState(browserCrypto, state) {
54489
54598
  }
54490
54599
  }
54491
54600
 
54492
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
54601
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
54493
54602
 
54494
54603
  /*
54495
54604
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -54528,7 +54637,7 @@ function validateInteractionType(response, browserCrypto, interactionType) {
54528
54637
  }
54529
54638
  }
54530
54639
 
54531
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
54640
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
54532
54641
 
54533
54642
  /*
54534
54643
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -54549,7 +54658,7 @@ class InteractionHandler {
54549
54658
  * Function to handle response parameters from hash.
54550
54659
  * @param locationHash
54551
54660
  */
54552
- async handleCodeResponse(response, request) {
54661
+ async handleCodeResponse(response, request, apiId) {
54553
54662
  this.performanceClient.addQueueMeasurement(PerformanceEvents.HandleCodeResponse, request.correlationId);
54554
54663
  let authCodeResponse;
54555
54664
  try {
@@ -54565,7 +54674,7 @@ class InteractionHandler {
54565
54674
  throw e;
54566
54675
  }
54567
54676
  }
54568
- return invokeAsync(this.handleCodeResponseFromServer.bind(this), PerformanceEvents.HandleCodeResponseFromServer, this.logger, this.performanceClient, request.correlationId)(authCodeResponse, request);
54677
+ return invokeAsync(this.handleCodeResponseFromServer.bind(this), PerformanceEvents.HandleCodeResponseFromServer, this.logger, this.performanceClient, request.correlationId)(authCodeResponse, request, apiId);
54569
54678
  }
54570
54679
  /**
54571
54680
  * Process auth code response from AAD
@@ -54575,7 +54684,7 @@ class InteractionHandler {
54575
54684
  * @param networkModule
54576
54685
  * @returns
54577
54686
  */
54578
- async handleCodeResponseFromServer(authCodeResponse, request, validateNonce = true) {
54687
+ async handleCodeResponseFromServer(authCodeResponse, request, apiId, validateNonce = true) {
54579
54688
  this.performanceClient.addQueueMeasurement(PerformanceEvents.HandleCodeResponseFromServer, request.correlationId);
54580
54689
  this.logger.trace("InteractionHandler.handleCodeResponseFromServer called");
54581
54690
  // Assign code to request
@@ -54601,7 +54710,7 @@ class InteractionHandler {
54601
54710
  }
54602
54711
  }
54603
54712
  // Acquire token with retrieved code.
54604
- const tokenResponse = (await invokeAsync(this.authModule.acquireToken.bind(this.authModule), PerformanceEvents.AuthClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(this.authCodeRequest, authCodeResponse));
54713
+ const tokenResponse = (await invokeAsync(this.authModule.acquireToken.bind(this.authModule), PerformanceEvents.AuthClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(this.authCodeRequest, apiId, authCodeResponse));
54605
54714
  return tokenResponse;
54606
54715
  }
54607
54716
  /**
@@ -54624,7 +54733,7 @@ class InteractionHandler {
54624
54733
  }
54625
54734
  }
54626
54735
 
54627
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
54736
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
54628
54737
  /*
54629
54738
  * Copyright (c) Microsoft Corporation. All rights reserved.
54630
54739
  * Licensed under the MIT License.
@@ -54633,7 +54742,7 @@ const contentError = "ContentError";
54633
54742
  const pageException = "PageException";
54634
54743
  const userSwitch = "user_switch";
54635
54744
 
54636
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
54745
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
54637
54746
  /*
54638
54747
  * Copyright (c) Microsoft Corporation. All rights reserved.
54639
54748
  * Licensed under the MIT License.
@@ -54646,7 +54755,7 @@ const DISABLED = "DISABLED";
54646
54755
  const ACCOUNT_UNAVAILABLE = "ACCOUNT_UNAVAILABLE";
54647
54756
  const UX_NOT_ALLOWED = "UX_NOT_ALLOWED";
54648
54757
 
54649
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
54758
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
54650
54759
 
54651
54760
  /*
54652
54761
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -54711,7 +54820,7 @@ function createNativeAuthError(code, description, ext) {
54711
54820
  return new NativeAuthError(code, NativeAuthErrorMessages[code] || description, ext);
54712
54821
  }
54713
54822
 
54714
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
54823
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
54715
54824
 
54716
54825
  /*
54717
54826
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -54761,7 +54870,7 @@ class SilentCacheClient extends StandardInteractionClient {
54761
54870
  }
54762
54871
  }
54763
54872
 
54764
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
54873
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
54765
54874
 
54766
54875
  /*
54767
54876
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -55157,7 +55266,7 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
55157
55266
  */
55158
55267
  async cacheAccount(accountEntity, correlationId, kmsi) {
55159
55268
  // Store the account info and hence `nativeAccountId` in browser cache
55160
- await this.browserStorage.setAccount(accountEntity, this.correlationId, kmsi);
55269
+ await this.browserStorage.setAccount(accountEntity, this.correlationId, kmsi, this.apiId);
55161
55270
  // Remove any existing cached tokens for this account in browser storage
55162
55271
  this.browserStorage.removeAccountContext(AccountEntity.getAccountInfo(accountEntity), correlationId);
55163
55272
  }
@@ -55186,7 +55295,7 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
55186
55295
  idToken: cachedIdToken,
55187
55296
  accessToken: cachedAccessToken,
55188
55297
  };
55189
- return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, isKmsi(idTokenClaims), request.storeInCache);
55298
+ return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, isKmsi(idTokenClaims), this.apiId, request.storeInCache);
55190
55299
  }
55191
55300
  getExpiresInValue(tokenType, expiresIn) {
55192
55301
  return tokenType === AuthenticationScheme.POP
@@ -55388,7 +55497,7 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
55388
55497
  }
55389
55498
  }
55390
55499
 
55391
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
55500
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
55392
55501
 
55393
55502
  /*
55394
55503
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -55473,6 +55582,8 @@ async function getEARForm(frame, config, authority, request, logger, performance
55473
55582
  addCodeChallengeParams(parameters, request.codeChallenge, Constants.S256_CODE_CHALLENGE_METHOD);
55474
55583
  const queryParams = new Map();
55475
55584
  addExtraQueryParameters(queryParams, request.extraQueryParameters || {});
55585
+ // Add correlationId to query params so gateway can propagate it to IDPs
55586
+ addCorrelationId(queryParams, request.correlationId);
55476
55587
  const url = getAuthorizeUrl(authority, queryParams, config.auth.encodeExtraQueryParams, request.extraQueryParameters);
55477
55588
  return createForm(frame, url, parameters);
55478
55589
  }
@@ -55486,6 +55597,8 @@ async function getCodeForm(frame, config, authority, request, logger, performanc
55486
55597
  addPostBodyParameters(parameters, request.authorizePostBodyParameters || {});
55487
55598
  const queryParams = new Map();
55488
55599
  addExtraQueryParameters(queryParams, request.extraQueryParameters || {});
55600
+ // Add correlationId to query params so gateway can propagate it to IDPs
55601
+ addCorrelationId(queryParams, request.correlationId);
55489
55602
  const url = getAuthorizeUrl(authority, queryParams, config.auth.encodeExtraQueryParams, request.extraQueryParameters);
55490
55603
  return createForm(frame, url, parameters);
55491
55604
  }
@@ -55563,7 +55676,7 @@ async function handleResponseCode(request, response, codeVerifier, apiId, config
55563
55676
  // Create popup interaction handler.
55564
55677
  const interactionHandler = new InteractionHandler(authClient, browserStorage, authCodeRequest, logger, performanceClient);
55565
55678
  // Handle response from hash string.
55566
- const result = await invokeAsync(interactionHandler.handleCodeResponse.bind(interactionHandler), PerformanceEvents.HandleCodeResponse, logger, performanceClient, request.correlationId)(response, request);
55679
+ const result = await invokeAsync(interactionHandler.handleCodeResponse.bind(interactionHandler), PerformanceEvents.HandleCodeResponse, logger, performanceClient, request.correlationId)(response, request, apiId);
55567
55680
  return result;
55568
55681
  }
55569
55682
  /**
@@ -55610,10 +55723,10 @@ async function handleResponseEAR(request, response, apiId, config, authority, br
55610
55723
  cloud_instance_name: decryptedData.cloud_instance_name,
55611
55724
  msgraph_host: decryptedData.msgraph_host,
55612
55725
  };
55613
- return (await invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, logger, performanceClient, request.correlationId)(decryptedData, authority, nowSeconds(), request, additionalData, undefined, undefined, undefined, undefined));
55726
+ return (await invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, logger, performanceClient, request.correlationId)(decryptedData, authority, nowSeconds(), request, apiId, additionalData, undefined, undefined, undefined, undefined));
55614
55727
  }
55615
55728
 
55616
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
55729
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
55617
55730
 
55618
55731
  /*
55619
55732
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -55670,7 +55783,7 @@ async function generateCodeChallengeFromVerifier(pkceCodeVerifier, performanceCl
55670
55783
  }
55671
55784
  }
55672
55785
 
55673
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
55786
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
55674
55787
 
55675
55788
  /*
55676
55789
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -55935,7 +56048,7 @@ class PlatformAuthExtensionHandler {
55935
56048
  }
55936
56049
  }
55937
56050
 
55938
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
56051
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
55939
56052
 
55940
56053
  /*
55941
56054
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -56072,7 +56185,7 @@ class PlatformAuthDOMHandler {
56072
56185
  }
56073
56186
  }
56074
56187
 
56075
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
56188
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
56076
56189
  async function getPlatformAuthProvider(logger, performanceClient, correlationId, nativeBrokerHandshakeTimeout, enablePlatformBrokerDOMSupport) {
56077
56190
  logger.trace("getPlatformAuthProvider called", correlationId);
56078
56191
  logger.trace("Has client allowed platform auth via DOM API: " +
@@ -56137,7 +56250,7 @@ function isPlatformAuthAllowed(config, logger, platformAuthProvider, authenticat
56137
56250
  return true;
56138
56251
  }
56139
56252
 
56140
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
56253
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
56141
56254
 
56142
56255
  /*
56143
56256
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -56634,7 +56747,7 @@ class PopupClient extends StandardInteractionClient {
56634
56747
  }
56635
56748
  }
56636
56749
 
56637
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
56750
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
56638
56751
 
56639
56752
  /*
56640
56753
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -57074,7 +57187,7 @@ class RedirectClient extends StandardInteractionClient {
57074
57187
  }
57075
57188
  }
57076
57189
 
57077
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
57190
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
57078
57191
 
57079
57192
  /*
57080
57193
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -57230,7 +57343,7 @@ function removeHiddenIframe(iframe) {
57230
57343
  }
57231
57344
  }
57232
57345
 
57233
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
57346
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
57234
57347
 
57235
57348
  /*
57236
57349
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -57391,7 +57504,7 @@ class SilentIframeClient extends StandardInteractionClient {
57391
57504
  }
57392
57505
  }
57393
57506
 
57394
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
57507
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
57395
57508
 
57396
57509
  /*
57397
57510
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -57421,7 +57534,7 @@ class SilentRefreshClient extends StandardInteractionClient {
57421
57534
  account: silentRequest.account,
57422
57535
  });
57423
57536
  // Send request to renew token. Auth module will throw errors if token cannot be renewed.
57424
- return invokeAsync(refreshTokenClient.acquireTokenByRefreshToken.bind(refreshTokenClient), PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, this.logger, this.performanceClient, request.correlationId)(silentRequest).catch((e) => {
57537
+ return invokeAsync(refreshTokenClient.acquireTokenByRefreshToken.bind(refreshTokenClient), PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, this.logger, this.performanceClient, request.correlationId)(silentRequest, ApiId.acquireTokenSilent_silentFlow).catch((e) => {
57425
57538
  e.setCorrelationId(this.correlationId);
57426
57539
  serverTelemetryManager.cacheFailedRequest(e);
57427
57540
  throw e;
@@ -57457,7 +57570,7 @@ class SilentRefreshClient extends StandardInteractionClient {
57457
57570
  }
57458
57571
  }
57459
57572
 
57460
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
57573
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
57461
57574
 
57462
57575
  /*
57463
57576
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -57467,12 +57580,13 @@ class SilentRefreshClient extends StandardInteractionClient {
57467
57580
  * Token cache manager
57468
57581
  */
57469
57582
  class TokenCache {
57470
- constructor(configuration, storage, logger, cryptoObj) {
57583
+ constructor(configuration, storage, logger, cryptoObj, performanceClient) {
57471
57584
  this.isBrowserEnvironment = typeof window !== "undefined";
57472
57585
  this.config = configuration;
57473
57586
  this.storage = storage;
57474
57587
  this.logger = logger;
57475
57588
  this.cryptoObj = cryptoObj;
57589
+ this.performanceClient = performanceClient;
57476
57590
  }
57477
57591
  // Move getAllAccounts here and cache utility APIs
57478
57592
  /**
@@ -57487,30 +57601,37 @@ class TokenCache {
57487
57601
  throw createBrowserAuthError(nonBrowserEnvironment);
57488
57602
  }
57489
57603
  const correlationId = request.correlationId || createNewGuid();
57490
- const idTokenClaims = response.id_token
57491
- ? extractTokenClaims(response.id_token, base64Decode)
57492
- : undefined;
57493
- const kmsi = isKmsi(idTokenClaims || {});
57494
- const authorityOptions = {
57495
- protocolMode: this.config.auth.protocolMode,
57496
- knownAuthorities: this.config.auth.knownAuthorities,
57497
- cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,
57498
- authorityMetadata: this.config.auth.authorityMetadata,
57499
- skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache,
57500
- };
57501
- const authority = request.authority
57502
- ? new Authority(Authority.generateAuthority(request.authority, request.azureCloudOptions), this.config.system.networkClient, this.storage, authorityOptions, this.logger, request.correlationId || createNewGuid())
57503
- : undefined;
57504
- const cacheRecordAccount = await this.loadAccount(request, options.clientInfo || response.client_info || "", correlationId, idTokenClaims, authority);
57505
- const idToken = await this.loadIdToken(response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, cacheRecordAccount.realm, correlationId, kmsi);
57506
- const accessToken = await this.loadAccessToken(request, response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, cacheRecordAccount.realm, options, correlationId, kmsi);
57507
- const refreshToken = await this.loadRefreshToken(response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, correlationId, kmsi);
57508
- return this.generateAuthenticationResult(request, {
57509
- account: cacheRecordAccount,
57510
- idToken,
57511
- accessToken,
57512
- refreshToken,
57513
- }, idTokenClaims, authority);
57604
+ const rootMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.LoadExternalTokens, correlationId);
57605
+ try {
57606
+ const idTokenClaims = response.id_token
57607
+ ? extractTokenClaims(response.id_token, base64Decode)
57608
+ : undefined;
57609
+ const kmsi = isKmsi(idTokenClaims || {});
57610
+ const authorityOptions = {
57611
+ protocolMode: this.config.auth.protocolMode,
57612
+ knownAuthorities: this.config.auth.knownAuthorities,
57613
+ cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,
57614
+ authorityMetadata: this.config.auth.authorityMetadata,
57615
+ skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache,
57616
+ };
57617
+ const authorityString = request.authority || this.config.auth.authority;
57618
+ const authority = await createDiscoveredInstance(Authority.generateAuthority(authorityString, request.azureCloudOptions), this.config.system.networkClient, this.storage, authorityOptions, this.logger, correlationId, this.performanceClient);
57619
+ const cacheRecordAccount = await invokeAsync(this.loadAccount.bind(this), PerformanceEvents.LoadAccount, this.logger, this.performanceClient, correlationId)(request, options.clientInfo || response.client_info || "", correlationId, authority, idTokenClaims);
57620
+ const idToken = await invokeAsync(this.loadIdToken.bind(this), PerformanceEvents.LoadIdToken, this.logger, this.performanceClient, correlationId)(response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, cacheRecordAccount.realm, correlationId, kmsi);
57621
+ const accessToken = await invokeAsync(this.loadAccessToken.bind(this), PerformanceEvents.LoadAccessToken, this.logger, this.performanceClient, correlationId)(request, response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, cacheRecordAccount.realm, options, correlationId, kmsi);
57622
+ const refreshToken = await invokeAsync(this.loadRefreshToken.bind(this), PerformanceEvents.LoadRefreshToken, this.logger, this.performanceClient, correlationId)(response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, correlationId, kmsi);
57623
+ rootMeasurement.end({ success: true }, undefined, AccountEntity.getAccountInfo(cacheRecordAccount));
57624
+ return this.generateAuthenticationResult(request, {
57625
+ account: cacheRecordAccount,
57626
+ idToken,
57627
+ accessToken,
57628
+ refreshToken,
57629
+ }, authority, idTokenClaims);
57630
+ }
57631
+ catch (error) {
57632
+ rootMeasurement.end({ success: false }, error);
57633
+ throw error;
57634
+ }
57514
57635
  }
57515
57636
  /**
57516
57637
  * Helper function to load account to msal-browser cache
@@ -57521,23 +57642,23 @@ class TokenCache {
57521
57642
  * @param requestHomeAccountId
57522
57643
  * @returns `AccountEntity`
57523
57644
  */
57524
- async loadAccount(request, clientInfo, correlationId, idTokenClaims, authority) {
57645
+ async loadAccount(request, clientInfo, correlationId, authority, idTokenClaims) {
57525
57646
  this.logger.verbose("TokenCache - loading account");
57526
57647
  if (request.account) {
57527
57648
  const accountEntity = AccountEntity.createFromAccountInfo(request.account);
57528
- await this.storage.setAccount(accountEntity, correlationId, isKmsi(idTokenClaims || {}));
57649
+ await this.storage.setAccount(accountEntity, correlationId, isKmsi(idTokenClaims || {}), ApiId.loadExternalTokens);
57529
57650
  return accountEntity;
57530
57651
  }
57531
- else if (!authority || (!clientInfo && !idTokenClaims)) {
57532
- this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead.");
57652
+ else if (!clientInfo && !idTokenClaims) {
57653
+ this.logger.error("TokenCache - if an account is not provided on the request, clientInfo or idToken must be provided instead.");
57533
57654
  throw createBrowserAuthError(unableToLoadToken);
57534
57655
  }
57535
57656
  const homeAccountId = AccountEntity.generateHomeAccountId(clientInfo, authority.authorityType, this.logger, this.cryptoObj, idTokenClaims);
57536
57657
  const claimsTenantId = idTokenClaims?.tid;
57537
- const cachedAccount = buildAccountToCache(this.storage, authority, homeAccountId, base64Decode, correlationId, idTokenClaims, clientInfo, authority.hostnameAndPort, claimsTenantId, undefined, // authCodePayload
57658
+ const cachedAccount = buildAccountToCache(this.storage, authority, homeAccountId, base64Decode, correlationId, idTokenClaims, clientInfo, authority.getPreferredCache(), claimsTenantId, undefined, // authCodePayload
57538
57659
  undefined, // nativeAccountId
57539
57660
  this.logger);
57540
- await this.storage.setAccount(cachedAccount, correlationId, isKmsi(idTokenClaims || {}));
57661
+ await this.storage.setAccount(cachedAccount, correlationId, isKmsi(idTokenClaims || {}), ApiId.loadExternalTokens);
57541
57662
  return cachedAccount;
57542
57663
  }
57543
57664
  /**
@@ -57606,9 +57727,15 @@ class TokenCache {
57606
57727
  this.logger.verbose("TokenCache - no refresh token found in response");
57607
57728
  return null;
57608
57729
  }
57730
+ const expiresOn = response.refresh_token_expires_in
57731
+ ? response.refresh_token_expires_in + nowSeconds()
57732
+ : undefined;
57733
+ this.performanceClient.addFields({
57734
+ extRtExpiresOnSeconds: expiresOn,
57735
+ }, correlationId);
57609
57736
  this.logger.verbose("TokenCache - loading refresh token");
57610
57737
  const refreshTokenEntity = createRefreshTokenEntity(homeAccountId, environment, response.refresh_token, this.config.auth.clientId, response.foci, undefined, // userAssertionHash
57611
- response.refresh_token_expires_in);
57738
+ expiresOn);
57612
57739
  await this.storage.setRefreshTokenCredential(refreshTokenEntity, correlationId, kmsi);
57613
57740
  return refreshTokenEntity;
57614
57741
  }
@@ -57620,7 +57747,7 @@ class TokenCache {
57620
57747
  * @param authority
57621
57748
  * @returns `AuthenticationResult`
57622
57749
  */
57623
- generateAuthenticationResult(request, cacheRecord, idTokenClaims, authority) {
57750
+ generateAuthenticationResult(request, cacheRecord, authority, idTokenClaims) {
57624
57751
  let accessToken = "";
57625
57752
  let responseScopes = [];
57626
57753
  let expiresOn = null;
@@ -57657,7 +57784,7 @@ class TokenCache {
57657
57784
  }
57658
57785
  }
57659
57786
 
57660
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
57787
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
57661
57788
 
57662
57789
  /*
57663
57790
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -57670,7 +57797,7 @@ class HybridSpaAuthorizationCodeClient extends AuthorizationCodeClient {
57670
57797
  }
57671
57798
  }
57672
57799
 
57673
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
57800
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
57674
57801
 
57675
57802
  /*
57676
57803
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -57717,7 +57844,7 @@ class SilentAuthCodeClient extends StandardInteractionClient {
57717
57844
  msgraph_host: request.msGraphHost,
57718
57845
  cloud_graph_host_name: request.cloudGraphHostName,
57719
57846
  cloud_instance_host_name: request.cloudInstanceHostName,
57720
- }, silentRequest, false);
57847
+ }, silentRequest, this.apiId, false);
57721
57848
  }
57722
57849
  catch (e) {
57723
57850
  if (e instanceof AuthError) {
@@ -57736,7 +57863,7 @@ class SilentAuthCodeClient extends StandardInteractionClient {
57736
57863
  }
57737
57864
  }
57738
57865
 
57739
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
57866
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
57740
57867
  /*
57741
57868
  * Copyright (c) Microsoft Corporation. All rights reserved.
57742
57869
  * Licensed under the MIT License.
@@ -57756,7 +57883,7 @@ function collectInstanceStats(currentClientId, performanceEvent, logger) {
57756
57883
  });
57757
57884
  }
57758
57885
 
57759
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
57886
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
57760
57887
 
57761
57888
  /*
57762
57889
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -57833,7 +57960,7 @@ class StandardController {
57833
57960
  };
57834
57961
  this.nativeInternalStorage = new BrowserCacheManager(this.config.auth.clientId, nativeCacheOptions, this.browserCrypto, this.logger, this.performanceClient, this.eventHandler);
57835
57962
  // Initialize the token cache
57836
- this.tokenCache = new TokenCache(this.config, this.browserStorage, this.logger, this.browserCrypto);
57963
+ this.tokenCache = new TokenCache(this.config, this.browserStorage, this.logger, this.browserCrypto, this.performanceClient);
57837
57964
  this.activeSilentTokenRequests = new Map();
57838
57965
  // Register listener functions
57839
57966
  this.trackPageVisibility = this.trackPageVisibility.bind(this);
@@ -58663,7 +58790,7 @@ class StandardController {
58663
58790
  this.logger.verbose("hydrateCache called");
58664
58791
  // Account gets saved to browser storage regardless of native or not
58665
58792
  const accountEntity = AccountEntity.createFromAccountInfo(result.account, result.cloudGraphHostName, result.msGraphHost);
58666
- await this.browserStorage.setAccount(accountEntity, result.correlationId, isKmsi(result.idTokenClaims));
58793
+ await this.browserStorage.setAccount(accountEntity, result.correlationId, isKmsi(result.idTokenClaims), ApiId.hydrateCache);
58667
58794
  if (result.fromNativeBroker) {
58668
58795
  this.logger.verbose("Response was from native broker, storing in-memory");
58669
58796
  // Tokens from native broker are stored in-memory
@@ -59209,7 +59336,7 @@ function checkIfRefreshTokenErrorCanBeResolvedSilently(refreshTokenError, cacheL
59209
59336
  return isSilentlyResolvable && tryIframeRenewal;
59210
59337
  }
59211
59338
 
59212
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
59339
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
59213
59340
 
59214
59341
  /*
59215
59342
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -59221,7 +59348,7 @@ async function createV3Controller(config, request) {
59221
59348
  return StandardController.createController(standard, request);
59222
59349
  }
59223
59350
 
59224
- /*! @azure/msal-browser v4.27.0 2025-12-04 */
59351
+ /*! @azure/msal-browser v4.28.2 2026-02-10 */
59225
59352
 
59226
59353
  /*
59227
59354
  * Copyright (c) Microsoft Corporation. All rights reserved.