@azure/msal-node 5.2.0 → 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +212 -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.1 2026-05-11 */
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.1 2026-05-11 */
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.1 2026-05-11 */
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.1 2026-05-11 */
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.1 2026-05-11 */
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.1 2026-05-11 */
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.1 2026-05-11 */
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.1 2026-05-11 */
609
609
  /*
610
610
  * Copyright (c) Microsoft Corporation. All rights reserved.
611
611
  * Licensed under the MIT License.
@@ -631,7 +631,8 @@ 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 issuerValidationFailed = "issuer_validation_failed";
635
636
 
636
637
  var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
637
638
  __proto__: null,
@@ -647,6 +648,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
647
648
  invalidCloudDiscoveryMetadata: invalidCloudDiscoveryMetadata,
648
649
  invalidCodeChallengeMethod: invalidCodeChallengeMethod,
649
650
  invalidRequestMethodForEAR: invalidRequestMethodForEAR,
651
+ issuerValidationFailed: issuerValidationFailed,
650
652
  logoutRequestEmpty: logoutRequestEmpty,
651
653
  missingNonceAuthenticationHeader: missingNonceAuthenticationHeader,
652
654
  missingSshJwk: missingSshJwk,
@@ -659,7 +661,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
659
661
  urlParseError: urlParseError
660
662
  });
661
663
 
662
- /*! @azure/msal-common v16.6.0 2026-05-07 */
664
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
663
665
  /*
664
666
  * Copyright (c) Microsoft Corporation. All rights reserved.
665
667
  * Licensed under the MIT License.
@@ -747,7 +749,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
747
749
  userCanceled: userCanceled
748
750
  });
749
751
 
750
- /*! @azure/msal-common v16.6.0 2026-05-07 */
752
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
751
753
 
752
754
  /*
753
755
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -942,7 +944,7 @@ class ScopeSet {
942
944
  }
943
945
  }
944
946
 
945
- /*! @azure/msal-common v16.6.0 2026-05-07 */
947
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
946
948
 
947
949
  /*
948
950
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1349,7 +1351,7 @@ function addResource(parameters, resource) {
1349
1351
  }
1350
1352
  }
1351
1353
 
1352
- /*! @azure/msal-common v16.6.0 2026-05-07 */
1354
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
1353
1355
  /**
1354
1356
  * Parses hash string from given string. Returns empty string if no hash symbol is found.
1355
1357
  * @param hashString
@@ -1402,7 +1404,7 @@ function mapToQueryString(parameters) {
1402
1404
  return queryParameterArray.join("&");
1403
1405
  }
1404
1406
 
1405
- /*! @azure/msal-common v16.6.0 2026-05-07 */
1407
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
1406
1408
 
1407
1409
  /*
1408
1410
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1441,7 +1443,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
1441
1443
  },
1442
1444
  };
1443
1445
 
1444
- /*! @azure/msal-common v16.6.0 2026-05-07 */
1446
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
1445
1447
  /*
1446
1448
  * Copyright (c) Microsoft Corporation. All rights reserved.
1447
1449
  * Licensed under the MIT License.
@@ -1702,12 +1704,12 @@ class Logger {
1702
1704
  }
1703
1705
  }
1704
1706
 
1705
- /*! @azure/msal-common v16.6.0 2026-05-07 */
1707
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
1706
1708
  /* eslint-disable header/header */
1707
1709
  const name$1 = "@azure/msal-common";
1708
- const version$1 = "16.6.0";
1710
+ const version$1 = "16.6.1";
1709
1711
 
1710
- /*! @azure/msal-common v16.6.0 2026-05-07 */
1712
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
1711
1713
  /*
1712
1714
  * Copyright (c) Microsoft Corporation. All rights reserved.
1713
1715
  * Licensed under the MIT License.
@@ -1727,7 +1729,7 @@ const AzureCloudInstance = {
1727
1729
  AzureUsGovernment: "https://login.microsoftonline.us",
1728
1730
  };
1729
1731
 
1730
- /*! @azure/msal-common v16.6.0 2026-05-07 */
1732
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
1731
1733
  /*
1732
1734
  * Copyright (c) Microsoft Corporation. All rights reserved.
1733
1735
  * Licensed under the MIT License.
@@ -1810,7 +1812,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
1810
1812
  return updatedAccountInfo;
1811
1813
  }
1812
1814
 
1813
- /*! @azure/msal-common v16.6.0 2026-05-07 */
1815
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
1814
1816
 
1815
1817
  /*
1816
1818
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1890,7 +1892,7 @@ function checkMaxAge(authTime, maxAge) {
1890
1892
  }
1891
1893
  }
1892
1894
 
1893
- /*! @azure/msal-common v16.6.0 2026-05-07 */
1895
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
1894
1896
 
1895
1897
  /*
1896
1898
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2047,7 +2049,7 @@ class UrlString {
2047
2049
  }
2048
2050
  }
2049
2051
 
2050
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2052
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
2051
2053
 
2052
2054
  /*
2053
2055
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2133,6 +2135,15 @@ const rawMetdataJSON = {
2133
2135
  preferred_cache: "login.sovcloud-identity.sg",
2134
2136
  aliases: ["login.sovcloud-identity.sg"],
2135
2137
  },
2138
+ {
2139
+ preferred_network: "login.windows-ppe.net",
2140
+ preferred_cache: "login.windows-ppe.net",
2141
+ aliases: [
2142
+ "login.windows-ppe.net",
2143
+ "sts.windows-ppe.net",
2144
+ "login.microsoft-ppe.com",
2145
+ ],
2146
+ },
2136
2147
  ],
2137
2148
  },
2138
2149
  };
@@ -2204,7 +2215,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
2204
2215
  return null;
2205
2216
  }
2206
2217
 
2207
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2218
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
2208
2219
  /*
2209
2220
  * Copyright (c) Microsoft Corporation. All rights reserved.
2210
2221
  * Licensed under the MIT License.
@@ -2212,7 +2223,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
2212
2223
  const cacheQuotaExceeded = "cache_quota_exceeded";
2213
2224
  const cacheErrorUnknown = "cache_error_unknown";
2214
2225
 
2215
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2226
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
2216
2227
 
2217
2228
  /*
2218
2229
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2250,7 +2261,7 @@ function createCacheError(e) {
2250
2261
  }
2251
2262
  }
2252
2263
 
2253
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2264
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
2254
2265
 
2255
2266
  /*
2256
2267
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2288,7 +2299,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
2288
2299
  };
2289
2300
  }
2290
2301
 
2291
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2302
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
2292
2303
  /*
2293
2304
  * Copyright (c) Microsoft Corporation. All rights reserved.
2294
2305
  * Licensed under the MIT License.
@@ -2303,7 +2314,7 @@ const AuthorityType = {
2303
2314
  Ciam: 3,
2304
2315
  };
2305
2316
 
2306
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2317
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
2307
2318
  /*
2308
2319
  * Copyright (c) Microsoft Corporation. All rights reserved.
2309
2320
  * Licensed under the MIT License.
@@ -2325,7 +2336,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
2325
2336
  return null;
2326
2337
  }
2327
2338
 
2328
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2339
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
2329
2340
  /*
2330
2341
  * Copyright (c) Microsoft Corporation. All rights reserved.
2331
2342
  * Licensed under the MIT License.
@@ -2349,7 +2360,7 @@ const ProtocolMode = {
2349
2360
  EAR: "EAR",
2350
2361
  };
2351
2362
 
2352
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2363
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
2353
2364
  /**
2354
2365
  * Returns the AccountInfo interface for this account.
2355
2366
  */
@@ -2492,7 +2503,7 @@ function isAccountEntity(entity) {
2492
2503
  entity.hasOwnProperty("authorityType"));
2493
2504
  }
2494
2505
 
2495
- /*! @azure/msal-common v16.6.0 2026-05-07 */
2506
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
2496
2507
 
2497
2508
  /*
2498
2509
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3623,7 +3634,7 @@ class DefaultStorageClass extends CacheManager {
3623
3634
  }
3624
3635
  }
3625
3636
 
3626
- /*! @azure/msal-common v16.6.0 2026-05-07 */
3637
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
3627
3638
  /*
3628
3639
  * Copyright (c) Microsoft Corporation. All rights reserved.
3629
3640
  * Licensed under the MIT License.
@@ -3637,7 +3648,7 @@ class DefaultStorageClass extends CacheManager {
3637
3648
  const PerformanceEventStatus = {
3638
3649
  InProgress: 1};
3639
3650
 
3640
- /*! @azure/msal-common v16.6.0 2026-05-07 */
3651
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
3641
3652
 
3642
3653
  /*
3643
3654
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3692,7 +3703,7 @@ class StubPerformanceClient {
3692
3703
  }
3693
3704
  }
3694
3705
 
3695
- /*! @azure/msal-common v16.6.0 2026-05-07 */
3706
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
3696
3707
 
3697
3708
  /*
3698
3709
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3787,7 +3798,7 @@ function isOidcProtocolMode(config) {
3787
3798
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
3788
3799
  }
3789
3800
 
3790
- /*! @azure/msal-common v16.6.0 2026-05-07 */
3801
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
3791
3802
  /*
3792
3803
  * Copyright (c) Microsoft Corporation. All rights reserved.
3793
3804
  * Licensed under the MIT License.
@@ -3814,7 +3825,7 @@ function isOidcProtocolMode(config) {
3814
3825
  }
3815
3826
  }
3816
3827
 
3817
- /*! @azure/msal-common v16.6.0 2026-05-07 */
3828
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
3818
3829
  /*
3819
3830
  * Copyright (c) Microsoft Corporation. All rights reserved.
3820
3831
  * Licensed under the MIT License.
@@ -3869,7 +3880,7 @@ function delay(t, value) {
3869
3880
  return new Promise((resolve) => setTimeout(() => resolve(value), t));
3870
3881
  }
3871
3882
 
3872
- /*! @azure/msal-common v16.6.0 2026-05-07 */
3883
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
3873
3884
 
3874
3885
  /*
3875
3886
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4128,7 +4139,7 @@ function isAuthorityMetadataExpired(metadata) {
4128
4139
  return metadata.expiresAt <= nowSeconds();
4129
4140
  }
4130
4141
 
4131
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4142
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
4132
4143
  /*
4133
4144
  * Copyright (c) Microsoft Corporation. All rights reserved.
4134
4145
  * Licensed under the MIT License.
@@ -4190,7 +4201,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
4190
4201
  */
4191
4202
  const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
4192
4203
 
4193
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4204
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
4194
4205
  /*
4195
4206
  * Copyright (c) Microsoft Corporation. All rights reserved.
4196
4207
  * Licensed under the MIT License.
@@ -4283,7 +4294,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
4283
4294
  };
4284
4295
  };
4285
4296
 
4286
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4297
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
4287
4298
 
4288
4299
  /*
4289
4300
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4363,7 +4374,7 @@ class PopTokenGenerator {
4363
4374
  }
4364
4375
  }
4365
4376
 
4366
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4377
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
4367
4378
  /*
4368
4379
  * Copyright (c) Microsoft Corporation. All rights reserved.
4369
4380
  * Licensed under the MIT License.
@@ -4427,7 +4438,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
4427
4438
  uxNotAllowed: uxNotAllowed
4428
4439
  });
4429
4440
 
4430
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4441
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
4431
4442
 
4432
4443
  /*
4433
4444
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4495,7 +4506,7 @@ function createInteractionRequiredAuthError(errorCode, errorMessage) {
4495
4506
  return new InteractionRequiredAuthError(errorCode, errorMessage);
4496
4507
  }
4497
4508
 
4498
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4509
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
4499
4510
 
4500
4511
  /*
4501
4512
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4514,7 +4525,7 @@ class ServerError extends AuthError {
4514
4525
  }
4515
4526
  }
4516
4527
 
4517
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4528
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
4518
4529
  /**
4519
4530
  * Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.
4520
4531
  * @param base64Decode
@@ -4546,7 +4557,7 @@ function parseRequestState(base64Decode, state) {
4546
4557
  }
4547
4558
  }
4548
4559
 
4549
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4560
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
4550
4561
 
4551
4562
  /*
4552
4563
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4894,7 +4905,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
4894
4905
  return baseAccount;
4895
4906
  }
4896
4907
 
4897
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4908
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
4898
4909
  /*
4899
4910
  * Copyright (c) Microsoft Corporation. All rights reserved.
4900
4911
  * Licensed under the MIT License.
@@ -4904,7 +4915,7 @@ const CcsCredentialType = {
4904
4915
  UPN: "UPN",
4905
4916
  };
4906
4917
 
4907
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4918
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
4908
4919
  /*
4909
4920
  * Copyright (c) Microsoft Corporation. All rights reserved.
4910
4921
  * Licensed under the MIT License.
@@ -4922,7 +4933,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {
4922
4933
  }
4923
4934
  }
4924
4935
 
4925
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4936
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
4926
4937
  /*
4927
4938
  * Copyright (c) Microsoft Corporation. All rights reserved.
4928
4939
  * Licensed under the MIT License.
@@ -4943,7 +4954,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
4943
4954
  };
4944
4955
  }
4945
4956
 
4946
- /*! @azure/msal-common v16.6.0 2026-05-07 */
4957
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
4947
4958
 
4948
4959
  /*
4949
4960
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5029,7 +5040,7 @@ class ThrottlingUtils {
5029
5040
  }
5030
5041
  }
5031
5042
 
5032
- /*! @azure/msal-common v16.6.0 2026-05-07 */
5043
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
5033
5044
 
5034
5045
  /*
5035
5046
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5060,7 +5071,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
5060
5071
  return new NetworkError(error, httpStatus, responseHeaders);
5061
5072
  }
5062
5073
 
5063
- /*! @azure/msal-common v16.6.0 2026-05-07 */
5074
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
5064
5075
 
5065
5076
  /*
5066
5077
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5174,7 +5185,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
5174
5185
  return response;
5175
5186
  }
5176
5187
 
5177
- /*! @azure/msal-common v16.6.0 2026-05-07 */
5188
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
5178
5189
  /*
5179
5190
  * Copyright (c) Microsoft Corporation. All rights reserved.
5180
5191
  * Licensed under the MIT License.
@@ -5186,7 +5197,7 @@ function isOpenIdConfigResponse(response) {
5186
5197
  response.hasOwnProperty("jwks_uri"));
5187
5198
  }
5188
5199
 
5189
- /*! @azure/msal-common v16.6.0 2026-05-07 */
5200
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
5190
5201
  /*
5191
5202
  * Copyright (c) Microsoft Corporation. All rights reserved.
5192
5203
  * Licensed under the MIT License.
@@ -5196,7 +5207,7 @@ function isCloudInstanceDiscoveryResponse(response) {
5196
5207
  response.hasOwnProperty("metadata"));
5197
5208
  }
5198
5209
 
5199
- /*! @azure/msal-common v16.6.0 2026-05-07 */
5210
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
5200
5211
  /*
5201
5212
  * Copyright (c) Microsoft Corporation. All rights reserved.
5202
5213
  * Licensed under the MIT License.
@@ -5206,7 +5217,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
5206
5217
  response.hasOwnProperty("error_description"));
5207
5218
  }
5208
5219
 
5209
- /*! @azure/msal-common v16.6.0 2026-05-07 */
5220
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
5210
5221
 
5211
5222
  /*
5212
5223
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5311,7 +5322,7 @@ RegionDiscovery.IMDS_OPTIONS = {
5311
5322
  },
5312
5323
  };
5313
5324
 
5314
- /*! @azure/msal-common v16.6.0 2026-05-07 */
5325
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
5315
5326
 
5316
5327
  /*
5317
5328
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5566,7 +5577,7 @@ class Authority {
5566
5577
  }, this.correlationId);
5567
5578
  }
5568
5579
  /**
5569
- * Returns metadata entity from cache if it exists, otherwiser returns a new metadata entity built
5580
+ * Returns metadata entity from cache if it exists, otherwise returns a new metadata entity built
5570
5581
  * from the configured canonical authority
5571
5582
  * @returns
5572
5583
  */
@@ -5635,6 +5646,8 @@ class Authority {
5635
5646
  // Get metadata from network if local sources aren't available
5636
5647
  let metadata = await invokeAsync(this.getEndpointMetadataFromNetwork.bind(this), AuthorityGetEndpointMetadataFromNetwork, this.logger, this.performanceClient, this.correlationId)();
5637
5648
  if (metadata) {
5649
+ // Validate the issuer returned by the OIDC discovery document.
5650
+ this.validateIssuer(metadata.issuer);
5638
5651
  // If the user prefers to use an azure region replace the global endpoints with regional information.
5639
5652
  if (this.authorityOptions.azureRegionConfiguration?.azureRegion) {
5640
5653
  metadata = await invokeAsync(this.updateMetadataWithRegionalInformation.bind(this), AuthorityUpdateMetadataWithRegionalInformation, this.logger, this.performanceClient, this.correlationId)(metadata);
@@ -5803,7 +5816,7 @@ class Authority {
5803
5816
  throw createClientConfigurationError(untrustedAuthority);
5804
5817
  }
5805
5818
  updateCloudDiscoveryMetadataFromLocalSources(metadataEntity) {
5806
- this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration", this.correlationId);
5819
+ this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration", this.correlationId);
5807
5820
  this.logger.verbosePii(`Known Authorities: '${this.authorityOptions.knownAuthorities ||
5808
5821
  NOT_APPLICABLE}'`, this.correlationId);
5809
5822
  this.logger.verbosePii(`Authority Metadata: '${this.authorityOptions.authorityMetadata ||
@@ -6003,6 +6016,139 @@ class Authority {
6003
6016
  isAliasOfKnownMicrosoftAuthority(host) {
6004
6017
  return InstanceDiscoveryMetadataAliases.has(host);
6005
6018
  }
6019
+ /**
6020
+ * Validates the `issuer` returned by an OIDC discovery document against
6021
+ * this authority, per
6022
+ * https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationValidation
6023
+ *
6024
+ * The issuer is accepted when ANY of the following holds:
6025
+ * 1. The issuer scheme + host + port match the authority's (path may
6026
+ * differ). Applies to all authorities.
6027
+ * 2. The authority is a Microsoft cloud authority (public, sovereign,
6028
+ * or CIAM), the issuer is HTTPS, and the issuer host is in the known
6029
+ * Microsoft authority host set.
6030
+ * 3. Same as (2), but the issuer host is a single-label regional variant
6031
+ * of a known Microsoft host (e.g. `westus.login.microsoftonline.com`).
6032
+ * 4. Same as (2), but the issuer host matches the CIAM tenant pattern
6033
+ * `{tenant}.ciamlogin.com` with an optional `/{tenant}[.onmicrosoft.com][/v2.0]`
6034
+ * path.
6035
+ *
6036
+ * @param issuer The `issuer` value returned in the OIDC discovery document.
6037
+ * @throws ClientConfigurationError("issuer_validation_failed") on failure.
6038
+ */
6039
+ validateIssuer(issuer) {
6040
+ if (!issuer) {
6041
+ throw createClientConfigurationError(issuerValidationFailed);
6042
+ }
6043
+ // Parse with the WHATWG URL API. URL normalizes scheme + host to lowercase per RFC 3986.
6044
+ let issuerUrl;
6045
+ try {
6046
+ issuerUrl = new URL(issuer);
6047
+ }
6048
+ catch {
6049
+ throw createClientConfigurationError(issuerValidationFailed);
6050
+ }
6051
+ const issuerScheme = issuerUrl.protocol;
6052
+ const issuerHost = issuerUrl.host;
6053
+ const authorityScheme = (this.canonicalAuthorityUrlComponents.Protocol || "").toLowerCase();
6054
+ const authorityHost = (this.canonicalAuthorityUrlComponents.HostNameAndPort || "").toLowerCase();
6055
+ // Rule 1: Same scheme and host
6056
+ const matchesAuthorityOrigin = this.matchesAuthorityOrigin(issuerScheme, issuerHost, authorityScheme, authorityHost);
6057
+ // Rule 2: The issuer host is a well-known Microsoft authority host (HTTPS only)
6058
+ const matchesKnownMicrosoftHost = issuerScheme === "https:" &&
6059
+ this.isAliasOfKnownMicrosoftAuthority(issuerHost);
6060
+ /*
6061
+ * Rule 3: The issuer host is a regional variant ({region}.{host}) of a well-known host
6062
+ * (HTTPS only). E.g. westus2.login.microsoft.com
6063
+ */
6064
+ const matchesRegionalMicrosoftHost = issuerScheme === "https:" &&
6065
+ this.matchesRegionalMicrosoftHost(issuerHost);
6066
+ /*
6067
+ * Rule 4: CIAM-specific validation. In a CIAM scenario the issuer is expected to
6068
+ * have "{tenant}.ciamlogin.com" as the host, even when using a custom domain.
6069
+ */
6070
+ const matchesCiamTenantPattern = this.matchesCiamTenantPattern(issuerUrl, authorityHost, this.canonicalAuthorityUrlComponents.PathSegments);
6071
+ // Each rule is an independent boolean; the issuer is valid if ANY rule matches.
6072
+ if (matchesAuthorityOrigin ||
6073
+ matchesKnownMicrosoftHost ||
6074
+ matchesRegionalMicrosoftHost ||
6075
+ matchesCiamTenantPattern) {
6076
+ return;
6077
+ }
6078
+ // issuer validation fails if none of the above rules are satisfied
6079
+ throw createClientConfigurationError(issuerValidationFailed);
6080
+ }
6081
+ /**
6082
+ * Rule 1: The issuer scheme + host (and port) match the authority's. Path
6083
+ * may differ. Applies to all authorities.
6084
+ */
6085
+ matchesAuthorityOrigin(issuerScheme, issuerHost, authorityScheme, authorityHost) {
6086
+ return issuerScheme === authorityScheme && issuerHost === authorityHost;
6087
+ }
6088
+ /**
6089
+ * Rule 3: The issuer host is a regional variant
6090
+ * (`{region}.{host}`) of a known Microsoft authority host.
6091
+ * E.g. `westus2.login.microsoft.com`.
6092
+ */
6093
+ matchesRegionalMicrosoftHost(issuerHost) {
6094
+ const firstDot = issuerHost.indexOf(".");
6095
+ if (firstDot > 0 && firstDot < issuerHost.length - 1) {
6096
+ const hostWithoutRegion = issuerHost.substring(firstDot + 1);
6097
+ return this.isAliasOfKnownMicrosoftAuthority(hostWithoutRegion);
6098
+ }
6099
+ return false;
6100
+ }
6101
+ /**
6102
+ * Rule 4: The issuer matches one of the well-known CIAM tenant patterns
6103
+ * (`https://{tenant}.ciamlogin.com[/{tenant}[.onmicrosoft.com][/v2.0]]`).
6104
+ *
6105
+ * The bare tenant name is extracted from the authority's first path segment
6106
+ * when available (stripping the `.onmicrosoft.com` suffix that
6107
+ * `transformCIAMAuthority` adds), or otherwise from the leftmost label of
6108
+ * the authority host (to support CIAM custom domain scenarios).
6109
+ *
6110
+ * Both `/{tenant}` and `/{tenant}.onmicrosoft.com` path forms are accepted
6111
+ * because the OIDC issuer may use either form depending on the authority URL
6112
+ * that was used to trigger discovery.
6113
+ */
6114
+ matchesCiamTenantPattern(issuerUrl, authorityHost, authorityPathSegments) {
6115
+ /*
6116
+ * authorityPathSegments[0] is the first path segment of the *authority
6117
+ * URL* after transformCIAMAuthority runs (e.g. "contoso.onmicrosoft.com").
6118
+ * Additional CIAM issuer path segments such as "/v2.0" are part of the
6119
+ * issuer string, not the authority URL's PathSegments.
6120
+ */
6121
+ const pathSegment = authorityPathSegments[0];
6122
+ /*
6123
+ * Extract the bare tenant name: strip the .onmicrosoft.com suffix when
6124
+ * present (introduced by transformCIAMAuthority), or fall back to the
6125
+ * first label of the authority hostname for non-transformed/custom-domain
6126
+ * CIAM authorities.
6127
+ */
6128
+ const tenantName = pathSegment
6129
+ ? pathSegment.endsWith(AAD_TENANT_DOMAIN_SUFFIX)
6130
+ ? pathSegment.slice(0, -AAD_TENANT_DOMAIN_SUFFIX.length)
6131
+ : pathSegment
6132
+ : authorityHost.split(".")[0];
6133
+ if (!tenantName) {
6134
+ return false;
6135
+ }
6136
+ const ciamBaseURL = `https://${tenantName}${CIAM_AUTH_URL}`;
6137
+ const validCiamPatterns = [
6138
+ ciamBaseURL,
6139
+ `${ciamBaseURL}/${tenantName}`,
6140
+ `${ciamBaseURL}/${tenantName}/v2.0`,
6141
+ `${ciamBaseURL}/${tenantName}${AAD_TENANT_DOMAIN_SUFFIX}`,
6142
+ `${ciamBaseURL}/${tenantName}${AAD_TENANT_DOMAIN_SUFFIX}/v2.0`, // https://{tenant}.ciamlogin.com/{tenant}.onmicrosoft.com/v2.0
6143
+ ];
6144
+ /*
6145
+ * Compose the canonical issuer string from URL components and strip any
6146
+ * trailing slashes from the path so it can be compared to the pattern set.
6147
+ */
6148
+ const issuerPath = issuerUrl.pathname.replace(/\/+$/, "");
6149
+ const normalizedIssuer = `${issuerUrl.protocol}//${issuerUrl.host}${issuerPath}`;
6150
+ return validCiamPatterns.some((pattern) => pattern === normalizedIssuer);
6151
+ }
6006
6152
  /**
6007
6153
  * Checks whether the provided host is that of a public cloud authority
6008
6154
  *
@@ -6134,7 +6280,7 @@ function buildStaticAuthorityOptions(authOptions) {
6134
6280
  };
6135
6281
  }
6136
6282
 
6137
- /*! @azure/msal-common v16.6.0 2026-05-07 */
6283
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
6138
6284
 
6139
6285
  /*
6140
6286
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6168,7 +6314,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
6168
6314
  }
6169
6315
  }
6170
6316
 
6171
- /*! @azure/msal-common v16.6.0 2026-05-07 */
6317
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
6172
6318
 
6173
6319
  /*
6174
6320
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6425,7 +6571,7 @@ class AuthorizationCodeClient {
6425
6571
  }
6426
6572
  }
6427
6573
 
6428
- /*! @azure/msal-common v16.6.0 2026-05-07 */
6574
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
6429
6575
 
6430
6576
  /*
6431
6577
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6646,7 +6792,7 @@ class RefreshTokenClient {
6646
6792
  }
6647
6793
  }
6648
6794
 
6649
- /*! @azure/msal-common v16.6.0 2026-05-07 */
6795
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
6650
6796
 
6651
6797
  /*
6652
6798
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6762,7 +6908,7 @@ class SilentFlowClient {
6762
6908
  }
6763
6909
  }
6764
6910
 
6765
- /*! @azure/msal-common v16.6.0 2026-05-07 */
6911
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
6766
6912
 
6767
6913
  /*
6768
6914
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6911,7 +7057,7 @@ function extractLoginHint(account) {
6911
7057
  return account.loginHint || account.idTokenClaims?.login_hint || null;
6912
7058
  }
6913
7059
 
6914
- /*! @azure/msal-common v16.6.0 2026-05-07 */
7060
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
6915
7061
 
6916
7062
  /*
6917
7063
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6944,7 +7090,7 @@ function containsResourceParam(params) {
6944
7090
  return Object.prototype.hasOwnProperty.call(params, "resource");
6945
7091
  }
6946
7092
 
6947
- /*! @azure/msal-common v16.6.0 2026-05-07 */
7093
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
6948
7094
  /*
6949
7095
  * Copyright (c) Microsoft Corporation. All rights reserved.
6950
7096
  * Licensed under the MIT License.
@@ -6961,7 +7107,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
6961
7107
  unexpectedError: unexpectedError
6962
7108
  });
6963
7109
 
6964
- /*! @azure/msal-common v16.6.0 2026-05-07 */
7110
+ /*! @azure/msal-common v16.6.1 2026-05-11 */
6965
7111
 
6966
7112
  /*
6967
7113
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9169,7 +9315,7 @@ class ClientAssertion {
9169
9315
 
9170
9316
  /* eslint-disable header/header */
9171
9317
  const name = "@azure/msal-node";
9172
- const version = "5.2.0";
9318
+ const version = "5.2.1";
9173
9319
 
9174
9320
  /*
9175
9321
  * Copyright (c) Microsoft Corporation. All rights reserved.