New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to test user interactive login due to: Your device is required to be managed to access this resource
#1029
Comments
@HadwaAbdelhalem can you try these terraform templates from codespaces? |
@HadwaAbdelhalem to try these terraform templates from Codespaces and will provide an update. |
@hattan and I looked into this issue turned out to be related to a managed device policy on the target subscription. In order to use AZ CLI authentication for terraform, azurerm calls az ad signed-in-user show cmd which was failing due to code space not being a managed device. The workaround is to use a service principal for Terraform Auth by setting the below arm env vars inside the code space before running azd up or provision commands:
more details available here please test it and let me know. |
@HadwaAbdelhalem - We have tested it to use service principal for Terraform Auth and it works fine in |
Your device is required to be managed to access this resource
@danieljurek @rajeshkamal5050 We likely want to create a separate AAD tenant to be able to test user login scenarios in |
I also run into this on todo-python-mongo (non-terraform) when trying to login with my @microsoft.com account inside Codespaces:
It was fine with my non-microsoft.com account. |
@pamelafox , You can use this workaround: #1006 (comment) |
@danieljurek This issue also occurs in the following cases, and this issue can be solved by logging in with the service principle and setting the following arm env vars. More details check here.
|
Is it fixed in latest CLI yet? |
@myurasov Terraform templates needs to install |
Describe the issue:
Azure Dev deploys failed for
todo-python-mongo-terraform
andtodo-nodejs-mongo-terraform
Repro Steps:
Run command:
bash ./test-templates.sh -t <template_name> -b staging -c false
.Error Message:
Environment:
OS: linux, codespaces, DevContainer in VS Code
Template:
https://github.com/Azure-Samples/todo-python-mongo-terraform
https://github.com/Azure-Samples/todo-nodejs-mongo-terraform
Branch: staging
Azd version: 0.3.0-beta.6-daily.1947218 (commit e20ee4e)
Expected behavior:
Azure Dev deploys successfully for todo-python-mongo-terraform and todo-nodejs-mongo-terraform.
@rajeshkamal5050 for notification.
The text was updated successfully, but these errors were encountered: