[BUG] Cross-tenant operations are not working properly
- Vorherrschende Sprache
- PowerShell
- Sterne
- 273
- Forks
- 117
- Ø Merge
- 1 Std.
- Gemergte PRs (30 T.)
- 2
Beschreibung
## To Reproduce
Be logged into a tenant where the user has cross-tenant access to a subscription on another tenant.
1 Login tenant from remote VNET
az login --tenant "xxxxx"
2 Displays the expected sub for the remote VNET
az account list -o table
3 Context for hub subscription
az account set --subscription "xxx"
4 Connect vnet to hub
az network vhub connection create --resource-group "abc" --name "vnet-name" --vhub-name "xyz" --remote-vnet "/subscriptions/xxxx/resourceGroups/abc/providers/Microsoft.Network/virtualNetworks/test-vnet"
## Observed Behavior

(LinkedAuthorizationFailed) The client has permission to perform action 'Microsoft.Network/virtualNetworks/peer/action' on scope '/subscriptions/xxx/resourceGroups/abc/providers/Microsoft.Network/virtualHubs/xyz/hubVirtualNetworkConnections/vnet-name', however the current tenant 'xxxxx' is not authorized to access linked subscription 'xxxxxx'.
Code: LinkedAuthorizationFailed
Message: The client has permission to perform action 'Microsoft.Network/virtualNetworks/peer/action' on scope '/subscriptions/xxxxx/resourceGroups/abc/providers/Microsoft.Network/virtualHubs/xyz/hubVirtualNetworkConnections/vnet-name', however the current tenant 'xxxx' is not authorized to access linked subscription 'xxxxx'.
## Expected behavior
`az network vhub` connection create command to run successfully.
## Is this specific to Cloud Shell?
Yes. This is working locally. Issue appears in both Cloud Shell bash and powershell.
## Interface information
portal.azure.com
## Additional context
Add any other context about the problem here.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, die Sequenz aus az login, az account list, az account set und az network vhub connection create in Cloud Shell bash und PowerShell zu reproduzieren und sie anschließend mit einer lokalen Ausführung zu vergleichen. Als erledigt gilt die Aufgabe, wenn der Befehl zum Erstellen der mandantenübergreifenden vhub-Verbindung für das Remote-VNET erfolgreich ist, anstatt LinkedAuthorizationFailed zurückzugeben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- azure, bash, powershell
- Bereich
- authentication, authorization, cli, cloud
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100