-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
Auto-AssignAuto assign by botAuto assign by botContainer Instancesaz containeraz containerContainerAppService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Milestone
Description
az feedbackauto-generates most of the information requested below, as of CLI version 2.37.0
Related command
az login --identity
Describe the bug
Running azure-cli in ContainerApps with MSI, both System assigned and User assigned, but az login --identity failed with 405.
Failed to connect to MSI. Please make sure MSI is configured correctly.
Get Token request returned: <Response [405]>
To Reproduce
- Prepare ResourceGroup
foo. - Prepare ContainerApps Environment
bar. - Save YAML as follows, please replace xxxx with your subscription id.
kind: containerapp
location: japaneast
name: azure-cli
resourceGroup: foo
type: Microsoft.App/containerApps
identity:
type: "systemAssigned"
properties:
managedEnvironmentId: "/subscriptions/xxxx/resourceGroups/foo/providers/Microsoft.App/managedEnvironments/bar"
configuration:
activeRevisionsMode: Single
template:
containers:
- image: "mcr.microsoft.com/azure-cli"
name: azure-cli
command:
["/bin/bash", "-c", "while true; do ping localhost; sleep 60;done"]
resources:
cpu: 0.25
memory: 0.5Gi
scale:
minReplicas: 1
maxReplicas: 1- Deploy Container App.
az containerapp create -n "azure-cli" -g "foo" --yaml ./deploy/containerapp/azure-cli.yaml
- (optional) Assign UserAssignedIdentity if needed.
az containerapp identity assign --name "azure-cli" --resource-group "foo" --user-assigned "/subscriptions/xxxxx/resourceGroups/foo/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<YOUR_ID>"
- Go to
consolein Container App side Menu. - Run
az login --identity. You will find error message describe about.
Expected behavior
Managed Identity can be use for az login as describe in doc.
Environment summary
Docker
Additional context
# az --version
azure-cli 2.37.0
core 2.37.0
telemetry 1.0.6
Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1
Python location '/usr/local/bin/python'
Extensions directory '/root/.azure/cliextensions'
Python (Linux) 3.10.4 (main, Apr 20 2022, 01:09:52) [GCC 10.3.1 20211027]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
GoodmanBen, tap1992, turbut, nlevee, jaromirmikulik and 7 more
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botContainer Instancesaz containeraz containerContainerAppService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.