Closed ctolkien closed 1 year ago
Hello @ctolkien
While we investigate this error, can you try running this: azd config set auth.useAzCliAuth "true"
This will make azd
to use the Azure cli
for authentication (as it used to be before version 0.5.0).
I assume you don't have this issue when working with the Azure cli
(i.e. az login --tenant-id XXXXX
) , right?
Some other questions.. can you tell if the name of the Tenant you are trying to authenticate contains some special characters ?
@weikanglim @wbreza , the signal error: signal 0xc0000005
means Access violation
.
Since the error is coming from:
sort.Slice(tenants, func(i, j int) bool {
return *tenants[i].DisplayName < *tenants[j].DisplayName
})
I assume that the tenants client is not setting the DisplayName
for one of the subs. (Might be related to the Delegated Admin Permissions
).
While we investigate this error, can you try running this:
azd config set auth.useAzCliAuth "true"
OK I think the plot is a little bit thicker (I actually had that config set from 0.5 to allow us to deploy to other tenants, but had removed it).
az login --tenant anothertenant
and then attempt to azd provision
resources, we are hitting auth errors during deployment which clearly indicate that we are not using the login credentials from the other tenant, but from my home tenant.azd logout
and then try to provision again, it crashes as per my OP.az
does not fix the above crash, I also need to login again to azd
.azd login
now also crashes. Same call stack.Noting this worked in 0.3 OK, and in 0.5 it also worked with auth.useAzCliAuth "true"
I assume you don't have this issue when working with the Azure cli (i.e. az login --tenant-id XXXXX) , right?
Correct, az cli works fine. Noting that they use --tenant as their param name (would be good to be aligned, but I digress).
can you tell if the name of the Tenant you are trying to authenticate contains some special characters ?
Nothing special.
MASSIVE EDIT - I was totally wrong, here is a sample anyway
Sample response when I az login --tenant foo.onmicrosoft.com
:
[
{
"cloudName": "AzureCloud",
"homeTenantId": "tenantId of the tenant I have logged into",
"id": "id of the subscription listed below",
"isDefault": true,
"managedByTenants": [
{
"tenantId": "my home tenant id"
}
],
"name": "SubscriptionName",
"state": "Enabled",
"tenantId": "tenantId of the tenant I have logged into",
"user": {
"name": "my email",
"type": "user"
}
}
]
Output from
azd version
azd version 0.6.0-beta.2 (commit c4a201e55a13eba77f9037b296a90e0f81b00dbe)Output from
az version
Describe the bug Crash after logging into another tenant, I can type the command, it pops a browser, I can login in the browser successfully, and it briefly displays "Retrieving subscriptions" before crashing with the below stack trace:
To Reproduce
azd login --tenant-id <anotherTenantHostname>
Expected behavior Not crash?
Additional context Note that we are CSP Indirect Provider. Access is being provided via Delegated Admin Permissions.