@azure/msal-browser 3.19.0 → 3.20.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 (80) hide show
  1. package/dist/app/IPublicClientApplication.mjs +1 -1
  2. package/dist/app/PublicClientApplication.mjs +1 -1
  3. package/dist/app/PublicClientNext.mjs +1 -1
  4. package/dist/broker/nativeBroker/NativeMessageHandler.mjs +1 -1
  5. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  6. package/dist/cache/AccountManager.mjs +1 -1
  7. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  8. package/dist/cache/BrowserCacheManager.mjs +1 -1
  9. package/dist/cache/BrowserStorage.mjs +1 -1
  10. package/dist/cache/DatabaseStorage.mjs +1 -1
  11. package/dist/cache/MemoryStorage.mjs +1 -1
  12. package/dist/cache/TokenCache.mjs +1 -1
  13. package/dist/config/Configuration.mjs +1 -1
  14. package/dist/controllers/ControllerFactory.mjs +1 -1
  15. package/dist/controllers/NestedAppAuthController.mjs +1 -1
  16. package/dist/controllers/StandardController.mjs +1 -1
  17. package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
  18. package/dist/crypto/BrowserCrypto.mjs +1 -1
  19. package/dist/crypto/CryptoOps.mjs +1 -1
  20. package/dist/crypto/PkceGenerator.mjs +1 -1
  21. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  22. package/dist/encode/Base64Decode.mjs +1 -1
  23. package/dist/encode/Base64Encode.mjs +1 -1
  24. package/dist/error/BrowserAuthError.mjs +1 -1
  25. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  26. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  27. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  28. package/dist/error/NativeAuthError.mjs +1 -1
  29. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  30. package/dist/error/NestedAppAuthError.mjs +1 -1
  31. package/dist/event/EventHandler.mjs +1 -1
  32. package/dist/event/EventMessage.mjs +1 -1
  33. package/dist/event/EventType.mjs +1 -1
  34. package/dist/index.mjs +1 -1
  35. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  36. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  37. package/dist/interaction_client/NativeInteractionClient.d.ts +9 -1
  38. package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
  39. package/dist/interaction_client/NativeInteractionClient.mjs +83 -43
  40. package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
  41. package/dist/interaction_client/PopupClient.mjs +1 -1
  42. package/dist/interaction_client/RedirectClient.mjs +1 -1
  43. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  44. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  45. package/dist/interaction_client/SilentIframeClient.mjs +1 -1
  46. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  47. package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
  48. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  49. package/dist/interaction_handler/RedirectHandler.mjs +1 -1
  50. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  51. package/dist/naa/BridgeError.mjs +1 -1
  52. package/dist/naa/BridgeProxy.mjs +1 -1
  53. package/dist/naa/BridgeStatusCode.mjs +1 -1
  54. package/dist/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -1
  55. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +3 -3
  56. package/dist/naa/mapping/NestedAppAuthAdapter.mjs.map +1 -1
  57. package/dist/navigation/NavigationClient.mjs +1 -1
  58. package/dist/network/FetchClient.mjs +1 -1
  59. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  60. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  61. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  62. package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
  63. package/dist/packageMetadata.d.ts +1 -1
  64. package/dist/packageMetadata.mjs +2 -2
  65. package/dist/request/RequestHelpers.mjs +1 -1
  66. package/dist/response/ResponseHandler.mjs +1 -1
  67. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  68. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  69. package/dist/utils/BrowserConstants.mjs +1 -1
  70. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  71. package/dist/utils/BrowserUtils.mjs +1 -1
  72. package/lib/msal-browser.cjs +247 -138
  73. package/lib/msal-browser.cjs.map +1 -1
  74. package/lib/msal-browser.js +247 -138
  75. package/lib/msal-browser.js.map +1 -1
  76. package/lib/msal-browser.min.js +64 -64
  77. package/package.json +2 -2
  78. package/src/interaction_client/NativeInteractionClient.ts +105 -54
  79. package/src/naa/mapping/NestedAppAuthAdapter.ts +4 -2
  80. package/src/packageMetadata.ts +1 -1
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v3.19.0 2024-07-12 */
1
+ /*! @azure/msal-browser v3.20.0 2024-07-23 */
2
2
  'use strict';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -6,7 +6,7 @@
6
6
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.msal = {}));
7
7
  })(this, (function (exports) { 'use strict';
8
8
 
9
- /*! @azure/msal-common v14.13.0 2024-07-12 */
9
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
10
10
  /*
11
11
  * Copyright (c) Microsoft Corporation. All rights reserved.
12
12
  * Licensed under the MIT License.
@@ -315,7 +315,7 @@
315
315
  // Token renewal offset default in seconds
316
316
  const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
317
317
 
318
- /*! @azure/msal-common v14.13.0 2024-07-12 */
318
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
319
319
  /*
320
320
  * Copyright (c) Microsoft Corporation. All rights reserved.
321
321
  * Licensed under the MIT License.
@@ -332,7 +332,7 @@
332
332
  unexpectedError: unexpectedError
333
333
  });
334
334
 
335
- /*! @azure/msal-common v14.13.0 2024-07-12 */
335
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
336
336
 
337
337
  /*
338
338
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -381,7 +381,7 @@
381
381
  : AuthErrorMessages[code]);
382
382
  }
383
383
 
384
- /*! @azure/msal-common v14.13.0 2024-07-12 */
384
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
385
385
  /*
386
386
  * Copyright (c) Microsoft Corporation. All rights reserved.
387
387
  * Licensed under the MIT License.
@@ -479,7 +479,7 @@
479
479
  userTimeoutReached: userTimeoutReached
480
480
  });
481
481
 
482
- /*! @azure/msal-common v14.13.0 2024-07-12 */
482
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
483
483
 
484
484
  /*
485
485
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -731,7 +731,7 @@
731
731
  return new ClientAuthError(errorCode, additionalMessage);
732
732
  }
733
733
 
734
- /*! @azure/msal-common v14.13.0 2024-07-12 */
734
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
735
735
 
736
736
  /*
737
737
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -792,7 +792,7 @@
792
792
  }
793
793
  }
794
794
 
795
- /*! @azure/msal-common v14.13.0 2024-07-12 */
795
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
796
796
  /*
797
797
  * Copyright (c) Microsoft Corporation. All rights reserved.
798
798
  * Licensed under the MIT License.
@@ -807,7 +807,7 @@
807
807
  Ciam: 3,
808
808
  };
809
809
 
810
- /*! @azure/msal-common v14.13.0 2024-07-12 */
810
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
811
811
  /*
812
812
  * Copyright (c) Microsoft Corporation. All rights reserved.
813
813
  * Licensed under the MIT License.
@@ -819,7 +819,7 @@
819
819
  response.hasOwnProperty("jwks_uri"));
820
820
  }
821
821
 
822
- /*! @azure/msal-common v14.13.0 2024-07-12 */
822
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
823
823
  /*
824
824
  * Copyright (c) Microsoft Corporation. All rights reserved.
825
825
  * Licensed under the MIT License.
@@ -873,7 +873,7 @@
873
873
  urlParseError: urlParseError
874
874
  });
875
875
 
876
- /*! @azure/msal-common v14.13.0 2024-07-12 */
876
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
877
877
 
878
878
  /*
879
879
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1011,7 +1011,7 @@
1011
1011
  return new ClientConfigurationError(errorCode);
1012
1012
  }
1013
1013
 
1014
- /*! @azure/msal-common v14.13.0 2024-07-12 */
1014
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
1015
1015
  /*
1016
1016
  * Copyright (c) Microsoft Corporation. All rights reserved.
1017
1017
  * Licensed under the MIT License.
@@ -1108,7 +1108,7 @@
1108
1108
  }
1109
1109
  }
1110
1110
 
1111
- /*! @azure/msal-common v14.13.0 2024-07-12 */
1111
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
1112
1112
 
1113
1113
  /*
1114
1114
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1155,7 +1155,7 @@
1155
1155
  return null;
1156
1156
  }
1157
1157
 
1158
- /*! @azure/msal-common v14.13.0 2024-07-12 */
1158
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
1159
1159
 
1160
1160
  /*
1161
1161
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1319,7 +1319,7 @@
1319
1319
  }
1320
1320
  }
1321
1321
 
1322
- /*! @azure/msal-common v14.13.0 2024-07-12 */
1322
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
1323
1323
 
1324
1324
  /*
1325
1325
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1459,7 +1459,7 @@
1459
1459
  return null;
1460
1460
  }
1461
1461
 
1462
- /*! @azure/msal-common v14.13.0 2024-07-12 */
1462
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
1463
1463
  /*
1464
1464
  * Copyright (c) Microsoft Corporation. All rights reserved.
1465
1465
  * Licensed under the MIT License.
@@ -1472,7 +1472,7 @@
1472
1472
  OIDC: "OIDC",
1473
1473
  };
1474
1474
 
1475
- /*! @azure/msal-common v14.13.0 2024-07-12 */
1475
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
1476
1476
  /*
1477
1477
  * Copyright (c) Microsoft Corporation. All rights reserved.
1478
1478
  * Licensed under the MIT License.
@@ -1492,7 +1492,7 @@
1492
1492
  AzureUsGovernment: "https://login.microsoftonline.us",
1493
1493
  };
1494
1494
 
1495
- /*! @azure/msal-common v14.13.0 2024-07-12 */
1495
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
1496
1496
  /*
1497
1497
  * Copyright (c) Microsoft Corporation. All rights reserved.
1498
1498
  * Licensed under the MIT License.
@@ -1502,7 +1502,7 @@
1502
1502
  response.hasOwnProperty("metadata"));
1503
1503
  }
1504
1504
 
1505
- /*! @azure/msal-common v14.13.0 2024-07-12 */
1505
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
1506
1506
  /*
1507
1507
  * Copyright (c) Microsoft Corporation. All rights reserved.
1508
1508
  * Licensed under the MIT License.
@@ -1512,7 +1512,7 @@
1512
1512
  response.hasOwnProperty("error_description"));
1513
1513
  }
1514
1514
 
1515
- /*! @azure/msal-common v14.13.0 2024-07-12 */
1515
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
1516
1516
  /*
1517
1517
  * Copyright (c) Microsoft Corporation. All rights reserved.
1518
1518
  * Licensed under the MIT License.
@@ -1994,7 +1994,7 @@
1994
1994
  "multiMatchedRT",
1995
1995
  ]);
1996
1996
 
1997
- /*! @azure/msal-common v14.13.0 2024-07-12 */
1997
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
1998
1998
  /*
1999
1999
  * Copyright (c) Microsoft Corporation. All rights reserved.
2000
2000
  * Licensed under the MIT License.
@@ -2090,7 +2090,7 @@
2090
2090
  };
2091
2091
  };
2092
2092
 
2093
- /*! @azure/msal-common v14.13.0 2024-07-12 */
2093
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
2094
2094
 
2095
2095
  /*
2096
2096
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2199,7 +2199,7 @@
2199
2199
  },
2200
2200
  };
2201
2201
 
2202
- /*! @azure/msal-common v14.13.0 2024-07-12 */
2202
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
2203
2203
  /*
2204
2204
  * Copyright (c) Microsoft Corporation. All rights reserved.
2205
2205
  * Licensed under the MIT License.
@@ -2236,7 +2236,7 @@
2236
2236
  return cachedAtSec > nowSeconds();
2237
2237
  }
2238
2238
 
2239
- /*! @azure/msal-common v14.13.0 2024-07-12 */
2239
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
2240
2240
 
2241
2241
  /*
2242
2242
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2563,7 +2563,7 @@
2563
2563
  return metadata.expiresAt <= nowSeconds();
2564
2564
  }
2565
2565
 
2566
- /*! @azure/msal-common v14.13.0 2024-07-12 */
2566
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
2567
2567
 
2568
2568
  /*
2569
2569
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3402,7 +3402,7 @@
3402
3402
  };
3403
3403
  }
3404
3404
 
3405
- /*! @azure/msal-common v14.13.0 2024-07-12 */
3405
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
3406
3406
 
3407
3407
  /*
3408
3408
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3433,7 +3433,7 @@
3433
3433
  }
3434
3434
  }
3435
3435
 
3436
- /*! @azure/msal-common v14.13.0 2024-07-12 */
3436
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
3437
3437
  /*
3438
3438
  * Copyright (c) Microsoft Corporation. All rights reserved.
3439
3439
  * Licensed under the MIT License.
@@ -3451,7 +3451,7 @@
3451
3451
  }
3452
3452
  }
3453
3453
 
3454
- /*! @azure/msal-common v14.13.0 2024-07-12 */
3454
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
3455
3455
  /*
3456
3456
  * Copyright (c) Microsoft Corporation. All rights reserved.
3457
3457
  * Licensed under the MIT License.
@@ -3497,8 +3497,9 @@
3497
3497
  const SID = "sid";
3498
3498
  const LOGIN_HINT = "login_hint";
3499
3499
  const DOMAIN_HINT = "domain_hint";
3500
+ const X_CLIENT_EXTRA_SKU = "x-client-xtra-sku";
3500
3501
 
3501
- /*! @azure/msal-common v14.13.0 2024-07-12 */
3502
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
3502
3503
 
3503
3504
  /*
3504
3505
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3537,7 +3538,7 @@
3537
3538
  },
3538
3539
  };
3539
3540
 
3540
- /*! @azure/msal-common v14.13.0 2024-07-12 */
3541
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
3541
3542
 
3542
3543
  /*
3543
3544
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3728,12 +3729,12 @@
3728
3729
  }
3729
3730
  }
3730
3731
 
3731
- /*! @azure/msal-common v14.13.0 2024-07-12 */
3732
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
3732
3733
  /* eslint-disable header/header */
3733
3734
  const name$1 = "@azure/msal-common";
3734
- const version$1 = "14.13.0";
3735
+ const version$1 = "14.14.0";
3735
3736
 
3736
- /*! @azure/msal-common v14.13.0 2024-07-12 */
3737
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
3737
3738
 
3738
3739
  /*
3739
3740
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3933,7 +3934,7 @@
3933
3934
  }
3934
3935
  }
3935
3936
 
3936
- /*! @azure/msal-common v14.13.0 2024-07-12 */
3937
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
3937
3938
 
3938
3939
  /*
3939
3940
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3973,7 +3974,7 @@
3973
3974
  };
3974
3975
  }
3975
3976
 
3976
- /*! @azure/msal-common v14.13.0 2024-07-12 */
3977
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
3977
3978
  /*
3978
3979
  * Copyright (c) Microsoft Corporation. All rights reserved.
3979
3980
  * Licensed under the MIT License.
@@ -3989,21 +3990,38 @@
3989
3990
  !!homeAccountId &&
3990
3991
  tenantId === homeAccountId.split(".")[1]);
3991
3992
  }
3992
- function buildTenantProfileFromIdTokenClaims(homeAccountId, idTokenClaims) {
3993
- const { oid, sub, tid, name, tfp, acr } = idTokenClaims;
3994
- /**
3995
- * Since there is no way to determine if the authority is AAD or B2C, we exhaust all the possible claims that can serve as tenant ID with the following precedence:
3996
- * tid - TenantID claim that identifies the tenant that issued the token in AAD. Expected in all AAD ID tokens, not present in B2C ID Tokens.
3997
- * tfp - Trust Framework Policy claim that identifies the policy that was used to authenticate the user. Functions as tenant for B2C scenarios.
3998
- * acr - Authentication Context Class Reference claim used only with older B2C policies. Fallback in case tfp is not present, but likely won't be present anyway.
3999
- */
4000
- const tenantId = tid || tfp || acr || "";
4001
- return {
4002
- tenantId: tenantId,
4003
- localAccountId: oid || sub || "",
4004
- name: name,
4005
- isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId),
4006
- };
3993
+ /**
3994
+ * Build tenant profile
3995
+ * @param homeAccountId - Home account identifier for this account object
3996
+ * @param localAccountId - Local account identifer for this account object
3997
+ * @param tenantId - Full tenant or organizational id that this account belongs to
3998
+ * @param idTokenClaims - Claims from the ID token
3999
+ * @returns
4000
+ */
4001
+ function buildTenantProfile(homeAccountId, localAccountId, tenantId, idTokenClaims) {
4002
+ if (idTokenClaims) {
4003
+ const { oid, sub, tid, name, tfp, acr } = idTokenClaims;
4004
+ /**
4005
+ * Since there is no way to determine if the authority is AAD or B2C, we exhaust all the possible claims that can serve as tenant ID with the following precedence:
4006
+ * tid - TenantID claim that identifies the tenant that issued the token in AAD. Expected in all AAD ID tokens, not present in B2C ID Tokens.
4007
+ * tfp - Trust Framework Policy claim that identifies the policy that was used to authenticate the user. Functions as tenant for B2C scenarios.
4008
+ * acr - Authentication Context Class Reference claim used only with older B2C policies. Fallback in case tfp is not present, but likely won't be present anyway.
4009
+ */
4010
+ const tenantId = tid || tfp || acr || "";
4011
+ return {
4012
+ tenantId: tenantId,
4013
+ localAccountId: oid || sub || "",
4014
+ name: name,
4015
+ isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId),
4016
+ };
4017
+ }
4018
+ else {
4019
+ return {
4020
+ tenantId,
4021
+ localAccountId,
4022
+ isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId),
4023
+ };
4024
+ }
4007
4025
  }
4008
4026
  /**
4009
4027
  * Replaces account info that varies by tenant profile sourced from the ID token claims passed in with the tenant-specific account info
@@ -4023,7 +4041,7 @@
4023
4041
  if (idTokenClaims) {
4024
4042
  // Ignore isHomeTenant, loginHint, and sid which are part of tenant profile but not base account info
4025
4043
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
4026
- const { isHomeTenant, ...claimsSourcedTenantProfile } = buildTenantProfileFromIdTokenClaims(baseAccountInfo.homeAccountId, idTokenClaims);
4044
+ const { isHomeTenant, ...claimsSourcedTenantProfile } = buildTenantProfile(baseAccountInfo.homeAccountId, baseAccountInfo.localAccountId, baseAccountInfo.tenantId, idTokenClaims);
4027
4045
  updatedAccountInfo = {
4028
4046
  ...updatedAccountInfo,
4029
4047
  ...claimsSourcedTenantProfile,
@@ -4035,7 +4053,7 @@
4035
4053
  return updatedAccountInfo;
4036
4054
  }
4037
4055
 
4038
- /*! @azure/msal-common v14.13.0 2024-07-12 */
4056
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
4039
4057
  /*
4040
4058
  * Copyright (c) Microsoft Corporation. All rights reserved.
4041
4059
  * Licensed under the MIT License.
@@ -4057,7 +4075,7 @@
4057
4075
  return null;
4058
4076
  }
4059
4077
 
4060
- /*! @azure/msal-common v14.13.0 2024-07-12 */
4078
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
4061
4079
 
4062
4080
  /*
4063
4081
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4201,12 +4219,8 @@
4201
4219
  account.tenantProfiles = accountDetails.tenantProfiles;
4202
4220
  }
4203
4221
  else {
4204
- const tenantProfiles = [];
4205
- if (accountDetails.idTokenClaims) {
4206
- const tenantProfile = buildTenantProfileFromIdTokenClaims(accountDetails.homeAccountId, accountDetails.idTokenClaims);
4207
- tenantProfiles.push(tenantProfile);
4208
- }
4209
- account.tenantProfiles = tenantProfiles;
4222
+ const tenantProfile = buildTenantProfile(accountDetails.homeAccountId, account.localAccountId, account.realm, accountDetails.idTokenClaims);
4223
+ account.tenantProfiles = [tenantProfile];
4210
4224
  }
4211
4225
  return account;
4212
4226
  }
@@ -4304,7 +4318,7 @@
4304
4318
  }
4305
4319
  }
4306
4320
 
4307
- /*! @azure/msal-common v14.13.0 2024-07-12 */
4321
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
4308
4322
  /*
4309
4323
  * Copyright (c) Microsoft Corporation. All rights reserved.
4310
4324
  * Licensed under the MIT License.
@@ -4312,7 +4326,7 @@
4312
4326
  const cacheQuotaExceededErrorCode = "cache_quota_exceeded";
4313
4327
  const cacheUnknownErrorCode = "cache_error_unknown";
4314
4328
 
4315
- /*! @azure/msal-common v14.13.0 2024-07-12 */
4329
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
4316
4330
 
4317
4331
  /*
4318
4332
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4339,7 +4353,7 @@
4339
4353
  }
4340
4354
  }
4341
4355
 
4342
- /*! @azure/msal-common v14.13.0 2024-07-12 */
4356
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
4343
4357
 
4344
4358
  /*
4345
4359
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4407,12 +4421,9 @@
4407
4421
  */
4408
4422
  buildTenantProfiles(cachedAccounts, accountFilter) {
4409
4423
  return cachedAccounts.flatMap((accountEntity) => {
4410
- return this.getAccountInfoForTenantProfiles(accountEntity, accountFilter);
4424
+ return this.getTenantProfilesFromAccountEntity(accountEntity, accountFilter?.tenantId, accountFilter);
4411
4425
  });
4412
4426
  }
4413
- getAccountInfoForTenantProfiles(accountEntity, accountFilter) {
4414
- return this.getTenantProfilesFromAccountEntity(accountEntity, accountFilter?.tenantId, accountFilter);
4415
- }
4416
4427
  getTenantedAccountInfoByFilter(accountInfo, tokenKeys, tenantProfile, tenantProfileFilter) {
4417
4428
  let tenantedAccountInfo = null;
4418
4429
  let idTokenClaims;
@@ -5594,7 +5605,7 @@
5594
5605
  }
5595
5606
  }
5596
5607
 
5597
- /*! @azure/msal-common v14.13.0 2024-07-12 */
5608
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
5598
5609
 
5599
5610
  /*
5600
5611
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5692,7 +5703,7 @@
5692
5703
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
5693
5704
  }
5694
5705
 
5695
- /*! @azure/msal-common v14.13.0 2024-07-12 */
5706
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
5696
5707
 
5697
5708
  /*
5698
5709
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5711,7 +5722,7 @@
5711
5722
  }
5712
5723
  }
5713
5724
 
5714
- /*! @azure/msal-common v14.13.0 2024-07-12 */
5725
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
5715
5726
 
5716
5727
  /*
5717
5728
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5809,7 +5820,7 @@
5809
5820
  }
5810
5821
  }
5811
5822
 
5812
- /*! @azure/msal-common v14.13.0 2024-07-12 */
5823
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
5813
5824
 
5814
5825
  /*
5815
5826
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5846,7 +5857,7 @@
5846
5857
  }
5847
5858
  }
5848
5859
 
5849
- /*! @azure/msal-common v14.13.0 2024-07-12 */
5860
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
5850
5861
  /*
5851
5862
  * Copyright (c) Microsoft Corporation. All rights reserved.
5852
5863
  * Licensed under the MIT License.
@@ -5856,7 +5867,7 @@
5856
5867
  UPN: "UPN",
5857
5868
  };
5858
5869
 
5859
- /*! @azure/msal-common v14.13.0 2024-07-12 */
5870
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
5860
5871
 
5861
5872
  /*
5862
5873
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5923,7 +5934,7 @@
5923
5934
  }
5924
5935
  }
5925
5936
 
5926
- /*! @azure/msal-common v14.13.0 2024-07-12 */
5937
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
5927
5938
 
5928
5939
  /*
5929
5940
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6308,7 +6319,7 @@
6308
6319
  }
6309
6320
  }
6310
6321
 
6311
- /*! @azure/msal-common v14.13.0 2024-07-12 */
6322
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
6312
6323
 
6313
6324
  /*
6314
6325
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6411,7 +6422,7 @@
6411
6422
  }
6412
6423
  }
6413
6424
 
6414
- /*! @azure/msal-common v14.13.0 2024-07-12 */
6425
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
6415
6426
  /*
6416
6427
  * Copyright (c) Microsoft Corporation. All rights reserved.
6417
6428
  * Licensed under the MIT License.
@@ -6437,7 +6448,7 @@
6437
6448
  refreshTokenExpired: refreshTokenExpired
6438
6449
  });
6439
6450
 
6440
- /*! @azure/msal-common v14.13.0 2024-07-12 */
6451
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
6441
6452
 
6442
6453
  /*
6443
6454
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6525,7 +6536,7 @@
6525
6536
  return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
6526
6537
  }
6527
6538
 
6528
- /*! @azure/msal-common v14.13.0 2024-07-12 */
6539
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
6529
6540
 
6530
6541
  /*
6531
6542
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6597,7 +6608,7 @@
6597
6608
  }
6598
6609
  }
6599
6610
 
6600
- /*! @azure/msal-common v14.13.0 2024-07-12 */
6611
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
6601
6612
 
6602
6613
  /*
6603
6614
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6681,7 +6692,7 @@
6681
6692
  }
6682
6693
  }
6683
6694
 
6684
- /*! @azure/msal-common v14.13.0 2024-07-12 */
6695
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
6685
6696
  /*
6686
6697
  * Copyright (c) Microsoft Corporation. All rights reserved.
6687
6698
  * Licensed under the MIT License.
@@ -6708,7 +6719,7 @@
6708
6719
  }
6709
6720
  }
6710
6721
 
6711
- /*! @azure/msal-common v14.13.0 2024-07-12 */
6722
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
6712
6723
 
6713
6724
  /*
6714
6725
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7073,19 +7084,19 @@
7073
7084
  nativeAccountId: nativeAccountId,
7074
7085
  }, authority, base64Decode);
7075
7086
  const tenantProfiles = baseAccount.tenantProfiles || [];
7076
- if (claimsTenantId &&
7077
- idTokenClaims &&
7087
+ const tenantId = claimsTenantId || baseAccount.realm;
7088
+ if (tenantId &&
7078
7089
  !tenantProfiles.find((tenantProfile) => {
7079
- return tenantProfile.tenantId === claimsTenantId;
7090
+ return tenantProfile.tenantId === tenantId;
7080
7091
  })) {
7081
- const newTenantProfile = buildTenantProfileFromIdTokenClaims(homeAccountId, idTokenClaims);
7092
+ const newTenantProfile = buildTenantProfile(homeAccountId, baseAccount.localAccountId, tenantId, idTokenClaims);
7082
7093
  tenantProfiles.push(newTenantProfile);
7083
7094
  }
7084
7095
  baseAccount.tenantProfiles = tenantProfiles;
7085
7096
  return baseAccount;
7086
7097
  }
7087
7098
 
7088
- /*! @azure/msal-common v14.13.0 2024-07-12 */
7099
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
7089
7100
 
7090
7101
  /*
7091
7102
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7508,7 +7519,7 @@
7508
7519
  }
7509
7520
  }
7510
7521
 
7511
- /*! @azure/msal-common v14.13.0 2024-07-12 */
7522
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
7512
7523
 
7513
7524
  /*
7514
7525
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7722,7 +7733,7 @@
7722
7733
  }
7723
7734
  }
7724
7735
 
7725
- /*! @azure/msal-common v14.13.0 2024-07-12 */
7736
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
7726
7737
 
7727
7738
  /*
7728
7739
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7858,7 +7869,7 @@
7858
7869
  }
7859
7870
  }
7860
7871
 
7861
- /*! @azure/msal-common v14.13.0 2024-07-12 */
7872
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
7862
7873
 
7863
7874
  /*
7864
7875
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7873,7 +7884,7 @@
7873
7884
  },
7874
7885
  };
7875
7886
 
7876
- /*! @azure/msal-common v14.13.0 2024-07-12 */
7887
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
7877
7888
  /*
7878
7889
  * Copyright (c) Microsoft Corporation. All rights reserved.
7879
7890
  * Licensed under the MIT License.
@@ -7881,7 +7892,7 @@
7881
7892
  const missingKidError = "missing_kid_error";
7882
7893
  const missingAlgError = "missing_alg_error";
7883
7894
 
7884
- /*! @azure/msal-common v14.13.0 2024-07-12 */
7895
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
7885
7896
 
7886
7897
  /*
7887
7898
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7906,7 +7917,7 @@
7906
7917
  return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
7907
7918
  }
7908
7919
 
7909
- /*! @azure/msal-common v14.13.0 2024-07-12 */
7920
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
7910
7921
 
7911
7922
  /*
7912
7923
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7946,7 +7957,7 @@
7946
7957
  }
7947
7958
  }
7948
7959
 
7949
- /*! @azure/msal-common v14.13.0 2024-07-12 */
7960
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
7950
7961
 
7951
7962
  /*
7952
7963
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8004,12 +8015,50 @@
8004
8015
  }
8005
8016
  }
8006
8017
 
8007
- /*! @azure/msal-common v14.13.0 2024-07-12 */
8018
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
8008
8019
 
8009
8020
  /*
8010
8021
  * Copyright (c) Microsoft Corporation. All rights reserved.
8011
8022
  * Licensed under the MIT License.
8012
8023
  */
8024
+ const skuGroupSeparator = ",";
8025
+ const skuValueSeparator = "|";
8026
+ function makeExtraSkuString(params) {
8027
+ const { skus, libraryName, libraryVersion, extensionName, extensionVersion, } = params;
8028
+ const skuMap = new Map([
8029
+ [0, [libraryName, libraryVersion]],
8030
+ [2, [extensionName, extensionVersion]],
8031
+ ]);
8032
+ let skuArr = [];
8033
+ if (skus?.length) {
8034
+ skuArr = skus.split(skuGroupSeparator);
8035
+ // Ignore invalid input sku param
8036
+ if (skuArr.length < 4) {
8037
+ return skus;
8038
+ }
8039
+ }
8040
+ else {
8041
+ skuArr = Array.from({ length: 4 }, () => skuValueSeparator);
8042
+ }
8043
+ skuMap.forEach((value, key) => {
8044
+ if (value.length === 2 && value[0]?.length && value[1]?.length) {
8045
+ setSku({
8046
+ skuArr,
8047
+ index: key,
8048
+ skuName: value[0],
8049
+ skuVersion: value[1],
8050
+ });
8051
+ }
8052
+ });
8053
+ return skuArr.join(skuGroupSeparator);
8054
+ }
8055
+ function setSku(params) {
8056
+ const { skuArr, index, skuName, skuVersion } = params;
8057
+ if (index >= skuArr.length) {
8058
+ return;
8059
+ }
8060
+ skuArr[index] = [skuName, skuVersion].join(skuValueSeparator);
8061
+ }
8013
8062
  /** @internal */
8014
8063
  class ServerTelemetryManager {
8015
8064
  constructor(telemetryRequest, cacheManager) {
@@ -8029,7 +8078,12 @@
8029
8078
  */
8030
8079
  generateCurrentRequestHeaderValue() {
8031
8080
  const request = `${this.apiId}${SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR}${this.cacheOutcome}`;
8032
- const platformFields = [this.wrapperSKU, this.wrapperVer].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);
8081
+ const platformFieldsArr = [this.wrapperSKU, this.wrapperVer];
8082
+ const nativeBrokerErrorCode = this.getNativeBrokerErrorCode();
8083
+ if (nativeBrokerErrorCode?.length) {
8084
+ platformFieldsArr.push(`broker_error=${nativeBrokerErrorCode}`);
8085
+ }
8086
+ const platformFields = platformFieldsArr.join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);
8033
8087
  const regionDiscoveryFields = this.getRegionDiscoveryFields();
8034
8088
  const requestWithRegionDiscoveryFields = [
8035
8089
  request,
@@ -8206,9 +8260,25 @@
8206
8260
  setCacheOutcome(cacheOutcome) {
8207
8261
  this.cacheOutcome = cacheOutcome;
8208
8262
  }
8263
+ setNativeBrokerErrorCode(errorCode) {
8264
+ const lastRequests = this.getLastRequests();
8265
+ lastRequests.nativeBrokerErrorCode = errorCode;
8266
+ this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests);
8267
+ }
8268
+ getNativeBrokerErrorCode() {
8269
+ return this.getLastRequests().nativeBrokerErrorCode;
8270
+ }
8271
+ clearNativeBrokerErrorCode() {
8272
+ const lastRequests = this.getLastRequests();
8273
+ delete lastRequests.nativeBrokerErrorCode;
8274
+ this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests);
8275
+ }
8276
+ static makeExtraSkuString(params) {
8277
+ return makeExtraSkuString(params);
8278
+ }
8209
8279
  }
8210
8280
 
8211
- /*! @azure/msal-common v14.13.0 2024-07-12 */
8281
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
8212
8282
 
8213
8283
  /*
8214
8284
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8287,7 +8357,7 @@
8287
8357
  }
8288
8358
  }
8289
8359
 
8290
- /*! @azure/msal-common v14.13.0 2024-07-12 */
8360
+ /*! @azure/msal-common v14.14.0 2024-07-23 */
8291
8361
 
8292
8362
  /*
8293
8363
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10158,7 +10228,7 @@
10158
10228
 
10159
10229
  /* eslint-disable header/header */
10160
10230
  const name = "@azure/msal-browser";
10161
- const version = "3.19.0";
10231
+ const version = "3.20.0";
10162
10232
 
10163
10233
  /*
10164
10234
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -13306,6 +13376,30 @@
13306
13376
  this.nativeMessageHandler = provider;
13307
13377
  this.nativeStorageManager = nativeStorageImpl;
13308
13378
  this.silentCacheClient = new SilentCacheClient(config, this.nativeStorageManager, browserCrypto, logger, eventHandler, navigationClient, performanceClient, provider, correlationId);
13379
+ this.serverTelemetryManager = this.initializeServerTelemetryManager(this.apiId);
13380
+ const extensionName = this.nativeMessageHandler.getExtensionId() ===
13381
+ NativeConstants.PREFERRED_EXTENSION_ID
13382
+ ? "chrome"
13383
+ : this.nativeMessageHandler.getExtensionId()?.length
13384
+ ? "unknown"
13385
+ : undefined;
13386
+ this.skus = ServerTelemetryManager.makeExtraSkuString({
13387
+ libraryName: BrowserConstants.MSAL_SKU,
13388
+ libraryVersion: version,
13389
+ extensionName: extensionName,
13390
+ extensionVersion: this.nativeMessageHandler.getExtensionVersion(),
13391
+ });
13392
+ }
13393
+ /**
13394
+ * Adds SKUs to request extra query parameters
13395
+ * @param request {NativeTokenRequest}
13396
+ * @private
13397
+ */
13398
+ addRequestSKUs(request) {
13399
+ request.extraParameters = {
13400
+ ...request.extraParameters,
13401
+ [X_CLIENT_EXTRA_SKU]: this.skus,
13402
+ };
13309
13403
  }
13310
13404
  /**
13311
13405
  * Acquire token from native platform via browser extension
@@ -13317,48 +13411,57 @@
13317
13411
  // start the perf measurement
13318
13412
  const nativeATMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken, request.correlationId);
13319
13413
  const reqTimestamp = nowSeconds();
13320
- // initialize native request
13321
- const nativeRequest = await this.initializeNativeRequest(request);
13322
- // check if the tokens can be retrieved from internal cache
13323
13414
  try {
13324
- const result = await this.acquireTokensFromCache(this.accountId, nativeRequest);
13325
- nativeATMeasurement.end({
13326
- success: true,
13327
- isNativeBroker: false,
13328
- fromCache: true,
13415
+ // initialize native request
13416
+ const nativeRequest = await this.initializeNativeRequest(request);
13417
+ // check if the tokens can be retrieved from internal cache
13418
+ try {
13419
+ const result = await this.acquireTokensFromCache(this.accountId, nativeRequest);
13420
+ nativeATMeasurement.end({
13421
+ success: true,
13422
+ isNativeBroker: false,
13423
+ fromCache: true,
13424
+ });
13425
+ return result;
13426
+ }
13427
+ catch (e) {
13428
+ // continue with a native call for any and all errors
13429
+ this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call");
13430
+ }
13431
+ const { ...nativeTokenRequest } = nativeRequest;
13432
+ // fall back to native calls
13433
+ const messageBody = {
13434
+ method: NativeExtensionMethod.GetToken,
13435
+ request: nativeTokenRequest,
13436
+ };
13437
+ const response = await this.nativeMessageHandler.sendMessage(messageBody);
13438
+ const validatedResponse = this.validateNativeResponse(response);
13439
+ return await this.handleNativeResponse(validatedResponse, nativeRequest, reqTimestamp)
13440
+ .then((result) => {
13441
+ nativeATMeasurement.end({
13442
+ success: true,
13443
+ isNativeBroker: true,
13444
+ requestId: result.requestId,
13445
+ });
13446
+ this.serverTelemetryManager.clearNativeBrokerErrorCode();
13447
+ return result;
13448
+ })
13449
+ .catch((error) => {
13450
+ nativeATMeasurement.end({
13451
+ success: false,
13452
+ errorCode: error.errorCode,
13453
+ subErrorCode: error.subError,
13454
+ isNativeBroker: true,
13455
+ });
13456
+ throw error;
13329
13457
  });
13330
- return result;
13331
13458
  }
13332
13459
  catch (e) {
13333
- // continue with a native call for any and all errors
13334
- this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call");
13460
+ if (e instanceof NativeAuthError) {
13461
+ this.serverTelemetryManager.setNativeBrokerErrorCode(e.errorCode);
13462
+ }
13463
+ throw e;
13335
13464
  }
13336
- const { ...nativeTokenRequest } = nativeRequest;
13337
- // fall back to native calls
13338
- const messageBody = {
13339
- method: NativeExtensionMethod.GetToken,
13340
- request: nativeTokenRequest,
13341
- };
13342
- const response = await this.nativeMessageHandler.sendMessage(messageBody);
13343
- const validatedResponse = this.validateNativeResponse(response);
13344
- return this.handleNativeResponse(validatedResponse, nativeRequest, reqTimestamp)
13345
- .then((result) => {
13346
- nativeATMeasurement.end({
13347
- success: true,
13348
- isNativeBroker: true,
13349
- requestId: result.requestId,
13350
- });
13351
- return result;
13352
- })
13353
- .catch((error) => {
13354
- nativeATMeasurement.end({
13355
- success: false,
13356
- errorCode: error.errorCode,
13357
- subErrorCode: error.subError,
13358
- isNativeBroker: true,
13359
- });
13360
- throw error;
13361
- });
13362
13465
  }
13363
13466
  /**
13364
13467
  * Creates silent flow request
@@ -13431,8 +13534,11 @@
13431
13534
  }
13432
13535
  catch (e) {
13433
13536
  // Only throw fatal errors here to allow application to fallback to regular redirect. Otherwise proceed and the error will be thrown in handleRedirectPromise
13434
- if (e instanceof NativeAuthError && isFatalNativeAuthError(e)) {
13435
- throw e;
13537
+ if (e instanceof NativeAuthError) {
13538
+ this.serverTelemetryManager.setNativeBrokerErrorCode(e.errorCode);
13539
+ if (isFatalNativeAuthError(e)) {
13540
+ throw e;
13541
+ }
13436
13542
  }
13437
13543
  }
13438
13544
  this.browserStorage.setTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST, JSON.stringify(nativeRequest), true);
@@ -13483,7 +13589,9 @@
13483
13589
  this.validateNativeResponse(response);
13484
13590
  const result = this.handleNativeResponse(response, request, reqTimestamp);
13485
13591
  this.browserStorage.setInteractionInProgress(false);
13486
- return await result;
13592
+ const res = await result;
13593
+ this.serverTelemetryManager.clearNativeBrokerErrorCode();
13594
+ return res;
13487
13595
  }
13488
13596
  catch (e) {
13489
13597
  this.browserStorage.setInteractionInProgress(false);
@@ -13847,6 +13955,7 @@
13847
13955
  // SPAs require whole string to be passed to broker
13848
13956
  validatedRequest.reqCnf = reqCnfData;
13849
13957
  }
13958
+ this.addRequestSKUs(validatedRequest);
13850
13959
  return validatedRequest;
13851
13960
  }
13852
13961
  /**
@@ -17114,7 +17223,7 @@
17114
17223
  "";
17115
17224
  const name = fromAccount.name || effectiveIdTokenClaims?.name;
17116
17225
  const tenantProfiles = new Map();
17117
- const tenantProfile = buildTenantProfileFromIdTokenClaims(homeAccountId, effectiveIdTokenClaims);
17226
+ const tenantProfile = buildTenantProfile(homeAccountId, localAccountId, tenantId, effectiveIdTokenClaims);
17118
17227
  tenantProfiles.set(tenantId, tenantProfile);
17119
17228
  const account = {
17120
17229
  homeAccountId,