Skip to content
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

Feature Request: Tenant-Specific Subscription Management #37

Open
lonix opened this issue Aug 12, 2024 · 6 comments
Open

Feature Request: Tenant-Specific Subscription Management #37

lonix opened this issue Aug 12, 2024 · 6 comments

Comments

@lonix
Copy link

lonix commented Aug 12, 2024

Summary:
As a user managing multiple Azure subscriptions on behalf of various customers, I would like the ability to view and organize subscriptions by Tenant in my portfolio. This would significantly improve usability when dealing with a large number of subscriptions.

Description:
I manage numerous Azure subscriptions across multiple tenants. It would be highly beneficial to have the option to display the Tenant in its own column within the subscription management interface. Ideally, subscriptions could also be grouped by Tenant, allowing for more efficient navigation and management.

In an ideal scenario, I envision a workflow where I can first select a Tenant and then choose from the associated subscriptions. This hierarchical selection process would streamline the management experience, particularly for users handling a large number of subscriptions.

Considerations:

•	The ability to view subscriptions grouped by Tenant might not be relevant to all users, so it could be offered as an optional feature.
•	Implementing a “Select Tenant -> Select Subscription” workflow could significantly enhance the user experience for those managing multiple tenants.

Conclusion:
This feature would greatly enhance the management of multiple Azure subscriptions by simplifying navigation and improving the organization. The current product is already excellent, and this enhancement would make it even better.

@riweston
Copy link
Owner

I really like this idea! 👍

I'm thinking about how best to implement this, few ideas;

  • Run aztx --by-tenant or something like this and then start the program by selecting the tenant first as you've proposed
  • Start the program normally with an additional column indicating the parent tenant (this could also be configurable to show/hide)
  • Start the program normally and have a hotkey to filter by tenant and then, once selected, filter by subscription

Something else to consider is that this program manipulates the config file in $HOME/.azure/azureProfile.json and something that I've noticed, at least in my case, is that I have access to a couple of Azure environments and one is quite locked down so I can't see the tenantDisplayName field. I've sanitised the contents but take a look at this...

azureProfile.json snippet
{
  "subscriptions": [
    {
      "id": "11111111-1111-1111-1111-111111111111",
      "name": "N/A(tenant level account)",
      "state": "Enabled",
      "user": { "name": "[email protected]", "type": "user" },
      "isDefault": false,
      "tenantId": "11111111-1111-1111-1111-111111111111",
      "environmentName": "AzureCloud"
    },
    {
      "id": "22222222-2222-2222-2222-222222222222",
      "name": "N/A(tenant level account)",
      "state": "Enabled",
      "user": { "name": "[email protected]", "type": "user" },
      "isDefault": false,
      "tenantId": "22222222-2222-2222-2222-222222222222",
      "environmentName": "AzureCloud"
    },
    {
      "id": "33333333-3333-3333-3333-333333333333",
      "name": "User2 MSDN",
      "state": "Enabled",
      "user": { "name": "[email protected]", "type": "user" },
      "isDefault": true,
      "tenantId": "44444444-4444-4444-4444-444444444444",
      "environmentName": "AzureCloud",
      "homeTenantId": "44444444-4444-4444-4444-444444444444",
      "tenantDefaultDomain": "company.com",
      "tenantDisplayName": "CompanyName",
      "managedByTenants": []
    }
  ],
  "installationId": "55555555-5555-5555-5555-555555555555"
}

As you can see in the first 2 subscriptions the tenantDisplayName field is missing we'd need consider whether to present the tenantId UUID field in the tenant selector (which obviously isn't very friendly or readable) or just group all the subscriptions together that don't have a tenantDisplayName field for better usability.

Would be keen to get your thoughts!

@lonix
Copy link
Author

lonix commented Sep 3, 2024

I Can see that in my case, not a single instance of the variable tenantDisaplyName even exists. making it either a "Group only" or the need for the user to create a custom map of tenantID > tenantDisplayName. perferably though i would personally like to not use parameters when i launch the application myself.

@riweston
Copy link
Owner

riweston commented Sep 3, 2024

Interesting idea...so maybe a hotkey combo like Ctrl + N that lets you nickname the IDs?

@lonix
Copy link
Author

lonix commented Sep 3, 2024

That could work, but at this point, i think we need to go towards a ".config" file to store this outside memory right ?

@riweston
Copy link
Owner

riweston commented Sep 3, 2024

There is already a config file generated in your profile that's used to track the previously subscription context for switching back and forth so I think I could just lean on that to additionally track any custom names and/or configuration options like "always select the tenant first" for instance 🤔

@lonix
Copy link
Author

lonix commented Sep 10, 2024

Seems valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants