@azure/msal-node 5.0.1 → 5.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/cache/CacheHelpers.mjs +1 -1
  2. package/dist/cache/NodeStorage.mjs +1 -1
  3. package/dist/cache/TokenCache.mjs +1 -1
  4. package/dist/cache/distributed/DistributedCachePlugin.mjs +1 -1
  5. package/dist/cache/serializer/Deserializer.mjs +1 -1
  6. package/dist/cache/serializer/Serializer.mjs +1 -1
  7. package/dist/client/BaseClient.mjs +1 -1
  8. package/dist/client/ClientApplication.d.ts.map +1 -1
  9. package/dist/client/ClientApplication.mjs +5 -5
  10. package/dist/client/ClientApplication.mjs.map +1 -1
  11. package/dist/client/ClientAssertion.mjs +1 -1
  12. package/dist/client/ClientCredentialClient.d.ts.map +1 -1
  13. package/dist/client/ClientCredentialClient.mjs +3 -2
  14. package/dist/client/ClientCredentialClient.mjs.map +1 -1
  15. package/dist/client/ConfidentialClientApplication.mjs +1 -1
  16. package/dist/client/DeviceCodeClient.d.ts.map +1 -1
  17. package/dist/client/DeviceCodeClient.mjs +3 -2
  18. package/dist/client/DeviceCodeClient.mjs.map +1 -1
  19. package/dist/client/ManagedIdentityApplication.mjs +1 -1
  20. package/dist/client/ManagedIdentityClient.mjs +1 -1
  21. package/dist/client/ManagedIdentitySources/AppService.mjs +1 -1
  22. package/dist/client/ManagedIdentitySources/AzureArc.mjs +1 -1
  23. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
  24. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +3 -3
  25. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map +1 -1
  26. package/dist/client/ManagedIdentitySources/CloudShell.mjs +1 -1
  27. package/dist/client/ManagedIdentitySources/Imds.mjs +1 -1
  28. package/dist/client/ManagedIdentitySources/MachineLearning.mjs +1 -1
  29. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +1 -1
  30. package/dist/client/OnBehalfOfClient.d.ts.map +1 -1
  31. package/dist/client/OnBehalfOfClient.mjs +3 -2
  32. package/dist/client/OnBehalfOfClient.mjs.map +1 -1
  33. package/dist/client/PublicClientApplication.mjs +1 -1
  34. package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
  35. package/dist/client/UsernamePasswordClient.mjs +3 -2
  36. package/dist/client/UsernamePasswordClient.mjs.map +1 -1
  37. package/dist/config/Configuration.mjs +1 -1
  38. package/dist/config/ManagedIdentityId.mjs +1 -1
  39. package/dist/config/ManagedIdentityRequestParameters.mjs +1 -1
  40. package/dist/crypto/CryptoProvider.mjs +1 -1
  41. package/dist/crypto/GuidGenerator.mjs +1 -1
  42. package/dist/crypto/HashUtils.mjs +1 -1
  43. package/dist/crypto/PkceGenerator.mjs +1 -1
  44. package/dist/error/ClientAuthErrorCodes.mjs +1 -1
  45. package/dist/error/ManagedIdentityError.mjs +1 -1
  46. package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
  47. package/dist/error/NodeAuthError.mjs +1 -1
  48. package/dist/index.mjs +1 -1
  49. package/dist/internals.mjs +1 -1
  50. package/dist/network/HttpClient.mjs +1 -1
  51. package/dist/network/HttpClientWithRetries.mjs +1 -1
  52. package/dist/network/LoopbackClient.mjs +1 -1
  53. package/dist/packageMetadata.d.ts +1 -1
  54. package/dist/packageMetadata.mjs +2 -2
  55. package/dist/protocol/Authorize.mjs +1 -1
  56. package/dist/retry/DefaultManagedIdentityRetryPolicy.mjs +1 -1
  57. package/dist/retry/ExponentialRetryStrategy.mjs +1 -1
  58. package/dist/retry/ImdsRetryPolicy.mjs +1 -1
  59. package/dist/retry/LinearRetryStrategy.mjs +1 -1
  60. package/dist/utils/Constants.d.ts +2 -0
  61. package/dist/utils/Constants.d.ts.map +1 -1
  62. package/dist/utils/Constants.mjs +3 -1
  63. package/dist/utils/Constants.mjs.map +1 -1
  64. package/dist/utils/EncodingUtils.mjs +1 -1
  65. package/dist/utils/TimeUtils.mjs +1 -1
  66. package/lib/msal-node.cjs +103 -89
  67. package/lib/msal-node.cjs.map +1 -1
  68. package/lib/types/client/ClientApplication.d.ts.map +1 -1
  69. package/lib/types/client/ClientCredentialClient.d.ts.map +1 -1
  70. package/lib/types/client/DeviceCodeClient.d.ts.map +1 -1
  71. package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
  72. package/lib/types/client/OnBehalfOfClient.d.ts.map +1 -1
  73. package/lib/types/client/UsernamePasswordClient.d.ts.map +1 -1
  74. package/lib/types/packageMetadata.d.ts +1 -1
  75. package/lib/types/utils/Constants.d.ts +2 -0
  76. package/lib/types/utils/Constants.d.ts.map +1 -1
  77. package/package.json +5 -3
  78. package/src/client/ClientApplication.ts +9 -3
  79. package/src/client/ClientCredentialClient.ts +3 -1
  80. package/src/client/DeviceCodeClient.ts +3 -1
  81. package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +3 -1
  82. package/src/client/OnBehalfOfClient.ts +2 -0
  83. package/src/client/UsernamePasswordClient.ts +3 -1
  84. package/src/packageMetadata.ts +1 -1
  85. package/src/utils/Constants.ts +2 -0
package/lib/msal-node.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-node v5.0.1 2026-01-16 */
1
+ /*! @azure/msal-node v5.0.3 2026-01-28 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
@@ -149,7 +149,7 @@ class Serializer {
149
149
  }
150
150
  }
151
151
 
152
- /*! @azure/msal-common v16.0.1 2026-01-16 */
152
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
153
153
  /*
154
154
  * Copyright (c) Microsoft Corporation. All rights reserved.
155
155
  * Licensed under the MIT License.
@@ -397,7 +397,7 @@ const EncodingTypes = {
397
397
  UTF8: "utf-8",
398
398
  };
399
399
 
400
- /*! @azure/msal-common v16.0.1 2026-01-16 */
400
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
401
401
  /*
402
402
  * Copyright (c) Microsoft Corporation. All rights reserved.
403
403
  * Licensed under the MIT License.
@@ -448,7 +448,7 @@ const BROKER_CLIENT_ID = "brk_client_id";
448
448
  const BROKER_REDIRECT_URI = "brk_redirect_uri";
449
449
  const INSTANCE_AWARE = "instance_aware";
450
450
 
451
- /*! @azure/msal-common v16.0.1 2026-01-16 */
451
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
452
452
  /*
453
453
  * Copyright (c) Microsoft Corporation. All rights reserved.
454
454
  * Licensed under the MIT License.
@@ -479,7 +479,7 @@ function createAuthError(code, additionalMessage) {
479
479
  return new AuthError(code, additionalMessage || getDefaultErrorMessage(code));
480
480
  }
481
481
 
482
- /*! @azure/msal-common v16.0.1 2026-01-16 */
482
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
483
483
 
484
484
  /*
485
485
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -499,7 +499,7 @@ function createClientConfigurationError(errorCode) {
499
499
  return new ClientConfigurationError(errorCode);
500
500
  }
501
501
 
502
- /*! @azure/msal-common v16.0.1 2026-01-16 */
502
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
503
503
  /*
504
504
  * Copyright (c) Microsoft Corporation. All rights reserved.
505
505
  * Licensed under the MIT License.
@@ -596,7 +596,7 @@ class StringUtils {
596
596
  }
597
597
  }
598
598
 
599
- /*! @azure/msal-common v16.0.1 2026-01-16 */
599
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
600
600
 
601
601
  /*
602
602
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -619,7 +619,7 @@ function createClientAuthError(errorCode, additionalMessage) {
619
619
  return new ClientAuthError(errorCode, additionalMessage);
620
620
  }
621
621
 
622
- /*! @azure/msal-common v16.0.1 2026-01-16 */
622
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
623
623
  /*
624
624
  * Copyright (c) Microsoft Corporation. All rights reserved.
625
625
  * Licensed under the MIT License.
@@ -673,7 +673,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
673
673
  urlParseError: urlParseError
674
674
  });
675
675
 
676
- /*! @azure/msal-common v16.0.1 2026-01-16 */
676
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
677
677
  /*
678
678
  * Copyright (c) Microsoft Corporation. All rights reserved.
679
679
  * Licensed under the MIT License.
@@ -757,7 +757,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
757
757
  userCanceled: userCanceled
758
758
  });
759
759
 
760
- /*! @azure/msal-common v16.0.1 2026-01-16 */
760
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
761
761
 
762
762
  /*
763
763
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -952,7 +952,7 @@ class ScopeSet {
952
952
  }
953
953
  }
954
954
 
955
- /*! @azure/msal-common v16.0.1 2026-01-16 */
955
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
956
956
 
957
957
  /*
958
958
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1337,7 +1337,7 @@ function addBrokerParameters(parameters, brokerClientId, brokerRedirectUri) {
1337
1337
  }
1338
1338
  }
1339
1339
 
1340
- /*! @azure/msal-common v16.0.1 2026-01-16 */
1340
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
1341
1341
  /**
1342
1342
  * Parses hash string from given string. Returns empty string if no hash symbol is found.
1343
1343
  * @param hashString
@@ -1390,7 +1390,7 @@ function mapToQueryString(parameters) {
1390
1390
  return queryParameterArray.join("&");
1391
1391
  }
1392
1392
 
1393
- /*! @azure/msal-common v16.0.1 2026-01-16 */
1393
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
1394
1394
 
1395
1395
  /*
1396
1396
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1429,7 +1429,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
1429
1429
  },
1430
1430
  };
1431
1431
 
1432
- /*! @azure/msal-common v16.0.1 2026-01-16 */
1432
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
1433
1433
  /*
1434
1434
  * Copyright (c) Microsoft Corporation. All rights reserved.
1435
1435
  * Licensed under the MIT License.
@@ -1690,12 +1690,12 @@ class Logger {
1690
1690
  }
1691
1691
  }
1692
1692
 
1693
- /*! @azure/msal-common v16.0.1 2026-01-16 */
1693
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
1694
1694
  /* eslint-disable header/header */
1695
1695
  const name$1 = "@azure/msal-common";
1696
- const version$1 = "16.0.1";
1696
+ const version$1 = "16.0.3";
1697
1697
 
1698
- /*! @azure/msal-common v16.0.1 2026-01-16 */
1698
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
1699
1699
  /*
1700
1700
  * Copyright (c) Microsoft Corporation. All rights reserved.
1701
1701
  * Licensed under the MIT License.
@@ -1715,7 +1715,7 @@ const AzureCloudInstance = {
1715
1715
  AzureUsGovernment: "https://login.microsoftonline.us",
1716
1716
  };
1717
1717
 
1718
- /*! @azure/msal-common v16.0.1 2026-01-16 */
1718
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
1719
1719
  /*
1720
1720
  * Copyright (c) Microsoft Corporation. All rights reserved.
1721
1721
  * Licensed under the MIT License.
@@ -1797,7 +1797,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
1797
1797
  return updatedAccountInfo;
1798
1798
  }
1799
1799
 
1800
- /*! @azure/msal-common v16.0.1 2026-01-16 */
1800
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
1801
1801
 
1802
1802
  /*
1803
1803
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1877,7 +1877,7 @@ function checkMaxAge(authTime, maxAge) {
1877
1877
  }
1878
1878
  }
1879
1879
 
1880
- /*! @azure/msal-common v16.0.1 2026-01-16 */
1880
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
1881
1881
 
1882
1882
  /*
1883
1883
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2034,7 +2034,7 @@ class UrlString {
2034
2034
  }
2035
2035
  }
2036
2036
 
2037
- /*! @azure/msal-common v16.0.1 2026-01-16 */
2037
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
2038
2038
 
2039
2039
  /*
2040
2040
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2176,7 +2176,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
2176
2176
  return null;
2177
2177
  }
2178
2178
 
2179
- /*! @azure/msal-common v16.0.1 2026-01-16 */
2179
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
2180
2180
  /*
2181
2181
  * Copyright (c) Microsoft Corporation. All rights reserved.
2182
2182
  * Licensed under the MIT License.
@@ -2184,7 +2184,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
2184
2184
  const cacheQuotaExceeded = "cache_quota_exceeded";
2185
2185
  const cacheErrorUnknown = "cache_error_unknown";
2186
2186
 
2187
- /*! @azure/msal-common v16.0.1 2026-01-16 */
2187
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
2188
2188
 
2189
2189
  /*
2190
2190
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2222,7 +2222,7 @@ function createCacheError(e) {
2222
2222
  }
2223
2223
  }
2224
2224
 
2225
- /*! @azure/msal-common v16.0.1 2026-01-16 */
2225
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
2226
2226
 
2227
2227
  /*
2228
2228
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2260,7 +2260,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
2260
2260
  };
2261
2261
  }
2262
2262
 
2263
- /*! @azure/msal-common v16.0.1 2026-01-16 */
2263
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
2264
2264
  /*
2265
2265
  * Copyright (c) Microsoft Corporation. All rights reserved.
2266
2266
  * Licensed under the MIT License.
@@ -2275,7 +2275,7 @@ const AuthorityType = {
2275
2275
  Ciam: 3,
2276
2276
  };
2277
2277
 
2278
- /*! @azure/msal-common v16.0.1 2026-01-16 */
2278
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
2279
2279
  /*
2280
2280
  * Copyright (c) Microsoft Corporation. All rights reserved.
2281
2281
  * Licensed under the MIT License.
@@ -2297,7 +2297,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
2297
2297
  return null;
2298
2298
  }
2299
2299
 
2300
- /*! @azure/msal-common v16.0.1 2026-01-16 */
2300
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
2301
2301
  /*
2302
2302
  * Copyright (c) Microsoft Corporation. All rights reserved.
2303
2303
  * Licensed under the MIT License.
@@ -2321,11 +2321,18 @@ const ProtocolMode = {
2321
2321
  EAR: "EAR",
2322
2322
  };
2323
2323
 
2324
- /*! @azure/msal-common v16.0.1 2026-01-16 */
2324
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
2325
2325
  /**
2326
2326
  * Returns the AccountInfo interface for this account.
2327
2327
  */
2328
2328
  function getAccountInfo(accountEntity) {
2329
+ const tenantProfiles = accountEntity.tenantProfiles || [];
2330
+ // Ensure at least the home tenant profile exists
2331
+ if (tenantProfiles.length === 0 &&
2332
+ accountEntity.realm &&
2333
+ accountEntity.localAccountId) {
2334
+ tenantProfiles.push(buildTenantProfile(accountEntity.homeAccountId, accountEntity.localAccountId, accountEntity.realm));
2335
+ }
2329
2336
  return {
2330
2337
  homeAccountId: accountEntity.homeAccountId,
2331
2338
  environment: accountEntity.environment,
@@ -2337,7 +2344,7 @@ function getAccountInfo(accountEntity) {
2337
2344
  nativeAccountId: accountEntity.nativeAccountId,
2338
2345
  authorityType: accountEntity.authorityType,
2339
2346
  // Deserialize tenant profiles array into a Map
2340
- tenantProfiles: new Map((accountEntity.tenantProfiles || []).map((tenantProfile) => {
2347
+ tenantProfiles: new Map(tenantProfiles.map((tenantProfile) => {
2341
2348
  return [tenantProfile.tenantId, tenantProfile];
2342
2349
  })),
2343
2350
  dataBoundary: accountEntity.dataBoundary,
@@ -2457,7 +2464,7 @@ function isAccountEntity(entity) {
2457
2464
  entity.hasOwnProperty("authorityType"));
2458
2465
  }
2459
2466
 
2460
- /*! @azure/msal-common v16.0.1 2026-01-16 */
2467
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
2461
2468
 
2462
2469
  /*
2463
2470
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2623,13 +2630,13 @@ class CacheManager {
2623
2630
  * @param storeInCache {?StoreInCache}
2624
2631
  * @param correlationId {?string} correlation id
2625
2632
  */
2626
- async saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache) {
2633
+ async saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache) {
2627
2634
  if (!cacheRecord) {
2628
2635
  throw createClientAuthError(invalidCacheRecord);
2629
2636
  }
2630
2637
  try {
2631
2638
  if (!!cacheRecord.account) {
2632
- await this.setAccount(cacheRecord.account, correlationId, kmsi);
2639
+ await this.setAccount(cacheRecord.account, correlationId, kmsi, apiId);
2633
2640
  }
2634
2641
  if (!!cacheRecord.idToken && storeInCache?.idToken !== false) {
2635
2642
  await this.setIdTokenCredential(cacheRecord.idToken, correlationId, kmsi);
@@ -3553,7 +3560,7 @@ class DefaultStorageClass extends CacheManager {
3553
3560
  }
3554
3561
  }
3555
3562
 
3556
- /*! @azure/msal-common v16.0.1 2026-01-16 */
3563
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
3557
3564
  /*
3558
3565
  * Copyright (c) Microsoft Corporation. All rights reserved.
3559
3566
  * Licensed under the MIT License.
@@ -3567,7 +3574,7 @@ class DefaultStorageClass extends CacheManager {
3567
3574
  const PerformanceEventStatus = {
3568
3575
  InProgress: 1};
3569
3576
 
3570
- /*! @azure/msal-common v16.0.1 2026-01-16 */
3577
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
3571
3578
 
3572
3579
  /*
3573
3580
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3622,7 +3629,7 @@ class StubPerformanceClient {
3622
3629
  }
3623
3630
  }
3624
3631
 
3625
- /*! @azure/msal-common v16.0.1 2026-01-16 */
3632
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
3626
3633
 
3627
3634
  /*
3628
3635
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3716,7 +3723,7 @@ function isOidcProtocolMode(config) {
3716
3723
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
3717
3724
  }
3718
3725
 
3719
- /*! @azure/msal-common v16.0.1 2026-01-16 */
3726
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
3720
3727
 
3721
3728
  /*
3722
3729
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3735,7 +3742,7 @@ class ServerError extends AuthError {
3735
3742
  }
3736
3743
  }
3737
3744
 
3738
- /*! @azure/msal-common v16.0.1 2026-01-16 */
3745
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
3739
3746
  /*
3740
3747
  * Copyright (c) Microsoft Corporation. All rights reserved.
3741
3748
  * Licensed under the MIT License.
@@ -3763,7 +3770,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
3763
3770
  uxNotAllowed: uxNotAllowed
3764
3771
  });
3765
3772
 
3766
- /*! @azure/msal-common v16.0.1 2026-01-16 */
3773
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
3767
3774
 
3768
3775
  /*
3769
3776
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3829,7 +3836,7 @@ function createInteractionRequiredAuthError(errorCode, errorMessage) {
3829
3836
  return new InteractionRequiredAuthError(errorCode, errorMessage);
3830
3837
  }
3831
3838
 
3832
- /*! @azure/msal-common v16.0.1 2026-01-16 */
3839
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
3833
3840
  /**
3834
3841
  * Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.
3835
3842
  * @param base64Decode
@@ -3861,7 +3868,7 @@ function parseRequestState(base64Decode, state) {
3861
3868
  }
3862
3869
  }
3863
3870
 
3864
- /*! @azure/msal-common v16.0.1 2026-01-16 */
3871
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
3865
3872
  /*
3866
3873
  * Copyright (c) Microsoft Corporation. All rights reserved.
3867
3874
  * Licensed under the MIT License.
@@ -3916,7 +3923,7 @@ function delay(t, value) {
3916
3923
  return new Promise((resolve) => setTimeout(() => resolve(value), t));
3917
3924
  }
3918
3925
 
3919
- /*! @azure/msal-common v16.0.1 2026-01-16 */
3926
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
3920
3927
  /*
3921
3928
  * Copyright (c) Microsoft Corporation. All rights reserved.
3922
3929
  * Licensed under the MIT License.
@@ -3978,7 +3985,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
3978
3985
  */
3979
3986
  const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
3980
3987
 
3981
- /*! @azure/msal-common v16.0.1 2026-01-16 */
3988
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
3982
3989
  /*
3983
3990
  * Copyright (c) Microsoft Corporation. All rights reserved.
3984
3991
  * Licensed under the MIT License.
@@ -4073,7 +4080,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
4073
4080
  };
4074
4081
  };
4075
4082
 
4076
- /*! @azure/msal-common v16.0.1 2026-01-16 */
4083
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
4077
4084
 
4078
4085
  /*
4079
4086
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4153,7 +4160,7 @@ class PopTokenGenerator {
4153
4160
  }
4154
4161
  }
4155
4162
 
4156
- /*! @azure/msal-common v16.0.1 2026-01-16 */
4163
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
4157
4164
  /*
4158
4165
  * Copyright (c) Microsoft Corporation. All rights reserved.
4159
4166
  * Licensed under the MIT License.
@@ -4180,7 +4187,7 @@ class PopTokenGenerator {
4180
4187
  }
4181
4188
  }
4182
4189
 
4183
- /*! @azure/msal-common v16.0.1 2026-01-16 */
4190
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
4184
4191
 
4185
4192
  /*
4186
4193
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4439,7 +4446,7 @@ function isAuthorityMetadataExpired(metadata) {
4439
4446
  return metadata.expiresAt <= nowSeconds();
4440
4447
  }
4441
4448
 
4442
- /*! @azure/msal-common v16.0.1 2026-01-16 */
4449
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
4443
4450
 
4444
4451
  /*
4445
4452
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4506,7 +4513,7 @@ class ResponseHandler {
4506
4513
  * @param serverTokenResponse
4507
4514
  * @param authority
4508
4515
  */
4509
- async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {
4516
+ async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, apiId, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {
4510
4517
  // create an idToken object (not entity)
4511
4518
  let idTokenClaims;
4512
4519
  if (serverTokenResponse.id_token) {
@@ -4553,14 +4560,19 @@ class ResponseHandler {
4553
4560
  if (handlingRefreshTokenResponse &&
4554
4561
  !forceCacheRefreshTokenResponse &&
4555
4562
  cacheRecord.account) {
4556
- const key = this.cacheStorage.generateAccountKey(getAccountInfo(cacheRecord.account));
4557
- const account = this.cacheStorage.getAccount(key, request.correlationId);
4558
- if (!account) {
4563
+ const cachedAccounts = this.cacheStorage.getAllAccounts({
4564
+ homeAccountId: cacheRecord.account.homeAccountId,
4565
+ environment: cacheRecord.account.environment,
4566
+ }, request.correlationId);
4567
+ if (cachedAccounts.length < 1) {
4559
4568
  this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache", request.correlationId);
4569
+ this.performanceClient?.addFields({
4570
+ acntLoggedOut: true,
4571
+ }, request.correlationId);
4560
4572
  return await ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, this.performanceClient, idTokenClaims, requestStateObj, undefined, serverRequestId);
4561
4573
  }
4562
4574
  }
4563
- await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), request.storeInCache);
4575
+ await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), apiId, request.storeInCache);
4564
4576
  }
4565
4577
  finally {
4566
4578
  if (this.persistencePlugin &&
@@ -4770,7 +4782,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
4770
4782
  return baseAccount;
4771
4783
  }
4772
4784
 
4773
- /*! @azure/msal-common v16.0.1 2026-01-16 */
4785
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
4774
4786
  /*
4775
4787
  * Copyright (c) Microsoft Corporation. All rights reserved.
4776
4788
  * Licensed under the MIT License.
@@ -4780,7 +4792,7 @@ const CcsCredentialType = {
4780
4792
  UPN: "UPN",
4781
4793
  };
4782
4794
 
4783
- /*! @azure/msal-common v16.0.1 2026-01-16 */
4795
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
4784
4796
  /*
4785
4797
  * Copyright (c) Microsoft Corporation. All rights reserved.
4786
4798
  * Licensed under the MIT License.
@@ -4798,7 +4810,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {
4798
4810
  }
4799
4811
  }
4800
4812
 
4801
- /*! @azure/msal-common v16.0.1 2026-01-16 */
4813
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
4802
4814
  /*
4803
4815
  * Copyright (c) Microsoft Corporation. All rights reserved.
4804
4816
  * Licensed under the MIT License.
@@ -4819,7 +4831,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
4819
4831
  };
4820
4832
  }
4821
4833
 
4822
- /*! @azure/msal-common v16.0.1 2026-01-16 */
4834
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
4823
4835
 
4824
4836
  /*
4825
4837
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4905,7 +4917,7 @@ class ThrottlingUtils {
4905
4917
  }
4906
4918
  }
4907
4919
 
4908
- /*! @azure/msal-common v16.0.1 2026-01-16 */
4920
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
4909
4921
 
4910
4922
  /*
4911
4923
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4936,7 +4948,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
4936
4948
  return new NetworkError(error, httpStatus, responseHeaders);
4937
4949
  }
4938
4950
 
4939
- /*! @azure/msal-common v16.0.1 2026-01-16 */
4951
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
4940
4952
 
4941
4953
  /*
4942
4954
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5050,7 +5062,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
5050
5062
  return response;
5051
5063
  }
5052
5064
 
5053
- /*! @azure/msal-common v16.0.1 2026-01-16 */
5065
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
5054
5066
  /*
5055
5067
  * Copyright (c) Microsoft Corporation. All rights reserved.
5056
5068
  * Licensed under the MIT License.
@@ -5062,7 +5074,7 @@ function isOpenIdConfigResponse(response) {
5062
5074
  response.hasOwnProperty("jwks_uri"));
5063
5075
  }
5064
5076
 
5065
- /*! @azure/msal-common v16.0.1 2026-01-16 */
5077
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
5066
5078
  /*
5067
5079
  * Copyright (c) Microsoft Corporation. All rights reserved.
5068
5080
  * Licensed under the MIT License.
@@ -5072,7 +5084,7 @@ function isCloudInstanceDiscoveryResponse(response) {
5072
5084
  response.hasOwnProperty("metadata"));
5073
5085
  }
5074
5086
 
5075
- /*! @azure/msal-common v16.0.1 2026-01-16 */
5087
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
5076
5088
  /*
5077
5089
  * Copyright (c) Microsoft Corporation. All rights reserved.
5078
5090
  * Licensed under the MIT License.
@@ -5082,7 +5094,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
5082
5094
  response.hasOwnProperty("error_description"));
5083
5095
  }
5084
5096
 
5085
- /*! @azure/msal-common v16.0.1 2026-01-16 */
5097
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
5086
5098
 
5087
5099
  /*
5088
5100
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5187,7 +5199,7 @@ RegionDiscovery.IMDS_OPTIONS = {
5187
5199
  },
5188
5200
  };
5189
5201
 
5190
- /*! @azure/msal-common v16.0.1 2026-01-16 */
5202
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
5191
5203
 
5192
5204
  /*
5193
5205
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6010,7 +6022,7 @@ function buildStaticAuthorityOptions(authOptions) {
6010
6022
  };
6011
6023
  }
6012
6024
 
6013
- /*! @azure/msal-common v16.0.1 2026-01-16 */
6025
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
6014
6026
 
6015
6027
  /*
6016
6028
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6044,7 +6056,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
6044
6056
  }
6045
6057
  }
6046
6058
 
6047
- /*! @azure/msal-common v16.0.1 2026-01-16 */
6059
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
6048
6060
 
6049
6061
  /*
6050
6062
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6082,7 +6094,7 @@ class AuthorizationCodeClient {
6082
6094
  * authorization_code_grant
6083
6095
  * @param request
6084
6096
  */
6085
- async acquireToken(request, authCodePayload) {
6097
+ async acquireToken(request, apiId, authCodePayload) {
6086
6098
  if (!request.code) {
6087
6099
  throw createClientAuthError(requestCannotBeMade);
6088
6100
  }
@@ -6097,7 +6109,7 @@ class AuthorizationCodeClient {
6097
6109
  const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
6098
6110
  // Validate response. This function throws a server error if an error is returned by the server.
6099
6111
  responseHandler.validateTokenResponse(response.body, request.correlationId);
6100
- return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId);
6112
+ 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);
6101
6113
  }
6102
6114
  /**
6103
6115
  * Used to log out the current user, and redirect the user to the postLogoutRedirectUri.
@@ -6304,7 +6316,7 @@ class AuthorizationCodeClient {
6304
6316
  }
6305
6317
  }
6306
6318
 
6307
- /*! @azure/msal-common v16.0.1 2026-01-16 */
6319
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
6308
6320
 
6309
6321
  /*
6310
6322
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6334,20 +6346,20 @@ class RefreshTokenClient {
6334
6346
  // set performance telemetry client
6335
6347
  this.performanceClient = performanceClient;
6336
6348
  }
6337
- async acquireToken(request) {
6349
+ async acquireToken(request, apiId) {
6338
6350
  const reqTimestamp = nowSeconds();
6339
6351
  const response = await invokeAsync(this.executeTokenRequest.bind(this), RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority);
6340
6352
  // Retrieve requestId from response headers
6341
6353
  const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
6342
6354
  const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
6343
6355
  responseHandler.validateTokenResponse(response.body, request.correlationId);
6344
- return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId);
6356
+ 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);
6345
6357
  }
6346
6358
  /**
6347
6359
  * Gets cached refresh token and attaches to request, then calls acquireToken API
6348
6360
  * @param request
6349
6361
  */
6350
- async acquireTokenByRefreshToken(request) {
6362
+ async acquireTokenByRefreshToken(request, apiId) {
6351
6363
  // Cannot renew token if no request object is given.
6352
6364
  if (!request) {
6353
6365
  throw createClientConfigurationError(tokenRequestEmpty);
@@ -6361,7 +6373,7 @@ class RefreshTokenClient {
6361
6373
  // if the app is part of the family, retrive a Family refresh token if present and make a refreshTokenRequest
6362
6374
  if (isFOCI) {
6363
6375
  try {
6364
- return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true);
6376
+ return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true, apiId);
6365
6377
  }
6366
6378
  catch (e) {
6367
6379
  const noFamilyRTInCache = e instanceof InteractionRequiredAuthError &&
@@ -6372,7 +6384,7 @@ class RefreshTokenClient {
6372
6384
  e.subError === CLIENT_MISMATCH_ERROR;
6373
6385
  // if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)
6374
6386
  if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {
6375
- return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
6387
+ return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false, apiId);
6376
6388
  // throw in all other cases
6377
6389
  }
6378
6390
  else {
@@ -6381,13 +6393,13 @@ class RefreshTokenClient {
6381
6393
  }
6382
6394
  }
6383
6395
  // fall back to application refresh token acquisition
6384
- return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
6396
+ return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false, apiId);
6385
6397
  }
6386
6398
  /**
6387
6399
  * makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached
6388
6400
  * @param request
6389
6401
  */
6390
- async acquireTokenWithCachedRefreshToken(request, foci) {
6402
+ async acquireTokenWithCachedRefreshToken(request, foci, apiId) {
6391
6403
  // fetches family RT or application RT based on FOCI value
6392
6404
  const refreshToken = invoke(this.cacheManager.getRefreshToken.bind(this.cacheManager), CacheManagerGetRefreshToken, this.logger, this.performanceClient, request.correlationId)(request.account, foci, request.correlationId, undefined);
6393
6405
  if (!refreshToken) {
@@ -6416,7 +6428,7 @@ class RefreshTokenClient {
6416
6428
  },
6417
6429
  };
6418
6430
  try {
6419
- return await invokeAsync(this.acquireToken.bind(this), RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest);
6431
+ return await invokeAsync(this.acquireToken.bind(this), RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest, apiId);
6420
6432
  }
6421
6433
  catch (e) {
6422
6434
  if (e instanceof InteractionRequiredAuthError) {
@@ -6529,7 +6541,7 @@ class RefreshTokenClient {
6529
6541
  }
6530
6542
  }
6531
6543
 
6532
- /*! @azure/msal-common v16.0.1 2026-01-16 */
6544
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
6533
6545
 
6534
6546
  /*
6535
6547
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6638,7 +6650,7 @@ class SilentFlowClient {
6638
6650
  }
6639
6651
  }
6640
6652
 
6641
- /*! @azure/msal-common v16.0.1 2026-01-16 */
6653
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
6642
6654
 
6643
6655
  /*
6644
6656
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6788,7 +6800,7 @@ function extractLoginHint(account) {
6788
6800
  return account.loginHint || account.idTokenClaims?.login_hint || null;
6789
6801
  }
6790
6802
 
6791
- /*! @azure/msal-common v16.0.1 2026-01-16 */
6803
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
6792
6804
  /*
6793
6805
  * Copyright (c) Microsoft Corporation. All rights reserved.
6794
6806
  * Licensed under the MIT License.
@@ -6805,7 +6817,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
6805
6817
  unexpectedError: unexpectedError
6806
6818
  });
6807
6819
 
6808
- /*! @azure/msal-common v16.0.1 2026-01-16 */
6820
+ /*! @azure/msal-common v16.0.3 2026-01-28 */
6809
6821
 
6810
6822
  /*
6811
6823
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7368,6 +7380,8 @@ const ApiId = {
7368
7380
  acquireTokenByUsernamePassword: 371,
7369
7381
  acquireTokenByDeviceCode: 671,
7370
7382
  acquireTokenByClientCredential: 771,
7383
+ acquireTokenByOBO: 772,
7384
+ acquireTokenWithManagedIdentity: 773,
7371
7385
  acquireTokenByCode: 871,
7372
7386
  acquireTokenByRefreshToken: 872,
7373
7387
  };
@@ -9004,7 +9018,7 @@ class ClientAssertion {
9004
9018
 
9005
9019
  /* eslint-disable header/header */
9006
9020
  const name = "@azure/msal-node";
9007
- const version = "5.0.1";
9021
+ const version = "5.0.3";
9008
9022
 
9009
9023
  /*
9010
9024
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9093,7 +9107,7 @@ class UsernamePasswordClient extends BaseClient {
9093
9107
  const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
9094
9108
  // Validate response. This function throws a server error if an error is returned by the server.
9095
9109
  responseHandler.validateTokenResponse(response.body, request.correlationId);
9096
- const tokenResponse = responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request);
9110
+ const tokenResponse = responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, ApiId.acquireTokenByUsernamePassword);
9097
9111
  return tokenResponse;
9098
9112
  }
9099
9113
  /**
@@ -9268,7 +9282,7 @@ class ClientApplication {
9268
9282
  const authClientConfig = await this.buildOauthClientConfiguration(discoveredAuthority, validRequest.correlationId, validRequest.redirectUri, serverTelemetryManager);
9269
9283
  const authorizationCodeClient = new AuthorizationCodeClient(authClientConfig, new StubPerformanceClient());
9270
9284
  this.logger.verbose("Auth code client created", validRequest.correlationId);
9271
- return await authorizationCodeClient.acquireToken(validRequest, authCodePayLoad);
9285
+ return await authorizationCodeClient.acquireToken(validRequest, ApiId.acquireTokenByCode, authCodePayLoad);
9272
9286
  }
9273
9287
  catch (e) {
9274
9288
  if (e instanceof AuthError) {
@@ -9298,7 +9312,7 @@ class ClientApplication {
9298
9312
  const refreshTokenClientConfig = await this.buildOauthClientConfiguration(discoveredAuthority, validRequest.correlationId, validRequest.redirectUri || "", serverTelemetryManager);
9299
9313
  const refreshTokenClient = new RefreshTokenClient(refreshTokenClientConfig, new StubPerformanceClient());
9300
9314
  this.logger.verbose("Refresh token client created", validRequest.correlationId);
9301
- return await refreshTokenClient.acquireToken(validRequest);
9315
+ return await refreshTokenClient.acquireToken(validRequest, ApiId.acquireTokenByRefreshToken);
9302
9316
  }
9303
9317
  catch (e) {
9304
9318
  if (e instanceof AuthError) {
@@ -9338,7 +9352,7 @@ class ClientApplication {
9338
9352
  error.errorCode ===
9339
9353
  tokenRefreshRequired) {
9340
9354
  const refreshTokenClient = new RefreshTokenClient(clientConfiguration, new StubPerformanceClient());
9341
- return refreshTokenClient.acquireTokenByRefreshToken(validRequest);
9355
+ return refreshTokenClient.acquireTokenByRefreshToken(validRequest, ApiId.acquireTokenSilent);
9342
9356
  }
9343
9357
  throw error;
9344
9358
  }
@@ -9363,7 +9377,7 @@ class ClientApplication {
9363
9377
  // refresh the access token in the background
9364
9378
  const refreshTokenClient = new RefreshTokenClient(clientConfiguration, new StubPerformanceClient());
9365
9379
  try {
9366
- await refreshTokenClient.acquireTokenByRefreshToken(validRequest);
9380
+ await refreshTokenClient.acquireTokenByRefreshToken(validRequest, ApiId.acquireTokenSilent);
9367
9381
  }
9368
9382
  catch {
9369
9383
  // do nothing, this is running in the background and no action is to be taken upon success or failure
@@ -9667,7 +9681,7 @@ class DeviceCodeClient extends BaseClient {
9667
9681
  const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
9668
9682
  // Validate response. This function throws a server error if an error is returned by the server.
9669
9683
  responseHandler.validateTokenResponse(response, request.correlationId);
9670
- return responseHandler.handleServerTokenResponse(response, this.authority, reqTimestamp, request);
9684
+ return responseHandler.handleServerTokenResponse(response, this.authority, reqTimestamp, request, ApiId.acquireTokenByDeviceCode);
9671
9685
  }
9672
9686
  /**
9673
9687
  * Creates device code request and executes http GET
@@ -10266,7 +10280,7 @@ class ClientCredentialClient extends BaseClient {
10266
10280
  }
10267
10281
  const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
10268
10282
  responseHandler.validateTokenResponse(serverTokenResponse, request.correlationId, refreshAccessToken);
10269
- const tokenResponse = await responseHandler.handleServerTokenResponse(serverTokenResponse, this.authority, reqTimestamp, request);
10283
+ const tokenResponse = await responseHandler.handleServerTokenResponse(serverTokenResponse, this.authority, reqTimestamp, request, ApiId.acquireTokenByClientCredential);
10270
10284
  return tokenResponse;
10271
10285
  }
10272
10286
  /**
@@ -10467,7 +10481,7 @@ class OnBehalfOfClient extends BaseClient {
10467
10481
  const response = await this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId);
10468
10482
  const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
10469
10483
  responseHandler.validateTokenResponse(response.body, request.correlationId);
10470
- const tokenResponse = await responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, undefined, userAssertionHash);
10484
+ const tokenResponse = await responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, ApiId.acquireTokenByOBO, undefined, userAssertionHash);
10471
10485
  return tokenResponse;
10472
10486
  }
10473
10487
  /**
@@ -10923,7 +10937,7 @@ class BaseManagedIdentitySource {
10923
10937
  const serverTokenResponse = await this.getServerTokenResponseAsync(response, networkClientHelper, networkRequest, networkRequestOptions);
10924
10938
  responseHandler.validateTokenResponse(serverTokenResponse, serverTokenResponse.correlation_id || "", refreshAccessToken);
10925
10939
  // caches the token
10926
- return responseHandler.handleServerTokenResponse(serverTokenResponse, fakeAuthority, reqTimestamp, managedIdentityRequest);
10940
+ return responseHandler.handleServerTokenResponse(serverTokenResponse, fakeAuthority, reqTimestamp, managedIdentityRequest, ApiId.acquireTokenWithManagedIdentity);
10927
10941
  }
10928
10942
  /**
10929
10943
  * Determines the appropriate query parameter name for user-assigned managed identity