-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add listSubscriptions to resourceApi #829
Conversation
Which provider did you try to add it to? |
I added it to |
Why do we need this vs. using the auth package? |
I need a way to list the filtered subscriptions to create my own Resources also controls the tenant/subscription filter settings, so I thought it made more sense for it to deliver the list to the clients. |
I'd still lean toward using the auth package since it internally handles the subscription filters. Also, at a minimum we should designate this API as meant for internal use; I don't want Azure Resources becoming a de facto Azure Account extension. Perhaps we could implement it on the on the extension's API but not declare it in utils. |
So I was exploring this-- it seems like I could create a Do you know if there's a way around this? I think for usability, having the user sign in again is a no-go. I'm cool with not exposing it in the API. |
There is not a way around that, it's very intentional on the part of VSCode's auth model that each extension has to explicitly get permission to use an account. That degraded UX makes sense though, I think it's OK to expose this |
Do you mean like this? |
Spot on! |
Relies on microsoft/vscode-azuretools#1703
I was trying to add a
getSubscription
function on the provider itself, but for some reason,getAzureSubscriptionProvider
kept throwing an error, saying that it wasn't a function. 🤷I'm okay with my current solution, but was really confused as to why it wasn't working.