Visual Studio not finding my Azure subscriptions
Asked Answered
I

14

51

I have a working Azure account with various services already running. I receive monthly bills for these.

Now, I created a workerrole in Visual Studio that I want to deploy. I get the "Publish Windows Azure Application" screen that asks me to sign in. After I sign in, I get the message that I don't have a subscription:

"Sorry but we didn't find any Windows Azure Subscriptions associated with your account. You can sign in with a different account or sign up for a Windows Azure subscription".

Using a browser I can login in the Azure Portal with the same username/password. I can view my subscription, billing statments, etc.

When logging in I get a message to choose between "Organisational account" or "Microsoft account". It does not make a difference which I choose.

Inkblot answered 1/7, 2014 at 10:8 Comment(0)
R
82

I had the same issue, as other members said, it's a cache issue.

SOLUTION:

In visual studio, Top-right button with your credentials:

  • Click on account settings
  • In "All accounts" section, "Remove" all your accounts
  • In "Personalization Account", Sign out (EDIT:This step is no longer required)
  • Restart visual studio (EDIT: This step is no longer required)
  • Re-enter your credentials

Now your subscriptions should appear.

Rahr answered 9/3, 2016 at 13:41 Comment(8)
Didn't work for me. VS still didn't recognize that I had an Azure subscription after both removing all accounts (which, btw, automatically signs you out), restarting VS, then signing in again.Comedo
Also make sure that you choose the right option when asked for Organization ID/ Personal ID. Mine worked when selecting Personal ID.Data
for me it helped just to logout and login in VSHaya
Yes! This is the first Azure thing I've dealt with that actually worked out on the first try! Thanks!Leibniz
I didn't need to restart Visual Studio. Just removing and adding back the account worked.Towline
In VS for mac, restart VS, sign out and sign in then load your solution.Wench
Same restarting is not needed, just removed account and added it back in.Smew
I could connect to all my subscriptions, except one. I found that you can go to the 'All Accounts' section, and there is an 'Apply filter...' setting. Make sure the subscription you're trying to access is checked. It sems that newly added ones are not by default.Terenceterencio
C
20

So I stumbled upon this question and I had the latest Azure SDK (2.8.2 at this time) installed. My default directory and subscription would show up and not the other ones I had access to. I was using VS 2015 Enterprise. So clicking on the top right Corner on my account inside Visual Studio 2015 and clicking on "Account settings" took me here:

Apply Filter

I located the option "Apply Filter". This option only appears if your Visual Studio credentials are not stale. Otherwise, it says "Renenter your credentials" and only after that this option re-appears on the "Account Settings" inside Visual Studio 2015.

Click on the "Apply Filter" and a new form shows up as shown below:

Direcory Filter

Please note that it might take a while for Visual Studio to query and populate all the azure directories to which you have access to. Clicking the dropdown list a few times might help if you are eager enough. Select the directory you want to set as default. and Click the "Apply" button.

A window might appear asking you to re-enter your Microsoft Account credentials. Enter the Credentials and click signin to complete the process.

Re-enter your credentials

Visual Stdio might do some processing before the switch process completes as shown. Processing the Directory-switch operation

Once that is done, you are taken back to the form where you applied the filter. Now the filtered directory should be shown as below:

enter image description here

Close the form and restart Visual Studio. Hope that this helps.

Cynthla answered 9/2, 2016 at 12:58 Comment(1)
this more or less worked for me. I basically removed my account from "All Accounts" and then readded it just to the Microsoft Account. Left the personalization blank. Works like a charm. That said, the azure tools basically show nothing useful lol.Choirmaster
T
16

After trying every solution in this question, I was still not seeing my subscription. My solution:

  1. Log into Azure subscription
  2. Create a new Web App
  3. Open the new Web App
  4. In the top menu select Get publish profile

GetPublishProfileButton

  1. Open the web app project in Visual Studio 2017 that you wish to publish
  2. Right click the Project in Solution Explorer, and select publish
  3. Scroll right to find Import Profile and select the file downloaded in step 4
  4. Click Publish

Now when I go into publish, the subsription is displayed, and all the connection information is saved.

Tokoloshe answered 3/5, 2017 at 15:56 Comment(5)
The other answers didn't work for me either so I had to use this solution to publish to Azure.Magocsi
All the above answers didn't work for me either, but this one did. It's amazing how it's 2019 and this still doesn't work given how much MS is pushing Azure within VS.Krypton
I ended up using the Publishing Profile too in the endIotacism
This should be voted up higher - I couldn't get anything above to work. While this doesn't technically solve the requested problem, it achieves the actual result I wanted.Arsenate
@JasonD This may be too simplistic of an idea, but did you compile the web app project before trying to get publish profile?Tokoloshe
M
13

None of these answers seemed to work for me either. I was able to see my subscription but had no resource groups or resources listed. To solve this I followed this answer and went to Tools - Options - Environment - Accounts and changed Add and reauthenticate accounts using: to System web browser.

enter image description here

After doing this, signing out, closing VS and signing back in again I was able to authenticate properly and view/manage all Azure resources.

Monogamous answered 26/7, 2021 at 11:52 Comment(2)
Worked after trial and error, but it's clearly caching issue. I am able to login to Azure account but App Service tab still shows "Sign In" button and the next button is disabled so cannot go further to publish. Tried logout and login so many times but no luck finally changed to System web browser still didn't work then changed back Embedded browser but don't know the issue but it worked finally.Blastosphere
It depends on type of account. I found that this is working on personal account as this account shows up when using default browser. The embedded web browser had a different set of credentials stored. I was not able to add a personal account here, but a company account was accepted and working. Seems like the different solutions shall state the type of account it works for to avoid confusion.Duggan
N
7

You found the solution to your problem. I had the same symptom, but the solution was another:

You need to go to Extensions and Updates and then update the Microsoft Azure SDK 2.8. After that, I could login and see the subscription (for my case it was a DreamSpark subscription)

This following site, which is about free Azure for DreamSpark (students), actually says that Visual Studio 2013 is not supported, only VS 2015 Community, but it works for me - if I update the Azure SDK as written above. http://blogs.msdn.com/b/microsoft_student_developer_blog/archive/2015/04/09/using-microsoft-azure-for-students.aspx

Microsoft Azure SDK 2.8 (if you cannot find it in Extensions and Updates some time from now): https://azure.microsoft.com/en-us/blog/announcing-the-azure-sdk-2-7-for-net/

Nones answered 25/11, 2015 at 17:59 Comment(0)
S
5

All methods here did not work for me. What did finaly do the trick was connecting through Server Explorer tab.

Subtonic answered 2/2, 2017 at 11:1 Comment(1)
This answer worked for me...some more details: From the Server Explorer tab, right click on the Azure item > click 'Connect To Microsoft Azure Subscription' > Log in again, and boom, it shows my subscriptions now.Moonstruck
I
3

Some caching issue between the different Azure and SPOnline account that I'm using.

To solve: I logged out from all my Azure and SharePoint Online sites. Cleared my browser cache. Restarted the browser and login with the desired Azure account. After this Visual Studio found the Azure subscriptions again..

Inkblot answered 10/7, 2014 at 12:6 Comment(0)
D
2

I realise VS Code isn't the same as Visual Studio, but this question comes up first when searching for Visual Studio Code so I thought I'd post my findings here.

I had the same symptoms with VS Code on Ubuntu and I think it's to do with the 2FA that Azure uses (i.e. when it sends you an SMS to verify).

What happened was that VS Code fired up the default browser for me to log in, I put in my username and password and the screen said "you can now close this window" but it never prompted for 2FA. After that, VS Code always said "you have no subscriptions".

How I fixed it was:

  1. sign out of Azure from inside VS Code (use control-shift-p and search for "Azure: sign out"

  2. Open up the web browser manually and sign in properly using 2FA

  3. go back to VS Code and sign in again

Darceldarcey answered 11/4, 2020 at 14:23 Comment(0)
V
1

For me I was having trouble with my Gov Cloud account, and I had to take the following steps to see my subscription (even though without this it would still let me sign in, but no subscriptions would ever be linked).

  1. Tools\Options\Environment\Accounts
  2. Add a Registered Azure Cloud
  3. Sign out of all accounts, and sign back in using your Gov Cloud credentials.

enter image description here

Vacant answered 11/9, 2019 at 13:30 Comment(2)
I'm in the same boat as you but your solution doesn't work for me.Nether
It appeared not to work for we as well, however, I just needed to remove, and re-add the US Gov account in VS. Then, I was able to see the subscriptions.Scoundrelly
O
1

Finally I'm logged in. It took 3 hours and going through all of the solutions proposed above. What worked for me was:

  1. Logout from your O365 account in VS and close it.
  2. Clear browser cache and re-start the browser and login to your Azure sub.
  3. Fire up VS and login to your account from upper right hand corner.
  4. Log in from server explorer, ie. re-enter your credentials.
  5. Open up the cloud explorer and refresh. Voilá, it's rockin' again!

One of the reasons it took so awfully long to try all the tricks was that I have a a few of Azure subs from different customers with 2-factor authentication on.

Obeng answered 5/12, 2019 at 12:44 Comment(1)
In my case I could only see the subscriptions from one tenant, but not from another tenant that had 2-factor enabled. What worked was to go in settings > Azure configuration > Azure Tenant and set the 2FA tenant id ... Now I can see the 2FA tenant subscriptions, but not the others.Defective
S
1

For me the solution in Visual Studio 2022 was to enable "Authenticate across all tenants..." - after checking it and login again it worked.

Option to check

Schnur answered 2/4 at 9:25 Comment(0)
V
0

In my case, I just had to log in to VS using the sign in button in the upper-right corner. Attempting to log in to Azure via the Cloud Explorer window while not being signed in to VS itself will apparently yield the "No subscriptions found" message.

Violoncellist answered 28/6, 2017 at 8:52 Comment(0)
E
0

Nothing worked for me until I double check: https://manage.visualstudio.com/Subscribers The subscription was not really assigned to me even when VS recognized my login.

Enteritis answered 4/3, 2020 at 16:18 Comment(0)
H
0

What worked for me is that I had filters applied and this is why the subscriptions were not displayed:

  1. List item

  2. enter image description here

  1. Click apply

Hope it works for you!

Headboard answered 3/8, 2022 at 8:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.