@azure/msal-node 3.8.4 → 3.8.5
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.
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/NodeStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/cache/distributed/DistributedCachePlugin.mjs +1 -1
- package/dist/cache/serializer/Deserializer.mjs +1 -1
- package/dist/cache/serializer/Serializer.mjs +1 -1
- package/dist/client/ClientApplication.d.ts.map +1 -1
- package/dist/client/ClientApplication.mjs +5 -5
- package/dist/client/ClientApplication.mjs.map +1 -1
- package/dist/client/ClientAssertion.mjs +1 -1
- package/dist/client/ClientCredentialClient.d.ts.map +1 -1
- package/dist/client/ClientCredentialClient.mjs +3 -2
- package/dist/client/ClientCredentialClient.mjs.map +1 -1
- package/dist/client/ConfidentialClientApplication.mjs +1 -1
- package/dist/client/DeviceCodeClient.d.ts.map +1 -1
- package/dist/client/DeviceCodeClient.mjs +3 -2
- package/dist/client/DeviceCodeClient.mjs.map +1 -1
- package/dist/client/ManagedIdentityApplication.mjs +1 -1
- package/dist/client/ManagedIdentityClient.mjs +1 -1
- package/dist/client/ManagedIdentitySources/AppService.mjs +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.mjs +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +3 -3
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/CloudShell.mjs +1 -1
- package/dist/client/ManagedIdentitySources/Imds.mjs +1 -1
- package/dist/client/ManagedIdentitySources/MachineLearning.mjs +1 -1
- package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +1 -1
- package/dist/client/OnBehalfOfClient.d.ts.map +1 -1
- package/dist/client/OnBehalfOfClient.mjs +3 -2
- package/dist/client/OnBehalfOfClient.mjs.map +1 -1
- package/dist/client/PublicClientApplication.mjs +1 -1
- package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
- package/dist/client/UsernamePasswordClient.mjs +3 -2
- package/dist/client/UsernamePasswordClient.mjs.map +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/config/ManagedIdentityId.mjs +1 -1
- package/dist/config/ManagedIdentityRequestParameters.mjs +1 -1
- package/dist/crypto/CryptoProvider.mjs +1 -1
- package/dist/crypto/GuidGenerator.mjs +1 -1
- package/dist/crypto/HashUtils.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/error/ManagedIdentityError.mjs +1 -1
- package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
- package/dist/error/NodeAuthError.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internals.mjs +1 -1
- package/dist/network/HttpClient.mjs +1 -1
- package/dist/network/HttpClientWithRetries.mjs +1 -1
- package/dist/network/LoopbackClient.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/protocol/Authorize.mjs +1 -1
- package/dist/retry/DefaultManagedIdentityRetryPolicy.mjs +1 -1
- package/dist/retry/ExponentialRetryStrategy.mjs +1 -1
- package/dist/retry/ImdsRetryPolicy.mjs +1 -1
- package/dist/retry/LinearRetryStrategy.mjs +1 -1
- package/dist/utils/Constants.d.ts +2 -0
- package/dist/utils/Constants.d.ts.map +1 -1
- package/dist/utils/Constants.mjs +3 -1
- package/dist/utils/Constants.mjs.map +1 -1
- package/dist/utils/EncodingUtils.mjs +1 -1
- package/dist/utils/NetworkUtils.mjs +1 -1
- package/dist/utils/TimeUtils.mjs +1 -1
- package/lib/msal-node.cjs +106 -91
- package/lib/msal-node.cjs.map +1 -1
- package/lib/types/client/ClientApplication.d.ts.map +1 -1
- package/lib/types/client/ClientCredentialClient.d.ts.map +1 -1
- package/lib/types/client/DeviceCodeClient.d.ts.map +1 -1
- package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
- package/lib/types/client/OnBehalfOfClient.d.ts.map +1 -1
- package/lib/types/client/UsernamePasswordClient.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/utils/Constants.d.ts +2 -0
- package/lib/types/utils/Constants.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/client/ClientApplication.ts +9 -3
- package/src/client/ClientCredentialClient.ts +3 -1
- package/src/client/DeviceCodeClient.ts +3 -1
- package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +3 -1
- package/src/client/OnBehalfOfClient.ts +2 -0
- package/src/client/UsernamePasswordClient.ts +3 -1
- package/src/packageMetadata.ts +1 -1
- package/src/utils/Constants.ts +2 -0
package/lib/msal-node.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v3.8.
|
|
1
|
+
/*! @azure/msal-node v3.8.5 2026-01-13 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -153,7 +153,7 @@ class Serializer {
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
/*! @azure/msal-common v15.
|
|
156
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
157
157
|
/*
|
|
158
158
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
159
159
|
* Licensed under the MIT License.
|
|
@@ -433,7 +433,7 @@ const EncodingTypes = {
|
|
|
433
433
|
UTF8: "utf-8",
|
|
434
434
|
};
|
|
435
435
|
|
|
436
|
-
/*! @azure/msal-common v15.
|
|
436
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
437
437
|
/*
|
|
438
438
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
439
439
|
* Licensed under the MIT License.
|
|
@@ -450,7 +450,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
450
450
|
unexpectedError: unexpectedError
|
|
451
451
|
});
|
|
452
452
|
|
|
453
|
-
/*! @azure/msal-common v15.
|
|
453
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
454
454
|
|
|
455
455
|
/*
|
|
456
456
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -499,7 +499,7 @@ function createAuthError(code, additionalMessage) {
|
|
|
499
499
|
: AuthErrorMessages[code]);
|
|
500
500
|
}
|
|
501
501
|
|
|
502
|
-
/*! @azure/msal-common v15.
|
|
502
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
503
503
|
/*
|
|
504
504
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
505
505
|
* Licensed under the MIT License.
|
|
@@ -599,7 +599,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
599
599
|
userTimeoutReached: userTimeoutReached
|
|
600
600
|
});
|
|
601
601
|
|
|
602
|
-
/*! @azure/msal-common v15.
|
|
602
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
603
603
|
|
|
604
604
|
/*
|
|
605
605
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -856,7 +856,7 @@ function createClientAuthError(errorCode, additionalMessage) {
|
|
|
856
856
|
return new ClientAuthError(errorCode, additionalMessage);
|
|
857
857
|
}
|
|
858
858
|
|
|
859
|
-
/*! @azure/msal-common v15.
|
|
859
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
860
860
|
|
|
861
861
|
/*
|
|
862
862
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -895,7 +895,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
895
895
|
},
|
|
896
896
|
};
|
|
897
897
|
|
|
898
|
-
/*! @azure/msal-common v15.
|
|
898
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
899
899
|
|
|
900
900
|
/*
|
|
901
901
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1086,12 +1086,12 @@ class Logger {
|
|
|
1086
1086
|
}
|
|
1087
1087
|
}
|
|
1088
1088
|
|
|
1089
|
-
/*! @azure/msal-common v15.
|
|
1089
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
1090
1090
|
/* eslint-disable header/header */
|
|
1091
1091
|
const name$1 = "@azure/msal-common";
|
|
1092
|
-
const version$1 = "15.
|
|
1092
|
+
const version$1 = "15.14.0";
|
|
1093
1093
|
|
|
1094
|
-
/*! @azure/msal-common v15.
|
|
1094
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
1095
1095
|
/*
|
|
1096
1096
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1097
1097
|
* Licensed under the MIT License.
|
|
@@ -1111,7 +1111,7 @@ const AzureCloudInstance = {
|
|
|
1111
1111
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
1112
1112
|
};
|
|
1113
1113
|
|
|
1114
|
-
/*! @azure/msal-common v15.
|
|
1114
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
1115
1115
|
/*
|
|
1116
1116
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1117
1117
|
* Licensed under the MIT License.
|
|
@@ -1169,7 +1169,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
1169
1169
|
urlParseError: urlParseError
|
|
1170
1170
|
});
|
|
1171
1171
|
|
|
1172
|
-
/*! @azure/msal-common v15.
|
|
1172
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
1173
1173
|
|
|
1174
1174
|
/*
|
|
1175
1175
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1317,7 +1317,7 @@ function createClientConfigurationError(errorCode) {
|
|
|
1317
1317
|
return new ClientConfigurationError(errorCode);
|
|
1318
1318
|
}
|
|
1319
1319
|
|
|
1320
|
-
/*! @azure/msal-common v15.
|
|
1320
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
1321
1321
|
/*
|
|
1322
1322
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1323
1323
|
* Licensed under the MIT License.
|
|
@@ -1414,7 +1414,7 @@ class StringUtils {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
}
|
|
1416
1416
|
|
|
1417
|
-
/*! @azure/msal-common v15.
|
|
1417
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
1418
1418
|
|
|
1419
1419
|
/*
|
|
1420
1420
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1609,7 +1609,7 @@ class ScopeSet {
|
|
|
1609
1609
|
}
|
|
1610
1610
|
}
|
|
1611
1611
|
|
|
1612
|
-
/*! @azure/msal-common v15.
|
|
1612
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
1613
1613
|
|
|
1614
1614
|
/*
|
|
1615
1615
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1649,7 +1649,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
1649
1649
|
};
|
|
1650
1650
|
}
|
|
1651
1651
|
|
|
1652
|
-
/*! @azure/msal-common v15.
|
|
1652
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
1653
1653
|
/*
|
|
1654
1654
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1655
1655
|
* Licensed under the MIT License.
|
|
@@ -1731,7 +1731,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
1731
1731
|
return updatedAccountInfo;
|
|
1732
1732
|
}
|
|
1733
1733
|
|
|
1734
|
-
/*! @azure/msal-common v15.
|
|
1734
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
1735
1735
|
/*
|
|
1736
1736
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1737
1737
|
* Licensed under the MIT License.
|
|
@@ -1746,7 +1746,7 @@ const AuthorityType = {
|
|
|
1746
1746
|
Ciam: 3,
|
|
1747
1747
|
};
|
|
1748
1748
|
|
|
1749
|
-
/*! @azure/msal-common v15.
|
|
1749
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
1750
1750
|
/*
|
|
1751
1751
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1752
1752
|
* Licensed under the MIT License.
|
|
@@ -1768,7 +1768,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
1768
1768
|
return null;
|
|
1769
1769
|
}
|
|
1770
1770
|
|
|
1771
|
-
/*! @azure/msal-common v15.
|
|
1771
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
1772
1772
|
/*
|
|
1773
1773
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1774
1774
|
* Licensed under the MIT License.
|
|
@@ -1792,7 +1792,7 @@ const ProtocolMode = {
|
|
|
1792
1792
|
EAR: "EAR",
|
|
1793
1793
|
};
|
|
1794
1794
|
|
|
1795
|
-
/*! @azure/msal-common v15.
|
|
1795
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
1796
1796
|
|
|
1797
1797
|
/*
|
|
1798
1798
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2013,7 +2013,7 @@ class AccountEntity {
|
|
|
2013
2013
|
}
|
|
2014
2014
|
}
|
|
2015
2015
|
|
|
2016
|
-
/*! @azure/msal-common v15.
|
|
2016
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
2017
2017
|
|
|
2018
2018
|
/*
|
|
2019
2019
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2094,7 +2094,7 @@ function checkMaxAge(authTime, maxAge) {
|
|
|
2094
2094
|
}
|
|
2095
2095
|
}
|
|
2096
2096
|
|
|
2097
|
-
/*! @azure/msal-common v15.
|
|
2097
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
2098
2098
|
/**
|
|
2099
2099
|
* Parses hash string from given string. Returns empty string if no hash symbol is found.
|
|
2100
2100
|
* @param hashString
|
|
@@ -2154,7 +2154,7 @@ function mapToQueryString(parameters, encodeExtraParams = true, extraQueryParame
|
|
|
2154
2154
|
return queryParameterArray.join("&");
|
|
2155
2155
|
}
|
|
2156
2156
|
|
|
2157
|
-
/*! @azure/msal-common v15.
|
|
2157
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
2158
2158
|
|
|
2159
2159
|
/*
|
|
2160
2160
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2318,7 +2318,7 @@ class UrlString {
|
|
|
2318
2318
|
}
|
|
2319
2319
|
}
|
|
2320
2320
|
|
|
2321
|
-
/*! @azure/msal-common v15.
|
|
2321
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
2322
2322
|
|
|
2323
2323
|
/*
|
|
2324
2324
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2457,7 +2457,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
2457
2457
|
return null;
|
|
2458
2458
|
}
|
|
2459
2459
|
|
|
2460
|
-
/*! @azure/msal-common v15.
|
|
2460
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
2461
2461
|
/*
|
|
2462
2462
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2463
2463
|
* Licensed under the MIT License.
|
|
@@ -2465,7 +2465,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
2465
2465
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
2466
2466
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
2467
2467
|
|
|
2468
|
-
/*! @azure/msal-common v15.
|
|
2468
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
2469
2469
|
|
|
2470
2470
|
/*
|
|
2471
2471
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2510,7 +2510,7 @@ function createCacheError(e) {
|
|
|
2510
2510
|
}
|
|
2511
2511
|
}
|
|
2512
2512
|
|
|
2513
|
-
/*! @azure/msal-common v15.
|
|
2513
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
2514
2514
|
|
|
2515
2515
|
/*
|
|
2516
2516
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2680,15 +2680,16 @@ class CacheManager {
|
|
|
2680
2680
|
* @param cacheRecord {CacheRecord}
|
|
2681
2681
|
* @param correlationId {?string} correlation id
|
|
2682
2682
|
* @param kmsi - Keep Me Signed In
|
|
2683
|
+
* @param apiId - API identifier for telemetry tracking
|
|
2683
2684
|
* @param storeInCache {?StoreInCache}
|
|
2684
2685
|
*/
|
|
2685
|
-
async saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache) {
|
|
2686
|
+
async saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache) {
|
|
2686
2687
|
if (!cacheRecord) {
|
|
2687
2688
|
throw createClientAuthError(invalidCacheRecord);
|
|
2688
2689
|
}
|
|
2689
2690
|
try {
|
|
2690
2691
|
if (!!cacheRecord.account) {
|
|
2691
|
-
await this.setAccount(cacheRecord.account, correlationId, kmsi);
|
|
2692
|
+
await this.setAccount(cacheRecord.account, correlationId, kmsi, apiId);
|
|
2692
2693
|
}
|
|
2693
2694
|
if (!!cacheRecord.idToken && storeInCache?.idToken !== false) {
|
|
2694
2695
|
await this.setIdTokenCredential(cacheRecord.idToken, correlationId, kmsi);
|
|
@@ -3619,7 +3620,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
3619
3620
|
}
|
|
3620
3621
|
}
|
|
3621
3622
|
|
|
3622
|
-
/*! @azure/msal-common v15.
|
|
3623
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
3623
3624
|
/*
|
|
3624
3625
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3625
3626
|
* Licensed under the MIT License.
|
|
@@ -3876,6 +3877,11 @@ const PerformanceEvents = {
|
|
|
3876
3877
|
Decrypt: "decrypt",
|
|
3877
3878
|
GenerateEarKey: "generateEarKey",
|
|
3878
3879
|
DecryptEarResponse: "decryptEarResponse",
|
|
3880
|
+
LoadExternalTokens: "LoadExternalTokens",
|
|
3881
|
+
LoadAccount: "loadAccount",
|
|
3882
|
+
LoadIdToken: "loadIdToken",
|
|
3883
|
+
LoadAccessToken: "loadAccessToken",
|
|
3884
|
+
LoadRefreshToken: "loadRefreshToken",
|
|
3879
3885
|
};
|
|
3880
3886
|
/**
|
|
3881
3887
|
* State of the performance event.
|
|
@@ -3886,7 +3892,7 @@ const PerformanceEvents = {
|
|
|
3886
3892
|
const PerformanceEventStatus = {
|
|
3887
3893
|
InProgress: 1};
|
|
3888
3894
|
|
|
3889
|
-
/*! @azure/msal-common v15.
|
|
3895
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
3890
3896
|
|
|
3891
3897
|
/*
|
|
3892
3898
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3965,7 +3971,7 @@ class StubPerformanceClient {
|
|
|
3965
3971
|
}
|
|
3966
3972
|
}
|
|
3967
3973
|
|
|
3968
|
-
/*! @azure/msal-common v15.
|
|
3974
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
3969
3975
|
|
|
3970
3976
|
/*
|
|
3971
3977
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4065,7 +4071,7 @@ function isOidcProtocolMode(config) {
|
|
|
4065
4071
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
4066
4072
|
}
|
|
4067
4073
|
|
|
4068
|
-
/*! @azure/msal-common v15.
|
|
4074
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
4069
4075
|
/*
|
|
4070
4076
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4071
4077
|
* Licensed under the MIT License.
|
|
@@ -4075,7 +4081,7 @@ const CcsCredentialType = {
|
|
|
4075
4081
|
UPN: "UPN",
|
|
4076
4082
|
};
|
|
4077
4083
|
|
|
4078
|
-
/*! @azure/msal-common v15.
|
|
4084
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
4079
4085
|
/*
|
|
4080
4086
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4081
4087
|
* Licensed under the MIT License.
|
|
@@ -4126,7 +4132,7 @@ const BROKER_CLIENT_ID = "brk_client_id";
|
|
|
4126
4132
|
const BROKER_REDIRECT_URI = "brk_redirect_uri";
|
|
4127
4133
|
const INSTANCE_AWARE = "instance_aware";
|
|
4128
4134
|
|
|
4129
|
-
/*! @azure/msal-common v15.
|
|
4135
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
4130
4136
|
|
|
4131
4137
|
/*
|
|
4132
4138
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4512,7 +4518,7 @@ function addBrokerParameters(parameters, brokerClientId, brokerRedirectUri) {
|
|
|
4512
4518
|
}
|
|
4513
4519
|
}
|
|
4514
4520
|
|
|
4515
|
-
/*! @azure/msal-common v15.
|
|
4521
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
4516
4522
|
/*
|
|
4517
4523
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4518
4524
|
* Licensed under the MIT License.
|
|
@@ -4524,7 +4530,7 @@ function isOpenIdConfigResponse(response) {
|
|
|
4524
4530
|
response.hasOwnProperty("jwks_uri"));
|
|
4525
4531
|
}
|
|
4526
4532
|
|
|
4527
|
-
/*! @azure/msal-common v15.
|
|
4533
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
4528
4534
|
/*
|
|
4529
4535
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4530
4536
|
* Licensed under the MIT License.
|
|
@@ -4534,7 +4540,7 @@ function isCloudInstanceDiscoveryResponse(response) {
|
|
|
4534
4540
|
response.hasOwnProperty("metadata"));
|
|
4535
4541
|
}
|
|
4536
4542
|
|
|
4537
|
-
/*! @azure/msal-common v15.
|
|
4543
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
4538
4544
|
/*
|
|
4539
4545
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4540
4546
|
* Licensed under the MIT License.
|
|
@@ -4544,7 +4550,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
|
4544
4550
|
response.hasOwnProperty("error_description"));
|
|
4545
4551
|
}
|
|
4546
4552
|
|
|
4547
|
-
/*! @azure/msal-common v15.
|
|
4553
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
4548
4554
|
/*
|
|
4549
4555
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4550
4556
|
* Licensed under the MIT License.
|
|
@@ -4640,7 +4646,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
4640
4646
|
};
|
|
4641
4647
|
};
|
|
4642
4648
|
|
|
4643
|
-
/*! @azure/msal-common v15.
|
|
4649
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
4644
4650
|
|
|
4645
4651
|
/*
|
|
4646
4652
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4746,7 +4752,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
4746
4752
|
},
|
|
4747
4753
|
};
|
|
4748
4754
|
|
|
4749
|
-
/*! @azure/msal-common v15.
|
|
4755
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
4750
4756
|
/*
|
|
4751
4757
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4752
4758
|
* Licensed under the MIT License.
|
|
@@ -4801,7 +4807,7 @@ function delay(t, value) {
|
|
|
4801
4807
|
return new Promise((resolve) => setTimeout(() => resolve(value), t));
|
|
4802
4808
|
}
|
|
4803
4809
|
|
|
4804
|
-
/*! @azure/msal-common v15.
|
|
4810
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
4805
4811
|
|
|
4806
4812
|
/*
|
|
4807
4813
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5063,7 +5069,7 @@ function isAuthorityMetadataExpired(metadata) {
|
|
|
5063
5069
|
return metadata.expiresAt <= nowSeconds();
|
|
5064
5070
|
}
|
|
5065
5071
|
|
|
5066
|
-
/*! @azure/msal-common v15.
|
|
5072
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
5067
5073
|
|
|
5068
5074
|
/*
|
|
5069
5075
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5902,7 +5908,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
5902
5908
|
};
|
|
5903
5909
|
}
|
|
5904
5910
|
|
|
5905
|
-
/*! @azure/msal-common v15.
|
|
5911
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
5906
5912
|
|
|
5907
5913
|
/*
|
|
5908
5914
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5933,7 +5939,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
5933
5939
|
}
|
|
5934
5940
|
}
|
|
5935
5941
|
|
|
5936
|
-
/*! @azure/msal-common v15.
|
|
5942
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
5937
5943
|
|
|
5938
5944
|
/*
|
|
5939
5945
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5952,7 +5958,7 @@ class ServerError extends AuthError {
|
|
|
5952
5958
|
}
|
|
5953
5959
|
}
|
|
5954
5960
|
|
|
5955
|
-
/*! @azure/msal-common v15.
|
|
5961
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
5956
5962
|
/*
|
|
5957
5963
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5958
5964
|
* Licensed under the MIT License.
|
|
@@ -5973,7 +5979,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
|
|
|
5973
5979
|
};
|
|
5974
5980
|
}
|
|
5975
5981
|
|
|
5976
|
-
/*! @azure/msal-common v15.
|
|
5982
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
5977
5983
|
|
|
5978
5984
|
/*
|
|
5979
5985
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6060,7 +6066,7 @@ class ThrottlingUtils {
|
|
|
6060
6066
|
}
|
|
6061
6067
|
}
|
|
6062
6068
|
|
|
6063
|
-
/*! @azure/msal-common v15.
|
|
6069
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
6064
6070
|
|
|
6065
6071
|
/*
|
|
6066
6072
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6080,7 +6086,7 @@ class NetworkError extends AuthError {
|
|
|
6080
6086
|
}
|
|
6081
6087
|
}
|
|
6082
6088
|
|
|
6083
|
-
/*! @azure/msal-common v15.
|
|
6089
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
6084
6090
|
|
|
6085
6091
|
/*
|
|
6086
6092
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6228,7 +6234,7 @@ class BaseClient {
|
|
|
6228
6234
|
}
|
|
6229
6235
|
}
|
|
6230
6236
|
|
|
6231
|
-
/*! @azure/msal-common v15.
|
|
6237
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
6232
6238
|
/*
|
|
6233
6239
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6234
6240
|
* Licensed under the MIT License.
|
|
@@ -6256,7 +6262,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
6256
6262
|
uxNotAllowed: uxNotAllowed
|
|
6257
6263
|
});
|
|
6258
6264
|
|
|
6259
|
-
/*! @azure/msal-common v15.
|
|
6265
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
6260
6266
|
|
|
6261
6267
|
/*
|
|
6262
6268
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6346,7 +6352,7 @@ function createInteractionRequiredAuthError(errorCode) {
|
|
|
6346
6352
|
return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
|
|
6347
6353
|
}
|
|
6348
6354
|
|
|
6349
|
-
/*! @azure/msal-common v15.
|
|
6355
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
6350
6356
|
|
|
6351
6357
|
/*
|
|
6352
6358
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6418,7 +6424,7 @@ class ProtocolUtils {
|
|
|
6418
6424
|
}
|
|
6419
6425
|
}
|
|
6420
6426
|
|
|
6421
|
-
/*! @azure/msal-common v15.
|
|
6427
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
6422
6428
|
|
|
6423
6429
|
/*
|
|
6424
6430
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6500,7 +6506,7 @@ class PopTokenGenerator {
|
|
|
6500
6506
|
}
|
|
6501
6507
|
}
|
|
6502
6508
|
|
|
6503
|
-
/*! @azure/msal-common v15.
|
|
6509
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
6504
6510
|
/*
|
|
6505
6511
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6506
6512
|
* Licensed under the MIT License.
|
|
@@ -6527,7 +6533,7 @@ class PopTokenGenerator {
|
|
|
6527
6533
|
}
|
|
6528
6534
|
}
|
|
6529
6535
|
|
|
6530
|
-
/*! @azure/msal-common v15.
|
|
6536
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
6531
6537
|
|
|
6532
6538
|
/*
|
|
6533
6539
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6591,7 +6597,7 @@ class ResponseHandler {
|
|
|
6591
6597
|
* @param serverTokenResponse
|
|
6592
6598
|
* @param authority
|
|
6593
6599
|
*/
|
|
6594
|
-
async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {
|
|
6600
|
+
async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, apiId, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {
|
|
6595
6601
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.HandleServerTokenResponse, serverTokenResponse.correlation_id);
|
|
6596
6602
|
// create an idToken object (not entity)
|
|
6597
6603
|
let idTokenClaims;
|
|
@@ -6646,7 +6652,7 @@ class ResponseHandler {
|
|
|
6646
6652
|
return await ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenClaims, requestStateObj, undefined, serverRequestId);
|
|
6647
6653
|
}
|
|
6648
6654
|
}
|
|
6649
|
-
await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), request.storeInCache);
|
|
6655
|
+
await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), apiId, request.storeInCache);
|
|
6650
6656
|
}
|
|
6651
6657
|
finally {
|
|
6652
6658
|
if (this.persistencePlugin &&
|
|
@@ -6716,6 +6722,9 @@ class ResponseHandler {
|
|
|
6716
6722
|
? parseInt(serverTokenResponse.refresh_token_expires_in, 10)
|
|
6717
6723
|
: serverTokenResponse.refresh_token_expires_in;
|
|
6718
6724
|
rtExpiresOn = reqTimestamp + rtExpiresIn;
|
|
6725
|
+
this.performanceClient?.addFields({
|
|
6726
|
+
ntwkRtExpiresOnSeconds: rtExpiresOn,
|
|
6727
|
+
}, request.correlationId);
|
|
6719
6728
|
}
|
|
6720
6729
|
cachedRefreshToken = createRefreshTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.refresh_token, this.clientId, serverTokenResponse.foci, userAssertionHash, rtExpiresOn);
|
|
6721
6730
|
}
|
|
@@ -6858,7 +6867,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
6858
6867
|
return baseAccount;
|
|
6859
6868
|
}
|
|
6860
6869
|
|
|
6861
|
-
/*! @azure/msal-common v15.
|
|
6870
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
6862
6871
|
/*
|
|
6863
6872
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6864
6873
|
* Licensed under the MIT License.
|
|
@@ -6876,7 +6885,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {
|
|
|
6876
6885
|
}
|
|
6877
6886
|
}
|
|
6878
6887
|
|
|
6879
|
-
/*! @azure/msal-common v15.
|
|
6888
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
6880
6889
|
|
|
6881
6890
|
/*
|
|
6882
6891
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6898,8 +6907,9 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
6898
6907
|
* API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the
|
|
6899
6908
|
* authorization_code_grant
|
|
6900
6909
|
* @param request
|
|
6910
|
+
* @param apiId - API identifier for telemetry tracking
|
|
6901
6911
|
*/
|
|
6902
|
-
async acquireToken(request, authCodePayload) {
|
|
6912
|
+
async acquireToken(request, apiId, authCodePayload) {
|
|
6903
6913
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientAcquireToken, request.correlationId);
|
|
6904
6914
|
if (!request.code) {
|
|
6905
6915
|
throw createClientAuthError(requestCannotBeMade);
|
|
@@ -6911,7 +6921,7 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
6911
6921
|
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin, this.performanceClient);
|
|
6912
6922
|
// Validate response. This function throws a server error if an error is returned by the server.
|
|
6913
6923
|
responseHandler.validateTokenResponse(response.body);
|
|
6914
|
-
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId);
|
|
6924
|
+
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, authCodePayload, undefined, undefined, undefined, requestId);
|
|
6915
6925
|
}
|
|
6916
6926
|
/**
|
|
6917
6927
|
* Used to log out the current user, and redirect the user to the postLogoutRedirectUri.
|
|
@@ -7111,7 +7121,7 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
7111
7121
|
}
|
|
7112
7122
|
}
|
|
7113
7123
|
|
|
7114
|
-
/*! @azure/msal-common v15.
|
|
7124
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
7115
7125
|
|
|
7116
7126
|
/*
|
|
7117
7127
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7126,7 +7136,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
7126
7136
|
constructor(configuration, performanceClient) {
|
|
7127
7137
|
super(configuration, performanceClient);
|
|
7128
7138
|
}
|
|
7129
|
-
async acquireToken(request) {
|
|
7139
|
+
async acquireToken(request, apiId) {
|
|
7130
7140
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
|
|
7131
7141
|
const reqTimestamp = nowSeconds();
|
|
7132
7142
|
const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority);
|
|
@@ -7134,13 +7144,13 @@ class RefreshTokenClient extends BaseClient {
|
|
|
7134
7144
|
const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
|
|
7135
7145
|
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
|
|
7136
7146
|
responseHandler.validateTokenResponse(response.body);
|
|
7137
|
-
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId);
|
|
7147
|
+
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, undefined, undefined, true, request.forceCache, requestId);
|
|
7138
7148
|
}
|
|
7139
7149
|
/**
|
|
7140
7150
|
* Gets cached refresh token and attaches to request, then calls acquireToken API
|
|
7141
7151
|
* @param request
|
|
7142
7152
|
*/
|
|
7143
|
-
async acquireTokenByRefreshToken(request) {
|
|
7153
|
+
async acquireTokenByRefreshToken(request, apiId) {
|
|
7144
7154
|
// Cannot renew token if no request object is given.
|
|
7145
7155
|
if (!request) {
|
|
7146
7156
|
throw createClientConfigurationError(tokenRequestEmpty);
|
|
@@ -7155,7 +7165,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
7155
7165
|
// if the app is part of the family, retrive a Family refresh token if present and make a refreshTokenRequest
|
|
7156
7166
|
if (isFOCI) {
|
|
7157
7167
|
try {
|
|
7158
|
-
return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true);
|
|
7168
|
+
return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true, apiId);
|
|
7159
7169
|
}
|
|
7160
7170
|
catch (e) {
|
|
7161
7171
|
const noFamilyRTInCache = e instanceof InteractionRequiredAuthError &&
|
|
@@ -7166,7 +7176,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
7166
7176
|
e.subError === Errors.CLIENT_MISMATCH_ERROR;
|
|
7167
7177
|
// if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)
|
|
7168
7178
|
if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {
|
|
7169
|
-
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
|
|
7179
|
+
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false, apiId);
|
|
7170
7180
|
// throw in all other cases
|
|
7171
7181
|
}
|
|
7172
7182
|
else {
|
|
@@ -7175,26 +7185,30 @@ class RefreshTokenClient extends BaseClient {
|
|
|
7175
7185
|
}
|
|
7176
7186
|
}
|
|
7177
7187
|
// fall back to application refresh token acquisition
|
|
7178
|
-
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
|
|
7188
|
+
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false, apiId);
|
|
7179
7189
|
}
|
|
7180
7190
|
/**
|
|
7181
7191
|
* makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached
|
|
7182
7192
|
* @param request
|
|
7183
7193
|
*/
|
|
7184
|
-
async acquireTokenWithCachedRefreshToken(request, foci) {
|
|
7194
|
+
async acquireTokenWithCachedRefreshToken(request, foci, apiId) {
|
|
7185
7195
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, request.correlationId);
|
|
7186
7196
|
// fetches family RT or application RT based on FOCI value
|
|
7187
7197
|
const refreshToken = invoke(this.cacheManager.getRefreshToken.bind(this.cacheManager), PerformanceEvents.CacheManagerGetRefreshToken, this.logger, this.performanceClient, request.correlationId)(request.account, foci, request.correlationId, undefined, this.performanceClient);
|
|
7188
7198
|
if (!refreshToken) {
|
|
7189
7199
|
throw createInteractionRequiredAuthError(noTokensFound);
|
|
7190
7200
|
}
|
|
7191
|
-
if (refreshToken.expiresOn
|
|
7192
|
-
|
|
7193
|
-
DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS
|
|
7194
|
-
this.performanceClient?.addFields({
|
|
7195
|
-
|
|
7201
|
+
if (refreshToken.expiresOn) {
|
|
7202
|
+
const offset = request.refreshTokenExpirationOffsetSeconds ||
|
|
7203
|
+
DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS;
|
|
7204
|
+
this.performanceClient?.addFields({
|
|
7205
|
+
cacheRtExpiresOnSeconds: Number(refreshToken.expiresOn),
|
|
7206
|
+
rtOffsetSeconds: offset,
|
|
7207
|
+
}, request.correlationId);
|
|
7208
|
+
if (isTokenExpired(refreshToken.expiresOn, offset)) {
|
|
7209
|
+
throw createInteractionRequiredAuthError(refreshTokenExpired);
|
|
7210
|
+
}
|
|
7196
7211
|
}
|
|
7197
|
-
// attach cached RT size to the current measurement
|
|
7198
7212
|
const refreshTokenRequest = {
|
|
7199
7213
|
...request,
|
|
7200
7214
|
refreshToken: refreshToken.secret,
|
|
@@ -7205,11 +7219,10 @@ class RefreshTokenClient extends BaseClient {
|
|
|
7205
7219
|
},
|
|
7206
7220
|
};
|
|
7207
7221
|
try {
|
|
7208
|
-
return await invokeAsync(this.acquireToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest);
|
|
7222
|
+
return await invokeAsync(this.acquireToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest, apiId);
|
|
7209
7223
|
}
|
|
7210
7224
|
catch (e) {
|
|
7211
7225
|
if (e instanceof InteractionRequiredAuthError) {
|
|
7212
|
-
this.performanceClient?.addFields({ rtExpiresOnMs: Number(refreshToken.expiresOn) }, request.correlationId);
|
|
7213
7226
|
if (e.subError === badToken) {
|
|
7214
7227
|
// Remove bad refresh token from cache
|
|
7215
7228
|
this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");
|
|
@@ -7320,7 +7333,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
7320
7333
|
}
|
|
7321
7334
|
}
|
|
7322
7335
|
|
|
7323
|
-
/*! @azure/msal-common v15.
|
|
7336
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
7324
7337
|
|
|
7325
7338
|
/*
|
|
7326
7339
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7418,7 +7431,7 @@ class SilentFlowClient extends BaseClient {
|
|
|
7418
7431
|
}
|
|
7419
7432
|
}
|
|
7420
7433
|
|
|
7421
|
-
/*! @azure/msal-common v15.
|
|
7434
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
7422
7435
|
|
|
7423
7436
|
/*
|
|
7424
7437
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7568,7 +7581,7 @@ function extractLoginHint(account) {
|
|
|
7568
7581
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
7569
7582
|
}
|
|
7570
7583
|
|
|
7571
|
-
/*! @azure/msal-common v15.
|
|
7584
|
+
/*! @azure/msal-common v15.14.0 2026-01-13 */
|
|
7572
7585
|
|
|
7573
7586
|
/*
|
|
7574
7587
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8141,6 +8154,8 @@ const ApiId = {
|
|
|
8141
8154
|
acquireTokenByUsernamePassword: 371,
|
|
8142
8155
|
acquireTokenByDeviceCode: 671,
|
|
8143
8156
|
acquireTokenByClientCredential: 771,
|
|
8157
|
+
acquireTokenByOBO: 772,
|
|
8158
|
+
acquireTokenWithManagedIdentity: 773,
|
|
8144
8159
|
acquireTokenByCode: 871,
|
|
8145
8160
|
acquireTokenByRefreshToken: 872,
|
|
8146
8161
|
};
|
|
@@ -8207,7 +8222,7 @@ class NetworkUtils {
|
|
|
8207
8222
|
|
|
8208
8223
|
/* eslint-disable header/header */
|
|
8209
8224
|
const name = "@azure/msal-node";
|
|
8210
|
-
const version = "3.8.
|
|
8225
|
+
const version = "3.8.5";
|
|
8211
8226
|
|
|
8212
8227
|
/*
|
|
8213
8228
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -9998,7 +10013,7 @@ class UsernamePasswordClient extends BaseClient {
|
|
|
9998
10013
|
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
|
|
9999
10014
|
// Validate response. This function throws a server error if an error is returned by the server.
|
|
10000
10015
|
responseHandler.validateTokenResponse(response.body);
|
|
10001
|
-
const tokenResponse = responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request);
|
|
10016
|
+
const tokenResponse = responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, ApiId.acquireTokenByUsernamePassword);
|
|
10002
10017
|
return tokenResponse;
|
|
10003
10018
|
}
|
|
10004
10019
|
/**
|
|
@@ -10173,7 +10188,7 @@ class ClientApplication {
|
|
|
10173
10188
|
const authClientConfig = await this.buildOauthClientConfiguration(discoveredAuthority, validRequest.correlationId, validRequest.redirectUri, serverTelemetryManager);
|
|
10174
10189
|
const authorizationCodeClient = new AuthorizationCodeClient(authClientConfig);
|
|
10175
10190
|
this.logger.verbose("Auth code client created", validRequest.correlationId);
|
|
10176
|
-
return await authorizationCodeClient.acquireToken(validRequest, authCodePayLoad);
|
|
10191
|
+
return await authorizationCodeClient.acquireToken(validRequest, ApiId.acquireTokenByCode, authCodePayLoad);
|
|
10177
10192
|
}
|
|
10178
10193
|
catch (e) {
|
|
10179
10194
|
if (e instanceof AuthError) {
|
|
@@ -10203,7 +10218,7 @@ class ClientApplication {
|
|
|
10203
10218
|
const refreshTokenClientConfig = await this.buildOauthClientConfiguration(discoveredAuthority, validRequest.correlationId, validRequest.redirectUri || "", serverTelemetryManager);
|
|
10204
10219
|
const refreshTokenClient = new RefreshTokenClient(refreshTokenClientConfig);
|
|
10205
10220
|
this.logger.verbose("Refresh token client created", validRequest.correlationId);
|
|
10206
|
-
return await refreshTokenClient.acquireToken(validRequest);
|
|
10221
|
+
return await refreshTokenClient.acquireToken(validRequest, ApiId.acquireTokenByRefreshToken);
|
|
10207
10222
|
}
|
|
10208
10223
|
catch (e) {
|
|
10209
10224
|
if (e instanceof AuthError) {
|
|
@@ -10243,7 +10258,7 @@ class ClientApplication {
|
|
|
10243
10258
|
error.errorCode ===
|
|
10244
10259
|
tokenRefreshRequired) {
|
|
10245
10260
|
const refreshTokenClient = new RefreshTokenClient(clientConfiguration);
|
|
10246
|
-
return refreshTokenClient.acquireTokenByRefreshToken(validRequest);
|
|
10261
|
+
return refreshTokenClient.acquireTokenByRefreshToken(validRequest, ApiId.acquireTokenSilent);
|
|
10247
10262
|
}
|
|
10248
10263
|
throw error;
|
|
10249
10264
|
}
|
|
@@ -10268,7 +10283,7 @@ class ClientApplication {
|
|
|
10268
10283
|
// refresh the access token in the background
|
|
10269
10284
|
const refreshTokenClient = new RefreshTokenClient(clientConfiguration);
|
|
10270
10285
|
try {
|
|
10271
|
-
await refreshTokenClient.acquireTokenByRefreshToken(validRequest);
|
|
10286
|
+
await refreshTokenClient.acquireTokenByRefreshToken(validRequest, ApiId.acquireTokenSilent);
|
|
10272
10287
|
}
|
|
10273
10288
|
catch {
|
|
10274
10289
|
// do nothing, this is running in the background and no action is to be taken upon success or failure
|
|
@@ -10582,7 +10597,7 @@ class DeviceCodeClient extends BaseClient {
|
|
|
10582
10597
|
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
|
|
10583
10598
|
// Validate response. This function throws a server error if an error is returned by the server.
|
|
10584
10599
|
responseHandler.validateTokenResponse(response);
|
|
10585
|
-
return responseHandler.handleServerTokenResponse(response, this.authority, reqTimestamp, request);
|
|
10600
|
+
return responseHandler.handleServerTokenResponse(response, this.authority, reqTimestamp, request, ApiId.acquireTokenByDeviceCode);
|
|
10586
10601
|
}
|
|
10587
10602
|
/**
|
|
10588
10603
|
* Creates device code request and executes http GET
|
|
@@ -11179,7 +11194,7 @@ class ClientCredentialClient extends BaseClient {
|
|
|
11179
11194
|
}
|
|
11180
11195
|
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
|
|
11181
11196
|
responseHandler.validateTokenResponse(serverTokenResponse, refreshAccessToken);
|
|
11182
|
-
const tokenResponse = await responseHandler.handleServerTokenResponse(serverTokenResponse, this.authority, reqTimestamp, request);
|
|
11197
|
+
const tokenResponse = await responseHandler.handleServerTokenResponse(serverTokenResponse, this.authority, reqTimestamp, request, ApiId.acquireTokenByClientCredential);
|
|
11183
11198
|
return tokenResponse;
|
|
11184
11199
|
}
|
|
11185
11200
|
/**
|
|
@@ -11380,7 +11395,7 @@ class OnBehalfOfClient extends BaseClient {
|
|
|
11380
11395
|
const response = await this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId);
|
|
11381
11396
|
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
|
|
11382
11397
|
responseHandler.validateTokenResponse(response.body);
|
|
11383
|
-
const tokenResponse = await responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, undefined, userAssertionHash);
|
|
11398
|
+
const tokenResponse = await responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, ApiId.acquireTokenByOBO, undefined, userAssertionHash);
|
|
11384
11399
|
return tokenResponse;
|
|
11385
11400
|
}
|
|
11386
11401
|
/**
|
|
@@ -11835,7 +11850,7 @@ class BaseManagedIdentitySource {
|
|
|
11835
11850
|
const serverTokenResponse = await this.getServerTokenResponseAsync(response, networkClientHelper, networkRequest, networkRequestOptions);
|
|
11836
11851
|
responseHandler.validateTokenResponse(serverTokenResponse, refreshAccessToken);
|
|
11837
11852
|
// caches the token
|
|
11838
|
-
return responseHandler.handleServerTokenResponse(serverTokenResponse, fakeAuthority, reqTimestamp, managedIdentityRequest);
|
|
11853
|
+
return responseHandler.handleServerTokenResponse(serverTokenResponse, fakeAuthority, reqTimestamp, managedIdentityRequest, ApiId.acquireTokenWithManagedIdentity);
|
|
11839
11854
|
}
|
|
11840
11855
|
/**
|
|
11841
11856
|
* Determines the appropriate query parameter name for user-assigned managed identity
|