-
Notifications
You must be signed in to change notification settings - Fork 449
[BUG] Unable to use Azure CLI as not installed on image #1809
Copy link
Copy link
Open
Labels
customer-reportedneeds-team-attentionWorkflow: This issue needs attention from Azure service team or MCP team.Workflow: This issue needs attention from Azure service team or MCP team.packages-DockerDocker container / setup installerDocker container / setup installerquestionFurther information is requestedFurther information is requestedserver-Azure.McpAzure.Mcp.ServerAzure.Mcp.Server
Milestone
Metadata
Metadata
Assignees
Labels
customer-reportedneeds-team-attentionWorkflow: This issue needs attention from Azure service team or MCP team.Workflow: This issue needs attention from Azure service team or MCP team.packages-DockerDocker container / setup installerDocker container / setup installerquestionFurther information is requestedFurther information is requestedserver-Azure.McpAzure.Mcp.ServerAzure.Mcp.Server
Type
Projects
Status
Not Started
Describe the bug
Unable to use Azure CLI auth with ~/.azure mapped without Azure CLI installed on the image.
I've extended the image with AzCLI installed and it works.
Based on https://github.com/microsoft/mcp/blob/main/servers/Azure.Mcp.Server/TROUBLESHOOTING.md#use-specific-credentials-only
AZURE_TOKEN_CREDENTIALS=AzureCliCredentialshould work and so Azure CLI should be included in the image.Expected behavior
calling:
docker run -it --rm --volume /home/user/.azure:/root/.azure --env AZURE_TOKEN_CREDENTIALS=AzureCliCredential mcr.microsoft.com/azure-sdk/azure-mcp:latestshould authenticate based on token from user previously running:
az loginand start containerActual behavior
container exits with below in logs
{ "status": 401, "message": "Authentication failed. Please run 'az login' to sign in to Azure. Details: Azure CLI not installed. To mitigate this issue, please refer to the
troubleshooting guidelines here at https://aka.ms/azmcp/troubleshooting.", "results": { "message": "Azure CLI not installed", "type": "CredentialUnavailableException" },
"duration": 0 }
Reproduction Steps
az logindocker run -it --rm --volume /home/user/.azure:/root/.azure --env AZURE_TOKEN_CREDENTIALS=AzureCliCredential mcr.microsoft.com/azure-sdk/azure-mcp:latestEnvironment
WSLv2 RHEL8 Bash Docker 29.2.1 Azure CLI 2.83.0 mcr.microsoft.com/azure-sdk/azure-mcp:latest