@azure/identity 4.5.0-alpha.20240820.1 → 4.5.0-alpha.20240822.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist-esm/src/credentials/managedIdentityCredential/index.js.map +1 -1
- package/dist-esm/src/credentials/managedIdentityCredential/msalMsiProvider.js +5 -2
- package/dist-esm/src/credentials/managedIdentityCredential/msalMsiProvider.js.map +1 -1
- package/dist-esm/src/index.js.map +1 -1
- package/package.json +3 -3
- package/types/identity.d.ts +20 -2
package/dist/index.js
CHANGED
@@ -2174,9 +2174,11 @@ class MsalMsiProvider {
|
|
2174
2174
|
_options = clientIdOrOptions !== null && clientIdOrOptions !== void 0 ? clientIdOrOptions : {};
|
2175
2175
|
}
|
2176
2176
|
this.resourceId = _options === null || _options === void 0 ? void 0 : _options.resourceId;
|
2177
|
+
this.objectId = _options === null || _options === void 0 ? void 0 : _options.objectId;
|
2177
2178
|
// For JavaScript users.
|
2178
|
-
|
2179
|
-
|
2179
|
+
const providedIds = [this.clientId, this.resourceId, this.objectId].filter(Boolean);
|
2180
|
+
if (providedIds.length > 1) {
|
2181
|
+
throw new Error(`ManagedIdentityCredential - only one of 'clientId', 'resourceId', or 'objectId' can be provided. Received values: ${JSON.stringify({ clientId: this.clientId, resourceId: this.resourceId, objectId: this.objectId })}`);
|
2180
2182
|
}
|
2181
2183
|
// ManagedIdentity uses http for local requests
|
2182
2184
|
_options.allowInsecureConnection = true;
|
@@ -2188,6 +2190,7 @@ class MsalMsiProvider {
|
|
2188
2190
|
managedIdentityIdParams: {
|
2189
2191
|
userAssignedClientId: this.clientId,
|
2190
2192
|
userAssignedResourceId: this.resourceId,
|
2193
|
+
userAssignedObjectId: this.objectId,
|
2191
2194
|
},
|
2192
2195
|
system: {
|
2193
2196
|
// todo: proxyUrl?
|