Azure Tools for VS - can't sign in to subscription

I'm having a rather strange problem with Azure Tools for VS 2013 (version 2.6). Whenever I try to log into my Azure subscription (for example, from Server Explorer or create a new Web Role project) I get the following error:


Server Explorer

An error occurred during login: User " foo@gmail.com " returned by service does not match the request of user " bar@outlook.com " in the request

OK

My subscription is owned by " bar@outlook.com " and I can register it perfectly in the management portal in the browser (IE, Spartan and Chrome) as well as in the Power Shell. Tried everything - clearing browser caches / files, reset IE settings, playing with different IE security settings - nothign works.

Any help is appreciated - this issue is driving me crazy.

PS I'm on Windows 10 ...

+3


source to share


4 answers


I had the same problem. Imported the certificate manually and everything worked fine: https://social.technet.microsoft.com/Forums/en-US/9cdafeb4-f459-436d-b2b8-9bc5c01f0df1/azure-tools-for-vs-cant-sign-in -to-subscription? forum = windowsazuredevelopment



+1


source


I had this problem to solve I:

  • Added ' foo@gmail.com ' as an alias in my Microsoft account bar@outlook.com via account.live.com
  • Made the email address ' foo@gmail.com ' the primary alias for my Microsoft account

Then I was able to successfully login to Azure by clicking the Connect to Microsoft Azure button on the Server Explorer toolbar in Visual Studio 2013 and see all my websites in the App Service node.

(When I used the certificate method described in another Microsoft post and documentation, I was able to see all my sql databases, etc., but not websites.)



Once I did all this, I switched my primary alias to " bar@outlook.com " and the server explorer kept working.

NB: If you are experimenting with this, beware that there is a limit on how many times you can switch your primary. As I just found out .. and now my main one has been stuck on the wrong email for a week.

NB2: If you are connecting to remotely debug a website, this can be done by going to Visual Studio> Main Menu> Debug> Attach To Process and then enter the site url (without the http bit, like mysite.azurewebsites.net) into as a qualifier and then attach to the w3wp.exe process.

+1


source


I have the same problem. It looks like the Azure login in Visual Studio is being redirected to our organizational Single Sign-On instead of Microsoft. I was able to work around this issue by using a Microsoft account that is not tied to my organization:

  • Create a new Microsoft account or use an existing account that is not associated with your organization.

  • At https://manage.windowsazure.com select Subscriptions / Manage Administrators

  • Select "Add +" and add a new Microsoft account as an administrator to your subscription

  • Sign in to Azure using a new account from Visual Studio

/ Morten

0


source


I changed the email address for my Microsoft account and ran into this problem. Adding an alias didn't help.

The issue is related to Azure Active Directory Library for DotNet . For some dumb reason, they throw an exception when Azure returns an id that is different from the one requested (if the server isn't crying about it, why make a mistake and force the client to handle it?).

Since Azures support didn't help, I had to create a custom copy of ADAL with the deleted exception removed and a version of the assembly that matches the version used in VS2013 (2.11). It is also important to disable reliable name validation for the custom assembly.

0


source







All Articles