@azure/msal-node 5.0.2 → 5.0.4

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 (91) 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.d.ts +1 -0
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.mjs +2 -1
  51. package/dist/index.mjs.map +1 -1
  52. package/dist/internals.mjs +1 -1
  53. package/dist/network/HttpClient.mjs +1 -1
  54. package/dist/network/HttpClientWithRetries.mjs +1 -1
  55. package/dist/network/LoopbackClient.mjs +1 -1
  56. package/dist/packageMetadata.d.ts +1 -1
  57. package/dist/packageMetadata.mjs +2 -2
  58. package/dist/protocol/Authorize.mjs +1 -1
  59. package/dist/retry/DefaultManagedIdentityRetryPolicy.mjs +1 -1
  60. package/dist/retry/ExponentialRetryStrategy.mjs +1 -1
  61. package/dist/retry/ImdsRetryPolicy.mjs +1 -1
  62. package/dist/retry/LinearRetryStrategy.mjs +1 -1
  63. package/dist/utils/Constants.d.ts +2 -0
  64. package/dist/utils/Constants.d.ts.map +1 -1
  65. package/dist/utils/Constants.mjs +3 -1
  66. package/dist/utils/Constants.mjs.map +1 -1
  67. package/dist/utils/EncodingUtils.mjs +1 -1
  68. package/dist/utils/TimeUtils.mjs +1 -1
  69. package/lib/msal-node.cjs +119 -89
  70. package/lib/msal-node.cjs.map +1 -1
  71. package/lib/types/client/ClientApplication.d.ts.map +1 -1
  72. package/lib/types/client/ClientCredentialClient.d.ts.map +1 -1
  73. package/lib/types/client/DeviceCodeClient.d.ts.map +1 -1
  74. package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
  75. package/lib/types/client/OnBehalfOfClient.d.ts.map +1 -1
  76. package/lib/types/client/UsernamePasswordClient.d.ts.map +1 -1
  77. package/lib/types/index.d.ts +1 -0
  78. package/lib/types/index.d.ts.map +1 -1
  79. package/lib/types/packageMetadata.d.ts +1 -1
  80. package/lib/types/utils/Constants.d.ts +2 -0
  81. package/lib/types/utils/Constants.d.ts.map +1 -1
  82. package/package.json +5 -3
  83. package/src/client/ClientApplication.ts +9 -3
  84. package/src/client/ClientCredentialClient.ts +3 -1
  85. package/src/client/DeviceCodeClient.ts +3 -1
  86. package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +3 -1
  87. package/src/client/OnBehalfOfClient.ts +2 -0
  88. package/src/client/UsernamePasswordClient.ts +3 -1
  89. package/src/index.ts +2 -0
  90. package/src/packageMetadata.ts +1 -1
  91. package/src/utils/Constants.ts +2 -0
package/lib/msal-node.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-node v5.0.2 2026-01-17 */
1
+ /*! @azure/msal-node v5.0.4 2026-02-10 */
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.2 2026-01-17 */
152
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
400
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
451
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
482
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
502
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
599
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
622
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
676
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
760
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
955
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
1340
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
1393
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
1432
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
1693
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
1694
1694
  /* eslint-disable header/header */
1695
1695
  const name$1 = "@azure/msal-common";
1696
- const version$1 = "16.0.2";
1696
+ const version$1 = "16.0.4";
1697
1697
 
1698
- /*! @azure/msal-common v16.0.2 2026-01-17 */
1698
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
1718
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
1800
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
1880
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
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.2 2026-01-17 */
2037
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
2038
2038
 
2039
2039
  /*
2040
2040
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2105,6 +2105,21 @@ const rawMetdataJSON = {
2105
2105
  preferred_cache: "login-us.microsoftonline.com",
2106
2106
  aliases: ["login-us.microsoftonline.com"],
2107
2107
  },
2108
+ {
2109
+ preferred_network: "login.sovcloud-identity.fr",
2110
+ preferred_cache: "login.sovcloud-identity.fr",
2111
+ aliases: ["login.sovcloud-identity.fr"],
2112
+ },
2113
+ {
2114
+ preferred_network: "login.sovcloud-identity.de",
2115
+ preferred_cache: "login.sovcloud-identity.de",
2116
+ aliases: ["login.sovcloud-identity.de"],
2117
+ },
2118
+ {
2119
+ preferred_network: "login.sovcloud-identity.sg",
2120
+ preferred_cache: "login.sovcloud-identity.sg",
2121
+ aliases: ["login.sovcloud-identity.sg"],
2122
+ },
2108
2123
  ],
2109
2124
  },
2110
2125
  };
@@ -2176,7 +2191,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
2176
2191
  return null;
2177
2192
  }
2178
2193
 
2179
- /*! @azure/msal-common v16.0.2 2026-01-17 */
2194
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
2180
2195
  /*
2181
2196
  * Copyright (c) Microsoft Corporation. All rights reserved.
2182
2197
  * Licensed under the MIT License.
@@ -2184,7 +2199,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
2184
2199
  const cacheQuotaExceeded = "cache_quota_exceeded";
2185
2200
  const cacheErrorUnknown = "cache_error_unknown";
2186
2201
 
2187
- /*! @azure/msal-common v16.0.2 2026-01-17 */
2202
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
2188
2203
 
2189
2204
  /*
2190
2205
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2222,7 +2237,7 @@ function createCacheError(e) {
2222
2237
  }
2223
2238
  }
2224
2239
 
2225
- /*! @azure/msal-common v16.0.2 2026-01-17 */
2240
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
2226
2241
 
2227
2242
  /*
2228
2243
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2260,7 +2275,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
2260
2275
  };
2261
2276
  }
2262
2277
 
2263
- /*! @azure/msal-common v16.0.2 2026-01-17 */
2278
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
2264
2279
  /*
2265
2280
  * Copyright (c) Microsoft Corporation. All rights reserved.
2266
2281
  * Licensed under the MIT License.
@@ -2275,7 +2290,7 @@ const AuthorityType = {
2275
2290
  Ciam: 3,
2276
2291
  };
2277
2292
 
2278
- /*! @azure/msal-common v16.0.2 2026-01-17 */
2293
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
2279
2294
  /*
2280
2295
  * Copyright (c) Microsoft Corporation. All rights reserved.
2281
2296
  * Licensed under the MIT License.
@@ -2297,7 +2312,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
2297
2312
  return null;
2298
2313
  }
2299
2314
 
2300
- /*! @azure/msal-common v16.0.2 2026-01-17 */
2315
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
2301
2316
  /*
2302
2317
  * Copyright (c) Microsoft Corporation. All rights reserved.
2303
2318
  * Licensed under the MIT License.
@@ -2321,11 +2336,18 @@ const ProtocolMode = {
2321
2336
  EAR: "EAR",
2322
2337
  };
2323
2338
 
2324
- /*! @azure/msal-common v16.0.2 2026-01-17 */
2339
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
2325
2340
  /**
2326
2341
  * Returns the AccountInfo interface for this account.
2327
2342
  */
2328
2343
  function getAccountInfo(accountEntity) {
2344
+ const tenantProfiles = accountEntity.tenantProfiles || [];
2345
+ // Ensure at least the home tenant profile exists
2346
+ if (tenantProfiles.length === 0 &&
2347
+ accountEntity.realm &&
2348
+ accountEntity.localAccountId) {
2349
+ tenantProfiles.push(buildTenantProfile(accountEntity.homeAccountId, accountEntity.localAccountId, accountEntity.realm));
2350
+ }
2329
2351
  return {
2330
2352
  homeAccountId: accountEntity.homeAccountId,
2331
2353
  environment: accountEntity.environment,
@@ -2337,7 +2359,7 @@ function getAccountInfo(accountEntity) {
2337
2359
  nativeAccountId: accountEntity.nativeAccountId,
2338
2360
  authorityType: accountEntity.authorityType,
2339
2361
  // Deserialize tenant profiles array into a Map
2340
- tenantProfiles: new Map((accountEntity.tenantProfiles || []).map((tenantProfile) => {
2362
+ tenantProfiles: new Map(tenantProfiles.map((tenantProfile) => {
2341
2363
  return [tenantProfile.tenantId, tenantProfile];
2342
2364
  })),
2343
2365
  dataBoundary: accountEntity.dataBoundary,
@@ -2457,7 +2479,7 @@ function isAccountEntity(entity) {
2457
2479
  entity.hasOwnProperty("authorityType"));
2458
2480
  }
2459
2481
 
2460
- /*! @azure/msal-common v16.0.2 2026-01-17 */
2482
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
2461
2483
 
2462
2484
  /*
2463
2485
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2623,13 +2645,13 @@ class CacheManager {
2623
2645
  * @param storeInCache {?StoreInCache}
2624
2646
  * @param correlationId {?string} correlation id
2625
2647
  */
2626
- async saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache) {
2648
+ async saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache) {
2627
2649
  if (!cacheRecord) {
2628
2650
  throw createClientAuthError(invalidCacheRecord);
2629
2651
  }
2630
2652
  try {
2631
2653
  if (!!cacheRecord.account) {
2632
- await this.setAccount(cacheRecord.account, correlationId, kmsi);
2654
+ await this.setAccount(cacheRecord.account, correlationId, kmsi, apiId);
2633
2655
  }
2634
2656
  if (!!cacheRecord.idToken && storeInCache?.idToken !== false) {
2635
2657
  await this.setIdTokenCredential(cacheRecord.idToken, correlationId, kmsi);
@@ -3553,7 +3575,7 @@ class DefaultStorageClass extends CacheManager {
3553
3575
  }
3554
3576
  }
3555
3577
 
3556
- /*! @azure/msal-common v16.0.2 2026-01-17 */
3578
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
3557
3579
  /*
3558
3580
  * Copyright (c) Microsoft Corporation. All rights reserved.
3559
3581
  * Licensed under the MIT License.
@@ -3567,7 +3589,7 @@ class DefaultStorageClass extends CacheManager {
3567
3589
  const PerformanceEventStatus = {
3568
3590
  InProgress: 1};
3569
3591
 
3570
- /*! @azure/msal-common v16.0.2 2026-01-17 */
3592
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
3571
3593
 
3572
3594
  /*
3573
3595
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3622,7 +3644,7 @@ class StubPerformanceClient {
3622
3644
  }
3623
3645
  }
3624
3646
 
3625
- /*! @azure/msal-common v16.0.2 2026-01-17 */
3647
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
3626
3648
 
3627
3649
  /*
3628
3650
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3716,7 +3738,7 @@ function isOidcProtocolMode(config) {
3716
3738
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
3717
3739
  }
3718
3740
 
3719
- /*! @azure/msal-common v16.0.2 2026-01-17 */
3741
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
3720
3742
 
3721
3743
  /*
3722
3744
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3735,7 +3757,7 @@ class ServerError extends AuthError {
3735
3757
  }
3736
3758
  }
3737
3759
 
3738
- /*! @azure/msal-common v16.0.2 2026-01-17 */
3760
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
3739
3761
  /*
3740
3762
  * Copyright (c) Microsoft Corporation. All rights reserved.
3741
3763
  * Licensed under the MIT License.
@@ -3763,7 +3785,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
3763
3785
  uxNotAllowed: uxNotAllowed
3764
3786
  });
3765
3787
 
3766
- /*! @azure/msal-common v16.0.2 2026-01-17 */
3788
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
3767
3789
 
3768
3790
  /*
3769
3791
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3829,7 +3851,7 @@ function createInteractionRequiredAuthError(errorCode, errorMessage) {
3829
3851
  return new InteractionRequiredAuthError(errorCode, errorMessage);
3830
3852
  }
3831
3853
 
3832
- /*! @azure/msal-common v16.0.2 2026-01-17 */
3854
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
3833
3855
  /**
3834
3856
  * Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.
3835
3857
  * @param base64Decode
@@ -3861,7 +3883,7 @@ function parseRequestState(base64Decode, state) {
3861
3883
  }
3862
3884
  }
3863
3885
 
3864
- /*! @azure/msal-common v16.0.2 2026-01-17 */
3886
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
3865
3887
  /*
3866
3888
  * Copyright (c) Microsoft Corporation. All rights reserved.
3867
3889
  * Licensed under the MIT License.
@@ -3916,7 +3938,7 @@ function delay(t, value) {
3916
3938
  return new Promise((resolve) => setTimeout(() => resolve(value), t));
3917
3939
  }
3918
3940
 
3919
- /*! @azure/msal-common v16.0.2 2026-01-17 */
3941
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
3920
3942
  /*
3921
3943
  * Copyright (c) Microsoft Corporation. All rights reserved.
3922
3944
  * Licensed under the MIT License.
@@ -3978,7 +4000,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
3978
4000
  */
3979
4001
  const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
3980
4002
 
3981
- /*! @azure/msal-common v16.0.2 2026-01-17 */
4003
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
3982
4004
  /*
3983
4005
  * Copyright (c) Microsoft Corporation. All rights reserved.
3984
4006
  * Licensed under the MIT License.
@@ -4073,7 +4095,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
4073
4095
  };
4074
4096
  };
4075
4097
 
4076
- /*! @azure/msal-common v16.0.2 2026-01-17 */
4098
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
4077
4099
 
4078
4100
  /*
4079
4101
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4153,7 +4175,7 @@ class PopTokenGenerator {
4153
4175
  }
4154
4176
  }
4155
4177
 
4156
- /*! @azure/msal-common v16.0.2 2026-01-17 */
4178
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
4157
4179
  /*
4158
4180
  * Copyright (c) Microsoft Corporation. All rights reserved.
4159
4181
  * Licensed under the MIT License.
@@ -4180,7 +4202,7 @@ class PopTokenGenerator {
4180
4202
  }
4181
4203
  }
4182
4204
 
4183
- /*! @azure/msal-common v16.0.2 2026-01-17 */
4205
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
4184
4206
 
4185
4207
  /*
4186
4208
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4439,7 +4461,7 @@ function isAuthorityMetadataExpired(metadata) {
4439
4461
  return metadata.expiresAt <= nowSeconds();
4440
4462
  }
4441
4463
 
4442
- /*! @azure/msal-common v16.0.2 2026-01-17 */
4464
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
4443
4465
 
4444
4466
  /*
4445
4467
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4506,7 +4528,7 @@ class ResponseHandler {
4506
4528
  * @param serverTokenResponse
4507
4529
  * @param authority
4508
4530
  */
4509
- async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {
4531
+ async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, apiId, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {
4510
4532
  // create an idToken object (not entity)
4511
4533
  let idTokenClaims;
4512
4534
  if (serverTokenResponse.id_token) {
@@ -4553,14 +4575,19 @@ class ResponseHandler {
4553
4575
  if (handlingRefreshTokenResponse &&
4554
4576
  !forceCacheRefreshTokenResponse &&
4555
4577
  cacheRecord.account) {
4556
- const key = this.cacheStorage.generateAccountKey(getAccountInfo(cacheRecord.account));
4557
- const account = this.cacheStorage.getAccount(key, request.correlationId);
4558
- if (!account) {
4578
+ const cachedAccounts = this.cacheStorage.getAllAccounts({
4579
+ homeAccountId: cacheRecord.account.homeAccountId,
4580
+ environment: cacheRecord.account.environment,
4581
+ }, request.correlationId);
4582
+ if (cachedAccounts.length < 1) {
4559
4583
  this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache", request.correlationId);
4584
+ this.performanceClient?.addFields({
4585
+ acntLoggedOut: true,
4586
+ }, request.correlationId);
4560
4587
  return await ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, this.performanceClient, idTokenClaims, requestStateObj, undefined, serverRequestId);
4561
4588
  }
4562
4589
  }
4563
- await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), request.storeInCache);
4590
+ await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), apiId, request.storeInCache);
4564
4591
  }
4565
4592
  finally {
4566
4593
  if (this.persistencePlugin &&
@@ -4770,7 +4797,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
4770
4797
  return baseAccount;
4771
4798
  }
4772
4799
 
4773
- /*! @azure/msal-common v16.0.2 2026-01-17 */
4800
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
4774
4801
  /*
4775
4802
  * Copyright (c) Microsoft Corporation. All rights reserved.
4776
4803
  * Licensed under the MIT License.
@@ -4780,7 +4807,7 @@ const CcsCredentialType = {
4780
4807
  UPN: "UPN",
4781
4808
  };
4782
4809
 
4783
- /*! @azure/msal-common v16.0.2 2026-01-17 */
4810
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
4784
4811
  /*
4785
4812
  * Copyright (c) Microsoft Corporation. All rights reserved.
4786
4813
  * Licensed under the MIT License.
@@ -4798,7 +4825,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {
4798
4825
  }
4799
4826
  }
4800
4827
 
4801
- /*! @azure/msal-common v16.0.2 2026-01-17 */
4828
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
4802
4829
  /*
4803
4830
  * Copyright (c) Microsoft Corporation. All rights reserved.
4804
4831
  * Licensed under the MIT License.
@@ -4819,7 +4846,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
4819
4846
  };
4820
4847
  }
4821
4848
 
4822
- /*! @azure/msal-common v16.0.2 2026-01-17 */
4849
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
4823
4850
 
4824
4851
  /*
4825
4852
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4905,7 +4932,7 @@ class ThrottlingUtils {
4905
4932
  }
4906
4933
  }
4907
4934
 
4908
- /*! @azure/msal-common v16.0.2 2026-01-17 */
4935
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
4909
4936
 
4910
4937
  /*
4911
4938
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4936,7 +4963,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
4936
4963
  return new NetworkError(error, httpStatus, responseHeaders);
4937
4964
  }
4938
4965
 
4939
- /*! @azure/msal-common v16.0.2 2026-01-17 */
4966
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
4940
4967
 
4941
4968
  /*
4942
4969
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5050,7 +5077,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
5050
5077
  return response;
5051
5078
  }
5052
5079
 
5053
- /*! @azure/msal-common v16.0.2 2026-01-17 */
5080
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
5054
5081
  /*
5055
5082
  * Copyright (c) Microsoft Corporation. All rights reserved.
5056
5083
  * Licensed under the MIT License.
@@ -5062,7 +5089,7 @@ function isOpenIdConfigResponse(response) {
5062
5089
  response.hasOwnProperty("jwks_uri"));
5063
5090
  }
5064
5091
 
5065
- /*! @azure/msal-common v16.0.2 2026-01-17 */
5092
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
5066
5093
  /*
5067
5094
  * Copyright (c) Microsoft Corporation. All rights reserved.
5068
5095
  * Licensed under the MIT License.
@@ -5072,7 +5099,7 @@ function isCloudInstanceDiscoveryResponse(response) {
5072
5099
  response.hasOwnProperty("metadata"));
5073
5100
  }
5074
5101
 
5075
- /*! @azure/msal-common v16.0.2 2026-01-17 */
5102
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
5076
5103
  /*
5077
5104
  * Copyright (c) Microsoft Corporation. All rights reserved.
5078
5105
  * Licensed under the MIT License.
@@ -5082,7 +5109,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
5082
5109
  response.hasOwnProperty("error_description"));
5083
5110
  }
5084
5111
 
5085
- /*! @azure/msal-common v16.0.2 2026-01-17 */
5112
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
5086
5113
 
5087
5114
  /*
5088
5115
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5187,7 +5214,7 @@ RegionDiscovery.IMDS_OPTIONS = {
5187
5214
  },
5188
5215
  };
5189
5216
 
5190
- /*! @azure/msal-common v16.0.2 2026-01-17 */
5217
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
5191
5218
 
5192
5219
  /*
5193
5220
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6010,7 +6037,7 @@ function buildStaticAuthorityOptions(authOptions) {
6010
6037
  };
6011
6038
  }
6012
6039
 
6013
- /*! @azure/msal-common v16.0.2 2026-01-17 */
6040
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
6014
6041
 
6015
6042
  /*
6016
6043
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6044,7 +6071,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
6044
6071
  }
6045
6072
  }
6046
6073
 
6047
- /*! @azure/msal-common v16.0.2 2026-01-17 */
6074
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
6048
6075
 
6049
6076
  /*
6050
6077
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6082,7 +6109,7 @@ class AuthorizationCodeClient {
6082
6109
  * authorization_code_grant
6083
6110
  * @param request
6084
6111
  */
6085
- async acquireToken(request, authCodePayload) {
6112
+ async acquireToken(request, apiId, authCodePayload) {
6086
6113
  if (!request.code) {
6087
6114
  throw createClientAuthError(requestCannotBeMade);
6088
6115
  }
@@ -6097,7 +6124,7 @@ class AuthorizationCodeClient {
6097
6124
  const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
6098
6125
  // Validate response. This function throws a server error if an error is returned by the server.
6099
6126
  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);
6127
+ 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
6128
  }
6102
6129
  /**
6103
6130
  * Used to log out the current user, and redirect the user to the postLogoutRedirectUri.
@@ -6304,7 +6331,7 @@ class AuthorizationCodeClient {
6304
6331
  }
6305
6332
  }
6306
6333
 
6307
- /*! @azure/msal-common v16.0.2 2026-01-17 */
6334
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
6308
6335
 
6309
6336
  /*
6310
6337
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6334,20 +6361,20 @@ class RefreshTokenClient {
6334
6361
  // set performance telemetry client
6335
6362
  this.performanceClient = performanceClient;
6336
6363
  }
6337
- async acquireToken(request) {
6364
+ async acquireToken(request, apiId) {
6338
6365
  const reqTimestamp = nowSeconds();
6339
6366
  const response = await invokeAsync(this.executeTokenRequest.bind(this), RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority);
6340
6367
  // Retrieve requestId from response headers
6341
6368
  const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
6342
6369
  const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
6343
6370
  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);
6371
+ 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
6372
  }
6346
6373
  /**
6347
6374
  * Gets cached refresh token and attaches to request, then calls acquireToken API
6348
6375
  * @param request
6349
6376
  */
6350
- async acquireTokenByRefreshToken(request) {
6377
+ async acquireTokenByRefreshToken(request, apiId) {
6351
6378
  // Cannot renew token if no request object is given.
6352
6379
  if (!request) {
6353
6380
  throw createClientConfigurationError(tokenRequestEmpty);
@@ -6361,7 +6388,7 @@ class RefreshTokenClient {
6361
6388
  // if the app is part of the family, retrive a Family refresh token if present and make a refreshTokenRequest
6362
6389
  if (isFOCI) {
6363
6390
  try {
6364
- return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true);
6391
+ return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true, apiId);
6365
6392
  }
6366
6393
  catch (e) {
6367
6394
  const noFamilyRTInCache = e instanceof InteractionRequiredAuthError &&
@@ -6372,7 +6399,7 @@ class RefreshTokenClient {
6372
6399
  e.subError === CLIENT_MISMATCH_ERROR;
6373
6400
  // if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)
6374
6401
  if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {
6375
- return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
6402
+ return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false, apiId);
6376
6403
  // throw in all other cases
6377
6404
  }
6378
6405
  else {
@@ -6381,13 +6408,13 @@ class RefreshTokenClient {
6381
6408
  }
6382
6409
  }
6383
6410
  // fall back to application refresh token acquisition
6384
- return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
6411
+ return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false, apiId);
6385
6412
  }
6386
6413
  /**
6387
6414
  * makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached
6388
6415
  * @param request
6389
6416
  */
6390
- async acquireTokenWithCachedRefreshToken(request, foci) {
6417
+ async acquireTokenWithCachedRefreshToken(request, foci, apiId) {
6391
6418
  // fetches family RT or application RT based on FOCI value
6392
6419
  const refreshToken = invoke(this.cacheManager.getRefreshToken.bind(this.cacheManager), CacheManagerGetRefreshToken, this.logger, this.performanceClient, request.correlationId)(request.account, foci, request.correlationId, undefined);
6393
6420
  if (!refreshToken) {
@@ -6416,7 +6443,7 @@ class RefreshTokenClient {
6416
6443
  },
6417
6444
  };
6418
6445
  try {
6419
- return await invokeAsync(this.acquireToken.bind(this), RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest);
6446
+ return await invokeAsync(this.acquireToken.bind(this), RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest, apiId);
6420
6447
  }
6421
6448
  catch (e) {
6422
6449
  if (e instanceof InteractionRequiredAuthError) {
@@ -6529,7 +6556,7 @@ class RefreshTokenClient {
6529
6556
  }
6530
6557
  }
6531
6558
 
6532
- /*! @azure/msal-common v16.0.2 2026-01-17 */
6559
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
6533
6560
 
6534
6561
  /*
6535
6562
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6638,7 +6665,7 @@ class SilentFlowClient {
6638
6665
  }
6639
6666
  }
6640
6667
 
6641
- /*! @azure/msal-common v16.0.2 2026-01-17 */
6668
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
6642
6669
 
6643
6670
  /*
6644
6671
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6788,7 +6815,7 @@ function extractLoginHint(account) {
6788
6815
  return account.loginHint || account.idTokenClaims?.login_hint || null;
6789
6816
  }
6790
6817
 
6791
- /*! @azure/msal-common v16.0.2 2026-01-17 */
6818
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
6792
6819
  /*
6793
6820
  * Copyright (c) Microsoft Corporation. All rights reserved.
6794
6821
  * Licensed under the MIT License.
@@ -6805,7 +6832,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
6805
6832
  unexpectedError: unexpectedError
6806
6833
  });
6807
6834
 
6808
- /*! @azure/msal-common v16.0.2 2026-01-17 */
6835
+ /*! @azure/msal-common v16.0.4 2026-02-10 */
6809
6836
 
6810
6837
  /*
6811
6838
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7368,6 +7395,8 @@ const ApiId = {
7368
7395
  acquireTokenByUsernamePassword: 371,
7369
7396
  acquireTokenByDeviceCode: 671,
7370
7397
  acquireTokenByClientCredential: 771,
7398
+ acquireTokenByOBO: 772,
7399
+ acquireTokenWithManagedIdentity: 773,
7371
7400
  acquireTokenByCode: 871,
7372
7401
  acquireTokenByRefreshToken: 872,
7373
7402
  };
@@ -9004,7 +9033,7 @@ class ClientAssertion {
9004
9033
 
9005
9034
  /* eslint-disable header/header */
9006
9035
  const name = "@azure/msal-node";
9007
- const version = "5.0.2";
9036
+ const version = "5.0.4";
9008
9037
 
9009
9038
  /*
9010
9039
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9093,7 +9122,7 @@ class UsernamePasswordClient extends BaseClient {
9093
9122
  const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
9094
9123
  // Validate response. This function throws a server error if an error is returned by the server.
9095
9124
  responseHandler.validateTokenResponse(response.body, request.correlationId);
9096
- const tokenResponse = responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request);
9125
+ const tokenResponse = responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, ApiId.acquireTokenByUsernamePassword);
9097
9126
  return tokenResponse;
9098
9127
  }
9099
9128
  /**
@@ -9268,7 +9297,7 @@ class ClientApplication {
9268
9297
  const authClientConfig = await this.buildOauthClientConfiguration(discoveredAuthority, validRequest.correlationId, validRequest.redirectUri, serverTelemetryManager);
9269
9298
  const authorizationCodeClient = new AuthorizationCodeClient(authClientConfig, new StubPerformanceClient());
9270
9299
  this.logger.verbose("Auth code client created", validRequest.correlationId);
9271
- return await authorizationCodeClient.acquireToken(validRequest, authCodePayLoad);
9300
+ return await authorizationCodeClient.acquireToken(validRequest, ApiId.acquireTokenByCode, authCodePayLoad);
9272
9301
  }
9273
9302
  catch (e) {
9274
9303
  if (e instanceof AuthError) {
@@ -9298,7 +9327,7 @@ class ClientApplication {
9298
9327
  const refreshTokenClientConfig = await this.buildOauthClientConfiguration(discoveredAuthority, validRequest.correlationId, validRequest.redirectUri || "", serverTelemetryManager);
9299
9328
  const refreshTokenClient = new RefreshTokenClient(refreshTokenClientConfig, new StubPerformanceClient());
9300
9329
  this.logger.verbose("Refresh token client created", validRequest.correlationId);
9301
- return await refreshTokenClient.acquireToken(validRequest);
9330
+ return await refreshTokenClient.acquireToken(validRequest, ApiId.acquireTokenByRefreshToken);
9302
9331
  }
9303
9332
  catch (e) {
9304
9333
  if (e instanceof AuthError) {
@@ -9338,7 +9367,7 @@ class ClientApplication {
9338
9367
  error.errorCode ===
9339
9368
  tokenRefreshRequired) {
9340
9369
  const refreshTokenClient = new RefreshTokenClient(clientConfiguration, new StubPerformanceClient());
9341
- return refreshTokenClient.acquireTokenByRefreshToken(validRequest);
9370
+ return refreshTokenClient.acquireTokenByRefreshToken(validRequest, ApiId.acquireTokenSilent);
9342
9371
  }
9343
9372
  throw error;
9344
9373
  }
@@ -9363,7 +9392,7 @@ class ClientApplication {
9363
9392
  // refresh the access token in the background
9364
9393
  const refreshTokenClient = new RefreshTokenClient(clientConfiguration, new StubPerformanceClient());
9365
9394
  try {
9366
- await refreshTokenClient.acquireTokenByRefreshToken(validRequest);
9395
+ await refreshTokenClient.acquireTokenByRefreshToken(validRequest, ApiId.acquireTokenSilent);
9367
9396
  }
9368
9397
  catch {
9369
9398
  // do nothing, this is running in the background and no action is to be taken upon success or failure
@@ -9667,7 +9696,7 @@ class DeviceCodeClient extends BaseClient {
9667
9696
  const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
9668
9697
  // Validate response. This function throws a server error if an error is returned by the server.
9669
9698
  responseHandler.validateTokenResponse(response, request.correlationId);
9670
- return responseHandler.handleServerTokenResponse(response, this.authority, reqTimestamp, request);
9699
+ return responseHandler.handleServerTokenResponse(response, this.authority, reqTimestamp, request, ApiId.acquireTokenByDeviceCode);
9671
9700
  }
9672
9701
  /**
9673
9702
  * Creates device code request and executes http GET
@@ -10266,7 +10295,7 @@ class ClientCredentialClient extends BaseClient {
10266
10295
  }
10267
10296
  const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
10268
10297
  responseHandler.validateTokenResponse(serverTokenResponse, request.correlationId, refreshAccessToken);
10269
- const tokenResponse = await responseHandler.handleServerTokenResponse(serverTokenResponse, this.authority, reqTimestamp, request);
10298
+ const tokenResponse = await responseHandler.handleServerTokenResponse(serverTokenResponse, this.authority, reqTimestamp, request, ApiId.acquireTokenByClientCredential);
10270
10299
  return tokenResponse;
10271
10300
  }
10272
10301
  /**
@@ -10467,7 +10496,7 @@ class OnBehalfOfClient extends BaseClient {
10467
10496
  const response = await this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId);
10468
10497
  const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
10469
10498
  responseHandler.validateTokenResponse(response.body, request.correlationId);
10470
- const tokenResponse = await responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, undefined, userAssertionHash);
10499
+ const tokenResponse = await responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, ApiId.acquireTokenByOBO, undefined, userAssertionHash);
10471
10500
  return tokenResponse;
10472
10501
  }
10473
10502
  /**
@@ -10923,7 +10952,7 @@ class BaseManagedIdentitySource {
10923
10952
  const serverTokenResponse = await this.getServerTokenResponseAsync(response, networkClientHelper, networkRequest, networkRequestOptions);
10924
10953
  responseHandler.validateTokenResponse(serverTokenResponse, serverTokenResponse.correlation_id || "", refreshAccessToken);
10925
10954
  // caches the token
10926
- return responseHandler.handleServerTokenResponse(serverTokenResponse, fakeAuthority, reqTimestamp, managedIdentityRequest);
10955
+ return responseHandler.handleServerTokenResponse(serverTokenResponse, fakeAuthority, reqTimestamp, managedIdentityRequest, ApiId.acquireTokenWithManagedIdentity);
10927
10956
  }
10928
10957
  /**
10929
10958
  * Determines the appropriate query parameter name for user-assigned managed identity
@@ -12222,6 +12251,7 @@ exports.ClientAuthErrorCodes = ClientAuthErrorCodes;
12222
12251
  exports.ClientConfigurationError = ClientConfigurationError;
12223
12252
  exports.ClientConfigurationErrorCodes = ClientConfigurationErrorCodes;
12224
12253
  exports.ConfidentialClientApplication = ConfidentialClientApplication;
12254
+ exports.CryptoProvider = CryptoProvider;
12225
12255
  exports.DistributedCachePlugin = DistributedCachePlugin;
12226
12256
  exports.InteractionRequiredAuthError = InteractionRequiredAuthError;
12227
12257
  exports.InteractionRequiredAuthErrorCodes = InteractionRequiredAuthErrorCodes;