Azure / Azure/azure-cli

az network bastion rdp - Command ignores current tenant

Open
#26,451 2 comments 2 reactions 0 assignees View on GitHub
act-quality-productivity-squad Auto-Assign Azure CLI Team customer-reported Network Network - Bastion question
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Related command**

az network bastion rdp --name bastion-name --resource-group rg-name --target-resource-id /subscriptions/subid/resourceGroups/vm-aad-bakic/providers/Microsoft.Compute/virtualMachines/vm-aad-test --enable-mfa true

**Describe the bug**
When login is attempted following error is displayed.
![image](https://github.com/Azure/azure-cli/assets/88879268/b93100aa-f1e2-4ba6-9892-275af632825c)

**To Reproduce**
Create resources as instructed in:

1. https://learn.microsoft.com/en-us/azure/bastion/connect-native-client-windows
2. Assign VM User Login and/or VM Admin Login IAM roles to user invited to tenant
3. az login --tenant "tenantid-where-vm-and-bastion-are"
4. az account set --subscription "sunscriptionid-where-vm-and-bastion-are"
5. Run az network bastion rdp as instructed above
6. In login screen select email account which was added to VM tenant

**Expected behavior**
Being able to login to VM using AAD authentication.

**Environment summary**
Windows 11 21H2

"azure-cli": "2.48.1",
"azure-cli-core": "2.48.1",
"azure-cli-telemetry": "1.0.8",
"extensions": {
"account": "0.2.5",
"bastion": "0.2.4"

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.