@azure/msal-node-extensions 5.2.4 → 5.3.0

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 (52) hide show
  1. package/bin/arm64/dpapi.node +0 -0
  2. package/bin/ia32/dpapi.node +0 -0
  3. package/bin/x64/dpapi.node +0 -0
  4. package/dist/Dpapi.mjs +1 -1
  5. package/dist/broker/NativeBrokerPlugin.mjs +23 -23
  6. package/dist/broker/NativeBrokerPlugin.mjs.map +1 -1
  7. package/dist/error/PersistenceError.mjs +1 -1
  8. package/dist/index.mjs +1 -1
  9. package/dist/lib/msal-common/dist/constants/AADServerParamKeys.mjs +2 -2
  10. package/dist/lib/msal-common/dist/constants/AADServerParamKeys.mjs.map +1 -1
  11. package/dist/lib/msal-common/dist/error/AuthError.mjs +4 -6
  12. package/dist/lib/msal-common/dist/error/AuthError.mjs.map +1 -1
  13. package/dist/lib/msal-common/dist/error/ClientAuthError.mjs +6 -6
  14. package/dist/lib/msal-common/dist/error/ClientAuthError.mjs.map +1 -1
  15. package/dist/lib/msal-common/dist/error/ClientAuthErrorCodes.mjs +2 -2
  16. package/dist/lib/msal-common/dist/error/ClientAuthErrorCodes.mjs.map +1 -1
  17. package/dist/lib/msal-common/dist/error/ClientConfigurationError.mjs +6 -6
  18. package/dist/lib/msal-common/dist/error/ClientConfigurationError.mjs.map +1 -1
  19. package/dist/lib/msal-common/dist/error/ClientConfigurationErrorCodes.mjs +2 -2
  20. package/dist/lib/msal-common/dist/error/ClientConfigurationErrorCodes.mjs.map +1 -1
  21. package/dist/lib/msal-common/dist/error/InteractionRequiredAuthError.mjs +4 -5
  22. package/dist/lib/msal-common/dist/error/InteractionRequiredAuthError.mjs.map +1 -1
  23. package/dist/lib/msal-common/dist/error/PlatformBrokerError.mjs +4 -4
  24. package/dist/lib/msal-common/dist/error/PlatformBrokerError.mjs.map +1 -1
  25. package/dist/lib/msal-common/dist/error/ServerError.mjs +4 -4
  26. package/dist/lib/msal-common/dist/error/ServerError.mjs.map +1 -1
  27. package/dist/lib/msal-common/dist/logger/Logger.mjs +26 -12
  28. package/dist/lib/msal-common/dist/logger/Logger.mjs.map +1 -1
  29. package/dist/lib/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs +2 -2
  30. package/dist/lib/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs.map +1 -1
  31. package/dist/lib/msal-common/dist/utils/Constants.mjs +2 -2
  32. package/dist/lib/msal-common/dist/utils/Constants.mjs.map +1 -1
  33. package/dist/lib/msal-common/dist/utils/TimeUtils.mjs +2 -2
  34. package/dist/lib/msal-common/dist/utils/TimeUtils.mjs.map +1 -1
  35. package/dist/lock/CrossPlatformLock.mjs +1 -1
  36. package/dist/packageMetadata.mjs +2 -2
  37. package/dist/persistence/BasePersistence.mjs +1 -1
  38. package/dist/persistence/DataProtectionScope.mjs +1 -1
  39. package/dist/persistence/FilePersistence.mjs +1 -1
  40. package/dist/persistence/FilePersistenceWithDataProtection.mjs +1 -1
  41. package/dist/persistence/KeychainPersistence.mjs +1 -1
  42. package/dist/persistence/LibSecretPersistence.mjs +1 -1
  43. package/dist/persistence/PersistenceCachePlugin.mjs +1 -1
  44. package/dist/persistence/PersistenceCreator.mjs +1 -1
  45. package/dist/utils/Constants.mjs +1 -1
  46. package/dist/utils/Environment.mjs +1 -1
  47. package/dist/utils/TypeGuards.mjs +1 -1
  48. package/lib/msal-node-extensions.cjs +77 -66
  49. package/lib/msal-node-extensions.cjs.map +1 -1
  50. package/package.json +3 -3
  51. package/types/broker/NativeBrokerPlugin.d.ts.map +1 -1
  52. package/types/packageMetadata.d.ts +1 -1
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-node-extensions v5.2.4 2026-06-10 */
1
+ /*! @azure/msal-node-extensions v5.3.0 2026-06-23 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
@@ -343,7 +343,7 @@ class PersistenceCachePlugin {
343
343
  }
344
344
  }
345
345
 
346
- /*! @azure/msal-common v16.8.0 2026-06-10 */
346
+ /*! @azure/msal-common v16.10.0 2026-06-23 */
347
347
  /**
348
348
  * we considered making this "enum" in the request instead of string, however it looks like the allowed list of
349
349
  * prompt values kept changing over past couple of years. There are some undocumented prompt values for some
@@ -380,11 +380,11 @@ const CacheOutcome = {
380
380
  // When a token is found in the cache or the cache is not supposed to be hit when making the request
381
381
  NOT_APPLICABLE: "0"};
382
382
 
383
- /*! @azure/msal-common v16.8.0 2026-06-10 */
383
+ /*! @azure/msal-common v16.10.0 2026-06-23 */
384
384
  const X_CLIENT_EXTRA_SKU = "x-client-xtra-sku";
385
385
  const RESOURCE = "resource";
386
386
 
387
- /*! @azure/msal-common v16.8.0 2026-06-10 */
387
+ /*! @azure/msal-common v16.10.0 2026-06-23 */
388
388
  /*
389
389
  * Copyright (c) Microsoft Corporation. All rights reserved.
390
390
  * Licensed under the MIT License.
@@ -396,7 +396,7 @@ function getDefaultErrorMessage(code) {
396
396
  * General error class thrown by the MSAL.js library.
397
397
  */
398
398
  class AuthError extends Error {
399
- constructor(errorCode, errorMessage, suberror) {
399
+ constructor(errorCode, correlationId, errorMessage, suberror) {
400
400
  const message = errorMessage ||
401
401
  (errorCode ? getDefaultErrorMessage(errorCode) : "");
402
402
  const errorString = message ? `${errorCode}: ${message}` : errorCode;
@@ -405,14 +405,12 @@ class AuthError extends Error {
405
405
  this.errorCode = errorCode || "";
406
406
  this.errorMessage = message || "";
407
407
  this.subError = suberror || "";
408
- this.name = "AuthError";
409
- }
410
- setCorrelationId(correlationId) {
411
408
  this.correlationId = correlationId;
409
+ this.name = "AuthError";
412
410
  }
413
411
  }
414
412
 
415
- /*! @azure/msal-common v16.8.0 2026-06-10 */
413
+ /*! @azure/msal-common v16.10.0 2026-06-23 */
416
414
 
417
415
  /*
418
416
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -422,17 +420,17 @@ class AuthError extends Error {
422
420
  * Error thrown when there is an error in configuration of the MSAL.js library.
423
421
  */
424
422
  class ClientConfigurationError extends AuthError {
425
- constructor(errorCode) {
426
- super(errorCode);
423
+ constructor(errorCode, correlationId) {
424
+ super(errorCode, correlationId);
427
425
  this.name = "ClientConfigurationError";
428
426
  Object.setPrototypeOf(this, ClientConfigurationError.prototype);
429
427
  }
430
428
  }
431
- function createClientConfigurationError(errorCode) {
432
- return new ClientConfigurationError(errorCode);
429
+ function createClientConfigurationError(errorCode, correlationId) {
430
+ return new ClientConfigurationError(errorCode, correlationId);
433
431
  }
434
432
 
435
- /*! @azure/msal-common v16.8.0 2026-06-10 */
433
+ /*! @azure/msal-common v16.10.0 2026-06-23 */
436
434
 
437
435
  /*
438
436
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -445,26 +443,26 @@ function createClientConfigurationError(errorCode) {
445
443
  * Error thrown when there is an error in the client code running on the browser.
446
444
  */
447
445
  class ClientAuthError extends AuthError {
448
- constructor(errorCode, additionalMessage) {
449
- super(errorCode, additionalMessage);
446
+ constructor(errorCode, correlationId, additionalMessage) {
447
+ super(errorCode, correlationId, additionalMessage);
450
448
  this.name = "ClientAuthError";
451
449
  Object.setPrototypeOf(this, ClientAuthError.prototype);
452
450
  }
453
451
  }
454
- function createClientAuthError(errorCode, additionalMessage) {
455
- return new ClientAuthError(errorCode, additionalMessage);
452
+ function createClientAuthError(errorCode, correlationId, additionalMessage) {
453
+ return new ClientAuthError(errorCode, correlationId, additionalMessage);
456
454
  }
457
455
 
458
- /*! @azure/msal-common v16.8.0 2026-06-10 */
456
+ /*! @azure/msal-common v16.10.0 2026-06-23 */
459
457
  const untrustedAuthority = "untrusted_authority";
460
458
 
461
- /*! @azure/msal-common v16.8.0 2026-06-10 */
459
+ /*! @azure/msal-common v16.10.0 2026-06-23 */
462
460
  const noAccountFound = "no_account_found";
463
461
  const noNetworkConnectivity = "no_network_connectivity";
464
462
  const userCanceled = "user_canceled";
465
463
  const platformBrokerError = "platform_broker_error";
466
464
 
467
- /*! @azure/msal-common v16.8.0 2026-06-10 */
465
+ /*! @azure/msal-common v16.10.0 2026-06-23 */
468
466
  /*
469
467
  * Copyright (c) Microsoft Corporation. All rights reserved.
470
468
  * Licensed under the MIT License.
@@ -527,22 +525,36 @@ function addLogToCache(correlationId, loggedMessage) {
527
525
  }
528
526
  }
529
527
  /**
530
- * Checks if a string is already a hashed logging string (6 alphanumeric characters)
528
+ * Extracts the leading minification hash from a log message, if present.
529
+ *
530
+ * Minified messages are produced by the logger-minify rollup plugin and are
531
+ * either a bare 6-character alphanumeric hash, or that hash followed by a space
532
+ * and runtime variables appended for local (console) logging, e.g.
533
+ * "abc123 user-1 popup". Only the leading hash is returned so that telemetry
534
+ * never captures the appended variables. Returns null when the message is not
535
+ * a minified message.
531
536
  */
532
- function isHashedString(str) {
533
- if (str.length !== 6) {
534
- return false;
537
+ function getMessageHash(str) {
538
+ if (str.length < 6) {
539
+ return null;
535
540
  }
536
- for (let i = 0; i < str.length; i++) {
541
+ /*
542
+ * If the message is longer than the hash, the hash must be delimited by a
543
+ * space (the separator the plugin inserts before appended variables).
544
+ */
545
+ if (str.length > 6 && str[6] !== " ") {
546
+ return null;
547
+ }
548
+ for (let i = 0; i < 6; i++) {
537
549
  const char = str[i];
538
550
  const isAlphaNumeric = (char >= "a" && char <= "z") ||
539
551
  (char >= "A" && char <= "Z") ||
540
552
  (char >= "0" && char <= "9");
541
553
  if (!isAlphaNumeric) {
542
- return false;
554
+ return null;
543
555
  }
544
556
  }
545
- return true;
557
+ return str.substring(0, 6);
546
558
  }
547
559
  /**
548
560
  * Class which facilitates logging of messages to a specific place.
@@ -589,10 +601,10 @@ class Logger {
589
601
  */
590
602
  logMessage(logMessage, options) {
591
603
  const correlationId = options.correlationId;
592
- const isHashedInput = isHashedString(logMessage);
593
- if (isHashedInput) {
604
+ const messageHash = getMessageHash(logMessage);
605
+ if (messageHash) {
594
606
  const loggedMessage = {
595
- hash: logMessage,
607
+ hash: messageHash,
596
608
  level: options.logLevel,
597
609
  containsPii: options.containsPii || false,
598
610
  milliseconds: 0, // Will be calculated in addLogToCache
@@ -725,7 +737,7 @@ class Logger {
725
737
  }
726
738
  }
727
739
 
728
- /*! @azure/msal-common v16.8.0 2026-06-10 */
740
+ /*! @azure/msal-common v16.10.0 2026-06-23 */
729
741
  /**
730
742
  * Convert seconds to JS Date object. Seconds can be in a number or string format or undefined (will still return a date).
731
743
  * @param seconds
@@ -737,24 +749,23 @@ function toDateFromSeconds(seconds) {
737
749
  return new Date();
738
750
  }
739
751
 
740
- /*! @azure/msal-common v16.8.0 2026-06-10 */
752
+ /*! @azure/msal-common v16.10.0 2026-06-23 */
741
753
  /**
742
754
  * Error thrown when user interaction is required.
743
755
  */
744
756
  class InteractionRequiredAuthError extends AuthError {
745
- constructor(errorCode, errorMessage, subError, timestamp, traceId, correlationId, claims, errorNo) {
746
- super(errorCode, errorMessage, subError);
757
+ constructor(errorCode, correlationId, errorMessage, subError, timestamp, traceId, claims, errorNo) {
758
+ super(errorCode, correlationId, errorMessage, subError);
747
759
  Object.setPrototypeOf(this, InteractionRequiredAuthError.prototype);
748
760
  this.timestamp = timestamp || "";
749
761
  this.traceId = traceId || "";
750
- this.correlationId = correlationId || "";
751
762
  this.claims = claims || "";
752
763
  this.name = "InteractionRequiredAuthError";
753
764
  this.errorNo = errorNo;
754
765
  }
755
766
  }
756
767
 
757
- /*! @azure/msal-common v16.8.0 2026-06-10 */
768
+ /*! @azure/msal-common v16.10.0 2026-06-23 */
758
769
 
759
770
  /*
760
771
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -764,8 +775,8 @@ class InteractionRequiredAuthError extends AuthError {
764
775
  * Error thrown when there is an error with the server code, for example, unavailability.
765
776
  */
766
777
  class ServerError extends AuthError {
767
- constructor(errorCode, errorMessage, subError, errorNo, status) {
768
- super(errorCode, errorMessage, subError);
778
+ constructor(errorCode, correlationId, errorMessage, subError, errorNo, status) {
779
+ super(errorCode, correlationId, errorMessage, subError);
769
780
  this.name = "ServerError";
770
781
  this.errorNo = errorNo;
771
782
  this.status = status;
@@ -773,7 +784,7 @@ class ServerError extends AuthError {
773
784
  }
774
785
  }
775
786
 
776
- /*! @azure/msal-common v16.8.0 2026-06-10 */
787
+ /*! @azure/msal-common v16.10.0 2026-06-23 */
777
788
 
778
789
  /*
779
790
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -805,12 +816,12 @@ function tagToString(tag) {
805
816
  * Error class for MSAL Runtime errors that preserves detailed broker information
806
817
  */
807
818
  class PlatformBrokerError extends AuthError {
808
- constructor(errorStatus, errorContext, errorCode, errorTag) {
819
+ constructor(errorStatus, correlationId, errorContext, errorCode, errorTag) {
809
820
  const tagString = tagToString(errorTag);
810
821
  const enhancedErrorContext = errorContext
811
822
  ? `${errorContext} (Error Code: ${errorCode}, Tag: ${tagString})`
812
823
  : `(Error Code: ${errorCode}, Tag: ${tagString})`;
813
- super(errorStatus, enhancedErrorContext);
824
+ super(errorStatus, correlationId, enhancedErrorContext);
814
825
  this.name = "PlatformBrokerError";
815
826
  this.statusCode = errorCode;
816
827
  this.tag = tagString;
@@ -818,7 +829,7 @@ class PlatformBrokerError extends AuthError {
818
829
  }
819
830
  }
820
831
 
821
- /*! @azure/msal-common v16.8.0 2026-06-10 */
832
+ /*! @azure/msal-common v16.10.0 2026-06-23 */
822
833
 
823
834
  /*
824
835
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1734,7 +1745,7 @@ class PersistenceCreator {
1734
1745
 
1735
1746
  /* eslint-disable header/header */
1736
1747
  const name = "@azure/msal-node-extensions";
1737
- const version = "5.2.4";
1748
+ const version = "5.3.0";
1738
1749
 
1739
1750
  /*
1740
1751
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1817,7 +1828,7 @@ class NativeBrokerPlugin {
1817
1828
  msalNodeRuntime.msalNodeRuntime.RegisterLogger(logCallback, loggerOptions.piiLoggingEnabled || false);
1818
1829
  }
1819
1830
  catch (e) {
1820
- const wrappedError = this.wrapError(e);
1831
+ const wrappedError = this.wrapError(e, "");
1821
1832
  if (wrappedError) {
1822
1833
  throw wrappedError;
1823
1834
  }
@@ -1836,7 +1847,7 @@ class NativeBrokerPlugin {
1836
1847
  result.CheckError();
1837
1848
  }
1838
1849
  catch (e) {
1839
- const wrappedError = this.wrapError(e);
1850
+ const wrappedError = this.wrapError(e, correlationId);
1840
1851
  if (wrappedError) {
1841
1852
  reject(wrappedError);
1842
1853
  return;
@@ -1852,7 +1863,7 @@ class NativeBrokerPlugin {
1852
1863
  msalNodeRuntime.msalNodeRuntime.DiscoverAccountsAsync(clientId, correlationId, resultCallback);
1853
1864
  }
1854
1865
  catch (e) {
1855
- const wrappedError = this.wrapError(e);
1866
+ const wrappedError = this.wrapError(e, correlationId);
1856
1867
  if (wrappedError) {
1857
1868
  reject(wrappedError);
1858
1869
  }
@@ -1875,7 +1886,7 @@ class NativeBrokerPlugin {
1875
1886
  result.CheckError();
1876
1887
  }
1877
1888
  catch (e) {
1878
- const wrappedError = this.wrapError(e);
1889
+ const wrappedError = this.wrapError(e, request.correlationId);
1879
1890
  if (wrappedError) {
1880
1891
  reject(wrappedError);
1881
1892
  return;
@@ -1893,7 +1904,7 @@ class NativeBrokerPlugin {
1893
1904
  }
1894
1905
  }
1895
1906
  catch (e) {
1896
- const wrappedError = this.wrapError(e);
1907
+ const wrappedError = this.wrapError(e, request.correlationId);
1897
1908
  if (wrappedError) {
1898
1909
  reject(wrappedError);
1899
1910
  }
@@ -1917,7 +1928,7 @@ class NativeBrokerPlugin {
1917
1928
  result.CheckError();
1918
1929
  }
1919
1930
  catch (e) {
1920
- const wrappedError = this.wrapError(e);
1931
+ const wrappedError = this.wrapError(e, request.correlationId);
1921
1932
  if (wrappedError) {
1922
1933
  reject(wrappedError);
1923
1934
  return;
@@ -1959,7 +1970,7 @@ class NativeBrokerPlugin {
1959
1970
  }
1960
1971
  }
1961
1972
  catch (e) {
1962
- const wrappedError = this.wrapError(e);
1973
+ const wrappedError = this.wrapError(e, request.correlationId);
1963
1974
  if (wrappedError) {
1964
1975
  reject(wrappedError);
1965
1976
  }
@@ -1970,7 +1981,7 @@ class NativeBrokerPlugin {
1970
1981
  this.logger.trace("NativeBrokerPlugin - signOut called", request.correlationId);
1971
1982
  const account = await this.getAccount(request);
1972
1983
  if (!account) {
1973
- throw createClientAuthError(noAccountFound);
1984
+ throw createClientAuthError(noAccountFound, request.correlationId);
1974
1985
  }
1975
1986
  return new Promise((resolve, reject) => {
1976
1987
  const resultCallback = (result) => {
@@ -1978,7 +1989,7 @@ class NativeBrokerPlugin {
1978
1989
  result.CheckError();
1979
1990
  }
1980
1991
  catch (e) {
1981
- const wrappedError = this.wrapError(e);
1992
+ const wrappedError = this.wrapError(e, request.correlationId);
1982
1993
  if (wrappedError) {
1983
1994
  reject(wrappedError);
1984
1995
  return;
@@ -1990,7 +2001,7 @@ class NativeBrokerPlugin {
1990
2001
  msalNodeRuntime.msalNodeRuntime.SignOutSilentlyAsync(request.clientId, request.correlationId, account, resultCallback);
1991
2002
  }
1992
2003
  catch (e) {
1993
- const wrappedError = this.wrapError(e);
2004
+ const wrappedError = this.wrapError(e, request.correlationId);
1994
2005
  if (wrappedError) {
1995
2006
  reject(wrappedError);
1996
2007
  }
@@ -2012,7 +2023,7 @@ class NativeBrokerPlugin {
2012
2023
  result.CheckError();
2013
2024
  }
2014
2025
  catch (e) {
2015
- const wrappedError = this.wrapError(e);
2026
+ const wrappedError = this.wrapError(e, correlationId);
2016
2027
  if (wrappedError) {
2017
2028
  reject(wrappedError);
2018
2029
  return;
@@ -2024,7 +2035,7 @@ class NativeBrokerPlugin {
2024
2035
  msalNodeRuntime.msalNodeRuntime.ReadAccountByIdAsync(accountId, correlationId, resultCallback);
2025
2036
  }
2026
2037
  catch (e) {
2027
- const wrappedError = this.wrapError(e);
2038
+ const wrappedError = this.wrapError(e, correlationId);
2028
2039
  if (wrappedError) {
2029
2040
  reject(wrappedError);
2030
2041
  }
@@ -2070,7 +2081,7 @@ class NativeBrokerPlugin {
2070
2081
  }));
2071
2082
  }
2072
2083
  catch (e) {
2073
- const wrappedError = this.wrapError(e);
2084
+ const wrappedError = this.wrapError(e, request.correlationId);
2074
2085
  if (wrappedError) {
2075
2086
  throw wrappedError;
2076
2087
  }
@@ -2161,39 +2172,39 @@ class NativeBrokerPlugin {
2161
2172
  result.hasOwnProperty("errorContext") ||
2162
2173
  result.hasOwnProperty("errorTag"));
2163
2174
  }
2164
- wrapError(error) {
2175
+ wrapError(error, correlationId) {
2165
2176
  if (error &&
2166
2177
  typeof error === "object" &&
2167
2178
  this.isMsalRuntimeError(error)) {
2168
2179
  const { errorCode, errorStatus, errorContext, errorTag } = error;
2169
- const msalNodeRuntimeError = new PlatformBrokerError(msalNodeRuntime.ErrorStatus[errorStatus], errorContext, errorCode, errorTag);
2180
+ const msalNodeRuntimeError = new PlatformBrokerError(msalNodeRuntime.ErrorStatus[errorStatus], correlationId, errorContext, errorCode, errorTag);
2170
2181
  let wrappedError;
2171
2182
  switch (errorStatus) {
2172
2183
  case msalNodeRuntime.ErrorStatus.InteractionRequired:
2173
2184
  case msalNodeRuntime.ErrorStatus.AccountUnusable:
2174
- wrappedError = new InteractionRequiredAuthError(ErrorCodes.INTERATION_REQUIRED_ERROR_CODE, msalNodeRuntimeError.message);
2185
+ wrappedError = new InteractionRequiredAuthError(ErrorCodes.INTERATION_REQUIRED_ERROR_CODE, correlationId, msalNodeRuntimeError.message);
2175
2186
  break;
2176
2187
  case msalNodeRuntime.ErrorStatus.NoNetwork:
2177
2188
  case msalNodeRuntime.ErrorStatus.NetworkTemporarilyUnavailable:
2178
- wrappedError = createClientAuthError(noNetworkConnectivity);
2189
+ wrappedError = createClientAuthError(noNetworkConnectivity, correlationId);
2179
2190
  break;
2180
2191
  case msalNodeRuntime.ErrorStatus.ServerTemporarilyUnavailable:
2181
- wrappedError = new ServerError(ErrorCodes.SERVER_UNAVAILABLE, msalNodeRuntimeError.message);
2192
+ wrappedError = new ServerError(ErrorCodes.SERVER_UNAVAILABLE, correlationId, msalNodeRuntimeError.message);
2182
2193
  break;
2183
2194
  case msalNodeRuntime.ErrorStatus.UserCanceled:
2184
- wrappedError = createClientAuthError(userCanceled);
2195
+ wrappedError = createClientAuthError(userCanceled, correlationId);
2185
2196
  break;
2186
2197
  case msalNodeRuntime.ErrorStatus.AuthorityUntrusted:
2187
- wrappedError = createClientConfigurationError(untrustedAuthority);
2198
+ wrappedError = createClientConfigurationError(untrustedAuthority, correlationId);
2188
2199
  break;
2189
2200
  case msalNodeRuntime.ErrorStatus.UserSwitched:
2190
2201
  // Not an error case, if there's customer demand we can surface this as a response property
2191
2202
  return null;
2192
2203
  case msalNodeRuntime.ErrorStatus.AccountNotFound:
2193
- wrappedError = createClientAuthError(noAccountFound);
2204
+ wrappedError = createClientAuthError(noAccountFound, correlationId);
2194
2205
  break;
2195
2206
  default:
2196
- wrappedError = createClientAuthError(platformBrokerError);
2207
+ wrappedError = createClientAuthError(platformBrokerError, correlationId);
2197
2208
  }
2198
2209
  wrappedError.platformBrokerError = msalNodeRuntimeError;
2199
2210
  return wrappedError;