-
Notifications
You must be signed in to change notification settings - Fork 68
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
VSCodeAzureSubscriptionProvider.getSubscriptions return empty #1815
Comments
Hi @jianyexi, yes this seems like an issue we need to fix. Have you found a workaround yet or do you need me to investigate and unblock you? If you need, reach out to me on Teams. |
@alexweininger No, I can't find a workaround, I am considering to implement the function of listing subscriptions through the ARM Management SDK, but I will appreciate if it could be fixed in short time. |
@jianyexi, can you check if your issue is fixed in v3.0.1? https://github.com/microsoft/vscode-azuretools/releases/tag/microsoft-vscode-azext-azureauth-v3.0.1 |
@alexweininger no, The getSessionFromVSCode method returns null in my case because my extension logs in without specifying a tenantId. I propose the following fallback logic:
|
I don't think this is possible, If the user needs to sign in to a specific tenant in order to list subscriptions, we're going to need you to handle that in your extension. We can work together for a better solution in the long term, but until then we need you to handle that on your own. There are some methods in the auth package that can help you do this, for example |
This issue is fixed by #1827 |
When sign in with below code , the VSCodeAzureSubscriptionProvider.isSignedIn() return true,
But the
VSCodeAzureSubscriptionProvider.getSubscriptions()
return empty, as below code will always return false. I think we need to improve theVSCodeAzureSubscriptionProvider.isSignedIn
method to handle the current signed tenantId in this case as wellvscode-azuretools/auth/src/VSCodeAzureSubscriptionProvider.ts
Line 111 in f92ce31
The text was updated successfully, but these errors were encountered: