Describe the bug
Before the CLI change to 'az login --identity' I 'az login --identity --username' to login and the run 'az aks get-credentials'
Related command
string command = $"-c \"az login --identity --username {manageId} && az aks get-credentials --resource-group {buildInfo.resourceGroupName} --name {buildInfo.clusterName} --overwrite-existing\""; // Command to log in to Azure
// Create a process start info
ProcessStartInfo loginInfo = new ProcessStartInfo
{
FileName = "bash",
Arguments = command,
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false
};
// Create and start the process
using (Process process = new Process())
{
process.StartInfo = loginInfo;
process.Start();
string output = process.StandardOutput.ReadToEnd();
string error = process.StandardError.ReadToEnd();
// Wait for the process to exit
process.WaitForExit();
// Check exit code
int exitCode = process.ExitCode;
if (exitCode == 0)
{
// Command executed successfully
Console.WriteLine("Command executed successfully");
Console.WriteLine($"Output: {output}");
}
else
{
// Command failed
Console.WriteLine($"Command failed with exit code {exitCode}");
Console.WriteLine($"Error output: {error}");
}
}
Errors
ERROR: Failed to connect to MSI. Please make sure MSI is configured correctly.
Error occurs even after updating the command to use '--client-id'
Issue script & Debug output
N/A
Expected behavior
Expected to be able to login to azure cli
Environment Summary
Whatever version of CLI is running inside Azure Container App
Additional context
No response
Describe the bug
Before the CLI change to 'az login --identity' I 'az login --identity --username' to login and the run 'az aks get-credentials'
Related command
Errors
ERROR: Failed to connect to MSI. Please make sure MSI is configured correctly.
Error occurs even after updating the command to use '--client-id'
Issue script & Debug output
N/A
Expected behavior
Expected to be able to login to azure cli
Environment Summary
Whatever version of CLI is running inside Azure Container App
Additional context
No response