зеркало из
1
0
Форкнуть 0

fix: Correct AzureCliCredential precedence

This commit is contained in:
Tatsuro Shibamura 2023-11-04 16:43:54 +09:00
Родитель add1644cf7
Коммит bc8803181f
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -63,12 +63,14 @@ export async function authenticateWithAzureIdentity(details: LoginDetails = {},
const environmentCredential = new EnvironmentCredential();
const azureCliCredential = new AzureCliCredential();
const azureCliCredential = new AzureCliCredential({
tenantId: details.clientId,
});
// Only use interactive browser credential if we're not running in docker
const credentials = isRunningInDocker()
? [azureCliCredential, environmentCredential, deviceCredential]
: [azureCliCredential, environmentCredential, browserCredential, deviceCredential];
? [environmentCredential, azureCliCredential, deviceCredential]
: [environmentCredential, azureCliCredential, browserCredential, deviceCredential];
if (details.tenantId && details.clientId && details.clientSecret) {
const clientSecretCredential = new ClientSecretCredential(details.tenantId, details.clientId, details.clientSecret, {