Export logic app doesn't fetch subscriptions from second tenant

Open
#1,971 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
azure, typescript, vscode
Domain
cloud, devtools

Research direction

Start with the VS Code Azure "Export Logic App" flow and reproduce the POST to Azure Resource Graph shown in the issue, using Developer: Toggle Developer Tools or Postman. Trace how the request is scoped to tenants; done means subscriptions from the second visible tenant are returned as well as those from the primary tenant.

Written by the indexing model from the issue text.

Description

Hi,

I’m trying to export a Logic App (Consumption to Standard) using the "Export Logic App" feature in VS Code (Azure > Workspace > Export Logic App...). However, I’m unable to see any subscriptions from my second tenant, even though that tenant is visible under Accounts & Tenants in the Azure extension.

To investigate further, I used Developer: Toggle Developer Tools to inspect the request being made by VS Code. I replicated the same request in Postman and got the same result — only the subscriptions from my primary tenant are returned.

Here are the request details:

Method: POST

URL: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2021-03-01

Request Body:
{
"query": "resourcecontainers | where type == 'microsoft.resources/subscriptions' | join kind=leftouter (securityresources | where properties.environment == 'Azure' and properties.displayName == 'ASC score') on subscriptionId | extend subscriptionName=name | project id, subscriptionId, subscriptionName|sort by (tolower(tostring(subscriptionName))) asc"
}

It seems the request is only scoped to the default tenant. Could you please advise how to include subscriptions from the second tenant, or if there’s a way to explicitly scope the request across tenants?

Thanks.

Dominant language
TypeScript
Stars
144
Forks
82
Avg merge
18h 7m
Merged PRs (30d)
8

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode-azuretools

All issues in microsoft/vscode-azuretools

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.