@azure/msal-node 5.2.0 → 5.2.2

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 (54) 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.mjs +1 -1
  9. package/dist/client/ClientAssertion.mjs +1 -1
  10. package/dist/client/ClientCredentialClient.mjs +1 -1
  11. package/dist/client/ConfidentialClientApplication.mjs +1 -1
  12. package/dist/client/DeviceCodeClient.mjs +1 -1
  13. package/dist/client/ManagedIdentityApplication.mjs +1 -1
  14. package/dist/client/ManagedIdentityClient.mjs +1 -1
  15. package/dist/client/ManagedIdentitySources/AppService.mjs +1 -1
  16. package/dist/client/ManagedIdentitySources/AzureArc.mjs +1 -1
  17. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +1 -1
  18. package/dist/client/ManagedIdentitySources/CloudShell.mjs +1 -1
  19. package/dist/client/ManagedIdentitySources/Imds.mjs +1 -1
  20. package/dist/client/ManagedIdentitySources/MachineLearning.mjs +1 -1
  21. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +1 -1
  22. package/dist/client/OnBehalfOfClient.mjs +1 -1
  23. package/dist/client/PublicClientApplication.mjs +1 -1
  24. package/dist/client/UsernamePasswordClient.mjs +1 -1
  25. package/dist/config/Configuration.mjs +1 -1
  26. package/dist/config/ManagedIdentityId.mjs +1 -1
  27. package/dist/config/ManagedIdentityRequestParameters.mjs +1 -1
  28. package/dist/crypto/CryptoProvider.mjs +1 -1
  29. package/dist/crypto/GuidGenerator.mjs +1 -1
  30. package/dist/crypto/HashUtils.mjs +1 -1
  31. package/dist/crypto/PkceGenerator.mjs +1 -1
  32. package/dist/error/ClientAuthErrorCodes.mjs +1 -1
  33. package/dist/error/ManagedIdentityError.mjs +1 -1
  34. package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
  35. package/dist/error/NodeAuthError.mjs +1 -1
  36. package/dist/index.mjs +1 -1
  37. package/dist/internals.mjs +1 -1
  38. package/dist/network/HttpClient.mjs +1 -1
  39. package/dist/network/HttpClientWithRetries.mjs +1 -1
  40. package/dist/network/LoopbackClient.mjs +1 -1
  41. package/dist/packageMetadata.mjs +2 -2
  42. package/dist/protocol/Authorize.mjs +1 -1
  43. package/dist/retry/DefaultManagedIdentityRetryPolicy.mjs +1 -1
  44. package/dist/retry/ExponentialRetryStrategy.mjs +1 -1
  45. package/dist/retry/ImdsRetryPolicy.mjs +1 -1
  46. package/dist/retry/LinearRetryStrategy.mjs +1 -1
  47. package/dist/utils/Constants.mjs +1 -1
  48. package/dist/utils/EncodingUtils.mjs +1 -1
  49. package/dist/utils/TimeUtils.mjs +1 -1
  50. package/lib/msal-node.cjs +214 -66
  51. package/lib/msal-node.cjs.map +1 -1
  52. package/package.json +2 -2
  53. package/src/packageMetadata.ts +1 -1
  54. package/types/packageMetadata.d.ts +1 -1
package/lib/msal-node.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-node v5.2.0 2026-05-07 */
1
+ /*! @azure/msal-node v5.2.2 2026-05-19 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
@@ -150,7 +150,7 @@ class Serializer {
150
150
  }
151
151
  }
152
152
 
153
- /*! @azure/msal-common v16.6.0 2026-05-07 */
153
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
154
154
  /*
155
155
  * Copyright (c) Microsoft Corporation. All rights reserved.
156
156
  * Licensed under the MIT License.
@@ -398,7 +398,7 @@ const EncodingTypes = {
398
398
  UTF8: "utf-8",
399
399
  };
400
400
 
401
- /*! @azure/msal-common v16.6.0 2026-05-07 */
401
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
402
402
  /*
403
403
  * Copyright (c) Microsoft Corporation. All rights reserved.
404
404
  * Licensed under the MIT License.
@@ -451,7 +451,7 @@ const INSTANCE_AWARE = "instance_aware";
451
451
  const RESOURCE = "resource";
452
452
  const CLI_DATA = "clidata";
453
453
 
454
- /*! @azure/msal-common v16.6.0 2026-05-07 */
454
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
455
455
  /*
456
456
  * Copyright (c) Microsoft Corporation. All rights reserved.
457
457
  * Licensed under the MIT License.
@@ -482,7 +482,7 @@ function createAuthError(code, additionalMessage) {
482
482
  return new AuthError(code, additionalMessage || getDefaultErrorMessage(code));
483
483
  }
484
484
 
485
- /*! @azure/msal-common v16.6.0 2026-05-07 */
485
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
486
486
 
487
487
  /*
488
488
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -502,7 +502,7 @@ function createClientConfigurationError(errorCode) {
502
502
  return new ClientConfigurationError(errorCode);
503
503
  }
504
504
 
505
- /*! @azure/msal-common v16.6.0 2026-05-07 */
505
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
506
506
  /*
507
507
  * Copyright (c) Microsoft Corporation. All rights reserved.
508
508
  * Licensed under the MIT License.
@@ -582,7 +582,7 @@ class StringUtils {
582
582
  }
583
583
  }
584
584
 
585
- /*! @azure/msal-common v16.6.0 2026-05-07 */
585
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
586
586
 
587
587
  /*
588
588
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -605,7 +605,7 @@ function createClientAuthError(errorCode, additionalMessage) {
605
605
  return new ClientAuthError(errorCode, additionalMessage);
606
606
  }
607
607
 
608
- /*! @azure/msal-common v16.6.0 2026-05-07 */
608
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
609
609
  /*
610
610
  * Copyright (c) Microsoft Corporation. All rights reserved.
611
611
  * Licensed under the MIT License.
@@ -631,7 +631,9 @@ const invalidAuthenticationHeader = "invalid_authentication_header";
631
631
  const cannotSetOIDCOptions = "cannot_set_OIDCOptions";
632
632
  const cannotAllowPlatformBroker = "cannot_allow_platform_broker";
633
633
  const authorityMismatch = "authority_mismatch";
634
- const invalidRequestMethodForEAR = "invalid_request_method_for_EAR";
634
+ const invalidRequestMethodForEAR = "invalid_request_method_for_EAR";
635
+ const invalidPlatformBrokerConfiguration = "invalid_platform_broker_configuration";
636
+ const issuerValidationFailed = "issuer_validation_failed";
635
637
 
636
638
  var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
637
639
  __proto__: null,
@@ -646,7 +648,9 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
646
648
  invalidClaims: invalidClaims,
647
649
  invalidCloudDiscoveryMetadata: invalidCloudDiscoveryMetadata,
648
650
  invalidCodeChallengeMethod: invalidCodeChallengeMethod,
651
+ invalidPlatformBrokerConfiguration: invalidPlatformBrokerConfiguration,
649
652
  invalidRequestMethodForEAR: invalidRequestMethodForEAR,
653
+ issuerValidationFailed: issuerValidationFailed,
650
654
  logoutRequestEmpty: logoutRequestEmpty,
651
655
  missingNonceAuthenticationHeader: missingNonceAuthenticationHeader,
652
656
  missingSshJwk: missingSshJwk,
@@ -659,7 +663,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
659
663
  urlParseError: urlParseError
660
664
  });
661
665
 
662
- /*! @azure/msal-common v16.6.0 2026-05-07 */
666
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
663
667
  /*
664
668
  * Copyright (c) Microsoft Corporation. All rights reserved.
665
669
  * Licensed under the MIT License.
@@ -747,7 +751,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
747
751
  userCanceled: userCanceled
748
752
  });
749
753
 
750
- /*! @azure/msal-common v16.6.0 2026-05-07 */
754
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
751
755
 
752
756
  /*
753
757
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -942,7 +946,7 @@ class ScopeSet {
942
946
  }
943
947
  }
944
948
 
945
- /*! @azure/msal-common v16.6.0 2026-05-07 */
949
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
946
950
 
947
951
  /*
948
952
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1349,7 +1353,7 @@ function addResource(parameters, resource) {
1349
1353
  }
1350
1354
  }
1351
1355
 
1352
- /*! @azure/msal-common v16.6.0 2026-05-07 */
1356
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
1353
1357
  /**
1354
1358
  * Parses hash string from given string. Returns empty string if no hash symbol is found.
1355
1359
  * @param hashString
@@ -1402,7 +1406,7 @@ function mapToQueryString(parameters) {
1402
1406
  return queryParameterArray.join("&");
1403
1407
  }
1404
1408
 
1405
- /*! @azure/msal-common v16.6.0 2026-05-07 */
1409
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
1406
1410
 
1407
1411
  /*
1408
1412
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1441,7 +1445,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
1441
1445
  },
1442
1446
  };
1443
1447
 
1444
- /*! @azure/msal-common v16.6.0 2026-05-07 */
1448
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
1445
1449
  /*
1446
1450
  * Copyright (c) Microsoft Corporation. All rights reserved.
1447
1451
  * Licensed under the MIT License.
@@ -1702,12 +1706,12 @@ class Logger {
1702
1706
  }
1703
1707
  }
1704
1708
 
1705
- /*! @azure/msal-common v16.6.0 2026-05-07 */
1709
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
1706
1710
  /* eslint-disable header/header */
1707
1711
  const name$1 = "@azure/msal-common";
1708
- const version$1 = "16.6.0";
1712
+ const version$1 = "16.6.2";
1709
1713
 
1710
- /*! @azure/msal-common v16.6.0 2026-05-07 */
1714
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
1711
1715
  /*
1712
1716
  * Copyright (c) Microsoft Corporation. All rights reserved.
1713
1717
  * Licensed under the MIT License.
@@ -1727,7 +1731,7 @@ const AzureCloudInstance = {
1727
1731
  AzureUsGovernment: "https://login.microsoftonline.us",
1728
1732
  };
1729
1733
 
1730
- /*! @azure/msal-common v16.6.0 2026-05-07 */
1734
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
1731
1735
  /*
1732
1736
  * Copyright (c) Microsoft Corporation. All rights reserved.
1733
1737
  * Licensed under the MIT License.
@@ -1810,7 +1814,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
1810
1814
  return updatedAccountInfo;
1811
1815
  }
1812
1816
 
1813
- /*! @azure/msal-common v16.6.0 2026-05-07 */
1817
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
1814
1818
 
1815
1819
  /*
1816
1820
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1890,7 +1894,7 @@ function checkMaxAge(authTime, maxAge) {
1890
1894
  }
1891
1895
  }
1892
1896
 
1893
- /*! @azure/msal-common v16.6.0 2026-05-07 */
1897
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
1894
1898
 
1895
1899
  /*
1896
1900
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2047,7 +2051,7 @@ class UrlString {
2047
2051
  }
2048
2052
  }
2049
2053
 
2050
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2054
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
2051
2055
 
2052
2056
  /*
2053
2057
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2133,6 +2137,15 @@ const rawMetdataJSON = {
2133
2137
  preferred_cache: "login.sovcloud-identity.sg",
2134
2138
  aliases: ["login.sovcloud-identity.sg"],
2135
2139
  },
2140
+ {
2141
+ preferred_network: "login.windows-ppe.net",
2142
+ preferred_cache: "login.windows-ppe.net",
2143
+ aliases: [
2144
+ "login.windows-ppe.net",
2145
+ "sts.windows-ppe.net",
2146
+ "login.microsoft-ppe.com",
2147
+ ],
2148
+ },
2136
2149
  ],
2137
2150
  },
2138
2151
  };
@@ -2204,7 +2217,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
2204
2217
  return null;
2205
2218
  }
2206
2219
 
2207
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2220
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
2208
2221
  /*
2209
2222
  * Copyright (c) Microsoft Corporation. All rights reserved.
2210
2223
  * Licensed under the MIT License.
@@ -2212,7 +2225,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
2212
2225
  const cacheQuotaExceeded = "cache_quota_exceeded";
2213
2226
  const cacheErrorUnknown = "cache_error_unknown";
2214
2227
 
2215
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2228
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
2216
2229
 
2217
2230
  /*
2218
2231
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2250,7 +2263,7 @@ function createCacheError(e) {
2250
2263
  }
2251
2264
  }
2252
2265
 
2253
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2266
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
2254
2267
 
2255
2268
  /*
2256
2269
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2288,7 +2301,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
2288
2301
  };
2289
2302
  }
2290
2303
 
2291
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2304
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
2292
2305
  /*
2293
2306
  * Copyright (c) Microsoft Corporation. All rights reserved.
2294
2307
  * Licensed under the MIT License.
@@ -2303,7 +2316,7 @@ const AuthorityType = {
2303
2316
  Ciam: 3,
2304
2317
  };
2305
2318
 
2306
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2319
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
2307
2320
  /*
2308
2321
  * Copyright (c) Microsoft Corporation. All rights reserved.
2309
2322
  * Licensed under the MIT License.
@@ -2325,7 +2338,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
2325
2338
  return null;
2326
2339
  }
2327
2340
 
2328
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2341
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
2329
2342
  /*
2330
2343
  * Copyright (c) Microsoft Corporation. All rights reserved.
2331
2344
  * Licensed under the MIT License.
@@ -2349,7 +2362,7 @@ const ProtocolMode = {
2349
2362
  EAR: "EAR",
2350
2363
  };
2351
2364
 
2352
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2365
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
2353
2366
  /**
2354
2367
  * Returns the AccountInfo interface for this account.
2355
2368
  */
@@ -2492,7 +2505,7 @@ function isAccountEntity(entity) {
2492
2505
  entity.hasOwnProperty("authorityType"));
2493
2506
  }
2494
2507
 
2495
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2508
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
2496
2509
 
2497
2510
  /*
2498
2511
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3623,7 +3636,7 @@ class DefaultStorageClass extends CacheManager {
3623
3636
  }
3624
3637
  }
3625
3638
 
3626
- /*! @azure/msal-common v16.6.0 2026-05-07 */
3639
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
3627
3640
  /*
3628
3641
  * Copyright (c) Microsoft Corporation. All rights reserved.
3629
3642
  * Licensed under the MIT License.
@@ -3637,7 +3650,7 @@ class DefaultStorageClass extends CacheManager {
3637
3650
  const PerformanceEventStatus = {
3638
3651
  InProgress: 1};
3639
3652
 
3640
- /*! @azure/msal-common v16.6.0 2026-05-07 */
3653
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
3641
3654
 
3642
3655
  /*
3643
3656
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3692,7 +3705,7 @@ class StubPerformanceClient {
3692
3705
  }
3693
3706
  }
3694
3707
 
3695
- /*! @azure/msal-common v16.6.0 2026-05-07 */
3708
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
3696
3709
 
3697
3710
  /*
3698
3711
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3787,7 +3800,7 @@ function isOidcProtocolMode(config) {
3787
3800
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
3788
3801
  }
3789
3802
 
3790
- /*! @azure/msal-common v16.6.0 2026-05-07 */
3803
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
3791
3804
  /*
3792
3805
  * Copyright (c) Microsoft Corporation. All rights reserved.
3793
3806
  * Licensed under the MIT License.
@@ -3814,7 +3827,7 @@ function isOidcProtocolMode(config) {
3814
3827
  }
3815
3828
  }
3816
3829
 
3817
- /*! @azure/msal-common v16.6.0 2026-05-07 */
3830
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
3818
3831
  /*
3819
3832
  * Copyright (c) Microsoft Corporation. All rights reserved.
3820
3833
  * Licensed under the MIT License.
@@ -3869,7 +3882,7 @@ function delay(t, value) {
3869
3882
  return new Promise((resolve) => setTimeout(() => resolve(value), t));
3870
3883
  }
3871
3884
 
3872
- /*! @azure/msal-common v16.6.0 2026-05-07 */
3885
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
3873
3886
 
3874
3887
  /*
3875
3888
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4128,7 +4141,7 @@ function isAuthorityMetadataExpired(metadata) {
4128
4141
  return metadata.expiresAt <= nowSeconds();
4129
4142
  }
4130
4143
 
4131
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4144
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
4132
4145
  /*
4133
4146
  * Copyright (c) Microsoft Corporation. All rights reserved.
4134
4147
  * Licensed under the MIT License.
@@ -4190,7 +4203,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
4190
4203
  */
4191
4204
  const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
4192
4205
 
4193
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4206
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
4194
4207
  /*
4195
4208
  * Copyright (c) Microsoft Corporation. All rights reserved.
4196
4209
  * Licensed under the MIT License.
@@ -4283,7 +4296,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
4283
4296
  };
4284
4297
  };
4285
4298
 
4286
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4299
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
4287
4300
 
4288
4301
  /*
4289
4302
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4363,7 +4376,7 @@ class PopTokenGenerator {
4363
4376
  }
4364
4377
  }
4365
4378
 
4366
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4379
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
4367
4380
  /*
4368
4381
  * Copyright (c) Microsoft Corporation. All rights reserved.
4369
4382
  * Licensed under the MIT License.
@@ -4427,7 +4440,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
4427
4440
  uxNotAllowed: uxNotAllowed
4428
4441
  });
4429
4442
 
4430
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4443
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
4431
4444
 
4432
4445
  /*
4433
4446
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4495,7 +4508,7 @@ function createInteractionRequiredAuthError(errorCode, errorMessage) {
4495
4508
  return new InteractionRequiredAuthError(errorCode, errorMessage);
4496
4509
  }
4497
4510
 
4498
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4511
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
4499
4512
 
4500
4513
  /*
4501
4514
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4514,7 +4527,7 @@ class ServerError extends AuthError {
4514
4527
  }
4515
4528
  }
4516
4529
 
4517
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4530
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
4518
4531
  /**
4519
4532
  * Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.
4520
4533
  * @param base64Decode
@@ -4546,7 +4559,7 @@ function parseRequestState(base64Decode, state) {
4546
4559
  }
4547
4560
  }
4548
4561
 
4549
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4562
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
4550
4563
 
4551
4564
  /*
4552
4565
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4894,7 +4907,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
4894
4907
  return baseAccount;
4895
4908
  }
4896
4909
 
4897
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4910
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
4898
4911
  /*
4899
4912
  * Copyright (c) Microsoft Corporation. All rights reserved.
4900
4913
  * Licensed under the MIT License.
@@ -4904,7 +4917,7 @@ const CcsCredentialType = {
4904
4917
  UPN: "UPN",
4905
4918
  };
4906
4919
 
4907
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4920
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
4908
4921
  /*
4909
4922
  * Copyright (c) Microsoft Corporation. All rights reserved.
4910
4923
  * Licensed under the MIT License.
@@ -4922,7 +4935,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {
4922
4935
  }
4923
4936
  }
4924
4937
 
4925
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4938
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
4926
4939
  /*
4927
4940
  * Copyright (c) Microsoft Corporation. All rights reserved.
4928
4941
  * Licensed under the MIT License.
@@ -4943,7 +4956,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
4943
4956
  };
4944
4957
  }
4945
4958
 
4946
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4959
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
4947
4960
 
4948
4961
  /*
4949
4962
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5029,7 +5042,7 @@ class ThrottlingUtils {
5029
5042
  }
5030
5043
  }
5031
5044
 
5032
- /*! @azure/msal-common v16.6.0 2026-05-07 */
5045
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
5033
5046
 
5034
5047
  /*
5035
5048
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5060,7 +5073,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
5060
5073
  return new NetworkError(error, httpStatus, responseHeaders);
5061
5074
  }
5062
5075
 
5063
- /*! @azure/msal-common v16.6.0 2026-05-07 */
5076
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
5064
5077
 
5065
5078
  /*
5066
5079
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5174,7 +5187,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
5174
5187
  return response;
5175
5188
  }
5176
5189
 
5177
- /*! @azure/msal-common v16.6.0 2026-05-07 */
5190
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
5178
5191
  /*
5179
5192
  * Copyright (c) Microsoft Corporation. All rights reserved.
5180
5193
  * Licensed under the MIT License.
@@ -5186,7 +5199,7 @@ function isOpenIdConfigResponse(response) {
5186
5199
  response.hasOwnProperty("jwks_uri"));
5187
5200
  }
5188
5201
 
5189
- /*! @azure/msal-common v16.6.0 2026-05-07 */
5202
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
5190
5203
  /*
5191
5204
  * Copyright (c) Microsoft Corporation. All rights reserved.
5192
5205
  * Licensed under the MIT License.
@@ -5196,7 +5209,7 @@ function isCloudInstanceDiscoveryResponse(response) {
5196
5209
  response.hasOwnProperty("metadata"));
5197
5210
  }
5198
5211
 
5199
- /*! @azure/msal-common v16.6.0 2026-05-07 */
5212
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
5200
5213
  /*
5201
5214
  * Copyright (c) Microsoft Corporation. All rights reserved.
5202
5215
  * Licensed under the MIT License.
@@ -5206,7 +5219,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
5206
5219
  response.hasOwnProperty("error_description"));
5207
5220
  }
5208
5221
 
5209
- /*! @azure/msal-common v16.6.0 2026-05-07 */
5222
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
5210
5223
 
5211
5224
  /*
5212
5225
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5311,7 +5324,7 @@ RegionDiscovery.IMDS_OPTIONS = {
5311
5324
  },
5312
5325
  };
5313
5326
 
5314
- /*! @azure/msal-common v16.6.0 2026-05-07 */
5327
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
5315
5328
 
5316
5329
  /*
5317
5330
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5566,7 +5579,7 @@ class Authority {
5566
5579
  }, this.correlationId);
5567
5580
  }
5568
5581
  /**
5569
- * Returns metadata entity from cache if it exists, otherwiser returns a new metadata entity built
5582
+ * Returns metadata entity from cache if it exists, otherwise returns a new metadata entity built
5570
5583
  * from the configured canonical authority
5571
5584
  * @returns
5572
5585
  */
@@ -5635,6 +5648,8 @@ class Authority {
5635
5648
  // Get metadata from network if local sources aren't available
5636
5649
  let metadata = await invokeAsync(this.getEndpointMetadataFromNetwork.bind(this), AuthorityGetEndpointMetadataFromNetwork, this.logger, this.performanceClient, this.correlationId)();
5637
5650
  if (metadata) {
5651
+ // Validate the issuer returned by the OIDC discovery document.
5652
+ this.validateIssuer(metadata.issuer);
5638
5653
  // If the user prefers to use an azure region replace the global endpoints with regional information.
5639
5654
  if (this.authorityOptions.azureRegionConfiguration?.azureRegion) {
5640
5655
  metadata = await invokeAsync(this.updateMetadataWithRegionalInformation.bind(this), AuthorityUpdateMetadataWithRegionalInformation, this.logger, this.performanceClient, this.correlationId)(metadata);
@@ -5803,7 +5818,7 @@ class Authority {
5803
5818
  throw createClientConfigurationError(untrustedAuthority);
5804
5819
  }
5805
5820
  updateCloudDiscoveryMetadataFromLocalSources(metadataEntity) {
5806
- this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration", this.correlationId);
5821
+ this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration", this.correlationId);
5807
5822
  this.logger.verbosePii(`Known Authorities: '${this.authorityOptions.knownAuthorities ||
5808
5823
  NOT_APPLICABLE}'`, this.correlationId);
5809
5824
  this.logger.verbosePii(`Authority Metadata: '${this.authorityOptions.authorityMetadata ||
@@ -6003,6 +6018,139 @@ class Authority {
6003
6018
  isAliasOfKnownMicrosoftAuthority(host) {
6004
6019
  return InstanceDiscoveryMetadataAliases.has(host);
6005
6020
  }
6021
+ /**
6022
+ * Validates the `issuer` returned by an OIDC discovery document against
6023
+ * this authority, per
6024
+ * https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationValidation
6025
+ *
6026
+ * The issuer is accepted when ANY of the following holds:
6027
+ * 1. The issuer scheme + host + port match the authority's (path may
6028
+ * differ). Applies to all authorities.
6029
+ * 2. The authority is a Microsoft cloud authority (public, sovereign,
6030
+ * or CIAM), the issuer is HTTPS, and the issuer host is in the known
6031
+ * Microsoft authority host set.
6032
+ * 3. Same as (2), but the issuer host is a single-label regional variant
6033
+ * of a known Microsoft host (e.g. `westus.login.microsoftonline.com`).
6034
+ * 4. Same as (2), but the issuer host matches the CIAM tenant pattern
6035
+ * `{tenant}.ciamlogin.com` with an optional `/{tenant}[.onmicrosoft.com][/v2.0]`
6036
+ * path.
6037
+ *
6038
+ * @param issuer The `issuer` value returned in the OIDC discovery document.
6039
+ * @throws ClientConfigurationError("issuer_validation_failed") on failure.
6040
+ */
6041
+ validateIssuer(issuer) {
6042
+ if (!issuer) {
6043
+ throw createClientConfigurationError(issuerValidationFailed);
6044
+ }
6045
+ // Parse with the WHATWG URL API. URL normalizes scheme + host to lowercase per RFC 3986.
6046
+ let issuerUrl;
6047
+ try {
6048
+ issuerUrl = new URL(issuer);
6049
+ }
6050
+ catch {
6051
+ throw createClientConfigurationError(issuerValidationFailed);
6052
+ }
6053
+ const issuerScheme = issuerUrl.protocol;
6054
+ const issuerHost = issuerUrl.host;
6055
+ const authorityScheme = (this.canonicalAuthorityUrlComponents.Protocol || "").toLowerCase();
6056
+ const authorityHost = (this.canonicalAuthorityUrlComponents.HostNameAndPort || "").toLowerCase();
6057
+ // Rule 1: Same scheme and host
6058
+ const matchesAuthorityOrigin = this.matchesAuthorityOrigin(issuerScheme, issuerHost, authorityScheme, authorityHost);
6059
+ // Rule 2: The issuer host is a well-known Microsoft authority host (HTTPS only)
6060
+ const matchesKnownMicrosoftHost = issuerScheme === "https:" &&
6061
+ this.isAliasOfKnownMicrosoftAuthority(issuerHost);
6062
+ /*
6063
+ * Rule 3: The issuer host is a regional variant ({region}.{host}) of a well-known host
6064
+ * (HTTPS only). E.g. westus2.login.microsoft.com
6065
+ */
6066
+ const matchesRegionalMicrosoftHost = issuerScheme === "https:" &&
6067
+ this.matchesRegionalMicrosoftHost(issuerHost);
6068
+ /*
6069
+ * Rule 4: CIAM-specific validation. In a CIAM scenario the issuer is expected to
6070
+ * have "{tenant}.ciamlogin.com" as the host, even when using a custom domain.
6071
+ */
6072
+ const matchesCiamTenantPattern = this.matchesCiamTenantPattern(issuerUrl, authorityHost, this.canonicalAuthorityUrlComponents.PathSegments);
6073
+ // Each rule is an independent boolean; the issuer is valid if ANY rule matches.
6074
+ if (matchesAuthorityOrigin ||
6075
+ matchesKnownMicrosoftHost ||
6076
+ matchesRegionalMicrosoftHost ||
6077
+ matchesCiamTenantPattern) {
6078
+ return;
6079
+ }
6080
+ // issuer validation fails if none of the above rules are satisfied
6081
+ throw createClientConfigurationError(issuerValidationFailed);
6082
+ }
6083
+ /**
6084
+ * Rule 1: The issuer scheme + host (and port) match the authority's. Path
6085
+ * may differ. Applies to all authorities.
6086
+ */
6087
+ matchesAuthorityOrigin(issuerScheme, issuerHost, authorityScheme, authorityHost) {
6088
+ return issuerScheme === authorityScheme && issuerHost === authorityHost;
6089
+ }
6090
+ /**
6091
+ * Rule 3: The issuer host is a regional variant
6092
+ * (`{region}.{host}`) of a known Microsoft authority host.
6093
+ * E.g. `westus2.login.microsoft.com`.
6094
+ */
6095
+ matchesRegionalMicrosoftHost(issuerHost) {
6096
+ const firstDot = issuerHost.indexOf(".");
6097
+ if (firstDot > 0 && firstDot < issuerHost.length - 1) {
6098
+ const hostWithoutRegion = issuerHost.substring(firstDot + 1);
6099
+ return this.isAliasOfKnownMicrosoftAuthority(hostWithoutRegion);
6100
+ }
6101
+ return false;
6102
+ }
6103
+ /**
6104
+ * Rule 4: The issuer matches one of the well-known CIAM tenant patterns
6105
+ * (`https://{tenant}.ciamlogin.com[/{tenant}[.onmicrosoft.com][/v2.0]]`).
6106
+ *
6107
+ * The bare tenant name is extracted from the authority's first path segment
6108
+ * when available (stripping the `.onmicrosoft.com` suffix that
6109
+ * `transformCIAMAuthority` adds), or otherwise from the leftmost label of
6110
+ * the authority host (to support CIAM custom domain scenarios).
6111
+ *
6112
+ * Both `/{tenant}` and `/{tenant}.onmicrosoft.com` path forms are accepted
6113
+ * because the OIDC issuer may use either form depending on the authority URL
6114
+ * that was used to trigger discovery.
6115
+ */
6116
+ matchesCiamTenantPattern(issuerUrl, authorityHost, authorityPathSegments) {
6117
+ /*
6118
+ * authorityPathSegments[0] is the first path segment of the *authority
6119
+ * URL* after transformCIAMAuthority runs (e.g. "contoso.onmicrosoft.com").
6120
+ * Additional CIAM issuer path segments such as "/v2.0" are part of the
6121
+ * issuer string, not the authority URL's PathSegments.
6122
+ */
6123
+ const pathSegment = authorityPathSegments[0];
6124
+ /*
6125
+ * Extract the bare tenant name: strip the .onmicrosoft.com suffix when
6126
+ * present (introduced by transformCIAMAuthority), or fall back to the
6127
+ * first label of the authority hostname for non-transformed/custom-domain
6128
+ * CIAM authorities.
6129
+ */
6130
+ const tenantName = pathSegment
6131
+ ? pathSegment.endsWith(AAD_TENANT_DOMAIN_SUFFIX)
6132
+ ? pathSegment.slice(0, -AAD_TENANT_DOMAIN_SUFFIX.length)
6133
+ : pathSegment
6134
+ : authorityHost.split(".")[0];
6135
+ if (!tenantName) {
6136
+ return false;
6137
+ }
6138
+ const ciamBaseURL = `https://${tenantName}${CIAM_AUTH_URL}`;
6139
+ const validCiamPatterns = [
6140
+ ciamBaseURL,
6141
+ `${ciamBaseURL}/${tenantName}`,
6142
+ `${ciamBaseURL}/${tenantName}/v2.0`,
6143
+ `${ciamBaseURL}/${tenantName}${AAD_TENANT_DOMAIN_SUFFIX}`,
6144
+ `${ciamBaseURL}/${tenantName}${AAD_TENANT_DOMAIN_SUFFIX}/v2.0`, // https://{tenant}.ciamlogin.com/{tenant}.onmicrosoft.com/v2.0
6145
+ ];
6146
+ /*
6147
+ * Compose the canonical issuer string from URL components and strip any
6148
+ * trailing slashes from the path so it can be compared to the pattern set.
6149
+ */
6150
+ const issuerPath = issuerUrl.pathname.replace(/\/+$/, "");
6151
+ const normalizedIssuer = `${issuerUrl.protocol}//${issuerUrl.host}${issuerPath}`;
6152
+ return validCiamPatterns.some((pattern) => pattern === normalizedIssuer);
6153
+ }
6006
6154
  /**
6007
6155
  * Checks whether the provided host is that of a public cloud authority
6008
6156
  *
@@ -6134,7 +6282,7 @@ function buildStaticAuthorityOptions(authOptions) {
6134
6282
  };
6135
6283
  }
6136
6284
 
6137
- /*! @azure/msal-common v16.6.0 2026-05-07 */
6285
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
6138
6286
 
6139
6287
  /*
6140
6288
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6168,7 +6316,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
6168
6316
  }
6169
6317
  }
6170
6318
 
6171
- /*! @azure/msal-common v16.6.0 2026-05-07 */
6319
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
6172
6320
 
6173
6321
  /*
6174
6322
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6425,7 +6573,7 @@ class AuthorizationCodeClient {
6425
6573
  }
6426
6574
  }
6427
6575
 
6428
- /*! @azure/msal-common v16.6.0 2026-05-07 */
6576
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
6429
6577
 
6430
6578
  /*
6431
6579
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6646,7 +6794,7 @@ class RefreshTokenClient {
6646
6794
  }
6647
6795
  }
6648
6796
 
6649
- /*! @azure/msal-common v16.6.0 2026-05-07 */
6797
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
6650
6798
 
6651
6799
  /*
6652
6800
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6762,7 +6910,7 @@ class SilentFlowClient {
6762
6910
  }
6763
6911
  }
6764
6912
 
6765
- /*! @azure/msal-common v16.6.0 2026-05-07 */
6913
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
6766
6914
 
6767
6915
  /*
6768
6916
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6911,7 +7059,7 @@ function extractLoginHint(account) {
6911
7059
  return account.loginHint || account.idTokenClaims?.login_hint || null;
6912
7060
  }
6913
7061
 
6914
- /*! @azure/msal-common v16.6.0 2026-05-07 */
7062
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
6915
7063
 
6916
7064
  /*
6917
7065
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6944,7 +7092,7 @@ function containsResourceParam(params) {
6944
7092
  return Object.prototype.hasOwnProperty.call(params, "resource");
6945
7093
  }
6946
7094
 
6947
- /*! @azure/msal-common v16.6.0 2026-05-07 */
7095
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
6948
7096
  /*
6949
7097
  * Copyright (c) Microsoft Corporation. All rights reserved.
6950
7098
  * Licensed under the MIT License.
@@ -6961,7 +7109,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
6961
7109
  unexpectedError: unexpectedError
6962
7110
  });
6963
7111
 
6964
- /*! @azure/msal-common v16.6.0 2026-05-07 */
7112
+ /*! @azure/msal-common v16.6.2 2026-05-19 */
6965
7113
 
6966
7114
  /*
6967
7115
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9169,7 +9317,7 @@ class ClientAssertion {
9169
9317
 
9170
9318
  /* eslint-disable header/header */
9171
9319
  const name = "@azure/msal-node";
9172
- const version = "5.2.0";
9320
+ const version = "5.2.2";
9173
9321
 
9174
9322
  /*
9175
9323
  * Copyright (c) Microsoft Corporation. All rights reserved.