Azure sign in not working using Azure Tools option in VSCode - azure

I installed the Azure Tools plugin (version: 0.0.4) for VSCode (version: 1.27.2). I have no proxy setting in my system. I validated it by running the command in cmd : netsh winhttp show proxy and found
Direct access (no proxy server).
I tried to login into Azure using the Azure Tools option present in the side bar, which caused a pop up to open at the bottom right corner. I clicked on the button with Copy and Open option which opened a browser instance where I copied the password details, post which when I came back to the VSCode window and then I see that I am still not logged in. I tried the above process multiple times but see the same again and again.
Can anyone help me to get some guidance on this to fix the issue?

I had a similar problem and for me was the latest Azure Account plugin version 0.9.10. It doesn't work.
I reinstalled the previous version 0.9.9 and now the login works again.

I can't reproduce it with Azure Account extension (0.4.3) for VSCode (version: 1.27.2).
If azure cli is installed, please have a try to use az login to check whether it can login. If you can login with az command then close the VS code and open it to try again.

I had a similar problem.
I am a member of several tenants for various orgs.
By updating my tenant Id in the Azure Account extension settings I was able to sign in.
I suspect I will have to update it when I want to work in a subscription owned by another tenant.

I ran into a similar issue when trying to login and extract an API from API management. Using Azure Sign In or Azure Login would open up the popup but the callback URL would not trigger a sign in VS Code. I tried everything to the point of reinstalling VS Code.
After messing around with the different Azure Sign In options, I finally got an error when trying to sign in to Azure Cloud. The error mentioned that my admin requires the use of a device code. Unfortunately this error is neither shown nor handled when using the default Azure Sign In command.
The fix for me was to expressly sign in using Azure Sign In with Device Code.

I can reproduce, It does not work on Ubuntu,
no matter what I do.
I gave up, and moved to windows.
So 1:0 for Microsoft :-)
If something does not work with Azure:
try with windows
try with Edge
Its painful truth - they only support software they already own. Which make sense business-wise.

Related

How do I sign in to my Azure account from the VSCode Azure Functions extension?

I have been trying to create an Azure Function using the documentation. For example, here:
https://learn.microsoft.com/en-us/learn/modules/develop-azure-functions/5-create-function-visual-studio-code
Every time, and with every Azure account, I can't get past the step where you sign in to your Azure account from the Azure Functions VSCode extension. This is the error I am getting:
"Selected user account does not exist in tenant 'Microsoft Learn Sandbox' and cannot access the application 'aebc6443-996d-45c2-90f0-388ff96faa56' in that tenant. The account needs to be added as an external user in the tenant first. Please use a different account."
The Microsoft Learn Sandbox error message is a red herring to me, as I am not trying to do anything with it, only with Azure Functions. The same error appears even with a completely different Azure account.
I have tried looking at several possible solutions, including switching directories (but I only have one directory, so this didn't work), changing settings in Azure AD Connect (but I don't have Azure AD Connect configured, so this didn't work), and I deleted several local .config files and directories on my machine (CentOS 7, btw). If the solution is related to my .config files, I couldn't tell which files I should actually be deleting though.
In my situation, the problem is it was trying to use my "learning" account but I wanted to use my "work" account.
Following the answer here: https://learn.microsoft.com/en-us/answers/questions/696758/how-do-i-sign-in-to-azure-from-vs-code?page=1&orderby=Helpful&comment=answer-697695#newest-answer-comment
Go to the Azure portal and sign out (https://portal.azure.com/) Now
open Visual Studio and Open the Command Palette (Ctrl + Shift + P)
search for Azure: Sign Out and click on it. It will signout you from the Visual Studio extension
Then (this is the important part) it allowed me the option to Clear my Tenant ID.
Then you can sign in again with the new account
Hope this helps someone else!

Unable to sign up to azure devops. Error : Oops! Something happened. Please check our support page for service updates, and try again later

I am unable to singup for azure devops. I am trying free sign up for educational purposes. I tried on multiple days getting same error.
I was facing the same issue. I tried changing the Directory (Under Switch Directory Option) to Default Directory and it worked. I was using Google Chrome browser (incognito mode)

Can't hit NuGet server hosted on an Azure website from Visual Studio, but can from web

My problem is that I have a NuGet server on an Azure website using Azure AD for auth. It works as expected if I hit the NuGet URL in Chrome (requires the login, which accepts appropriate credentials), but if I try to access it in Visual Studio 2013 (through manage NuGet packages) it won't accept the account/password as appropriate credentials (the prompt just pops up again). My approach was as follows:
With the goal of creating a simple internal NuGet server, I largely followed the instructions in this article to deploy one on an Azure website: http://www.codeproject.com/Articles/872230/Create-Your-Own-Private-NuGet-Server-in-Windows-Az
The NuGet server works just fine, but I wanted to add some basic auth since we'll be hosting some of our code there. I decided to try to use Azure AD for this. I added a couple Microsoft accounts (mine and a coworker's) to our otherwise empty default Azure active directory. Through the management portal, I then selected the 'configure' tab in the website dashboard and added the default directory in the auth section.
Since the developers who will be pulling down our packages will do so through Visual Studio, I need to figure this out or find an alternative. I would like (if possible) to avoid writing my own auth module, since this feature is supposed to be baked into Azure.
It turns out that NuGet does not currently support Azure AD. However, they are working on it and progress can be tracked here: https://github.com/NuGet/Home/issues/708

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

I'm having a pretty strange issue with Azure tools for VS 2013 (version 2.6). Whenever I try to sign in to my Azure subscription (e.g. from Server explorer or creating a new web role project) I get the following error:
Server Explorer
An error occurred during the sign in process: User 'foo#gmail.com' returned by service does not match user 'bar#outlook.com' in the request
OK
My subscription owned by 'bar#outlook.com' and I can perfectly fine sign in either to management portal in a browser (IE, Spartan and Chrome) - as well as in the Power Shell. Tried everything - cleaning up browser caches/cookies, resetting IE settings, playing with different IE security settings - nothign works.
Any help is appreciated - this issue drives me crazy.
P.S. I'm on Windows 10...
I had the same problem. Imported the certificate manually and everything worked ok: https://social.technet.microsoft.com/Forums/en-US/9cdafeb4-f459-436d-b2b8-9bc5c01f0df1/azure-tools-for-vs-cant-sign-in-to-subscription?forum=windowsazuredevelopment
I had this issue, to resolve it I:
Added 'foo#gmail.com' as an alias in my 'bar#outlook.com' Microsoft account, via account.live.com
Made the 'foo#gmail.com' email address the primary alias for my Microsoft account
I could then log in successfully in to Azure by pressing the Connect to Microsoft Azure button in the toolbar of the Server Explorer in Visual Studio 2013 and see all of my websites under the App Service node.
(When I'd used the certificate method described in the other post and Microsoft documentation I'd been able to see all my sql databases etc. but not the websites.)
Once I'd done all that I then switched my primary alias back to 'bar#outlook.com' and server explorer carried on working.
NB: If you're experimenting with this beware that there is a limit on how many times you can switch your primary.. as I have just discovered.. and now my primary is stuck on the wrong email address for a week.
NB2: If your connecting in order to be able to remote debug the website, then this can still be done by going to Visual Studio>Main Menu>Debug>Attach To Process, and then enter the URL of the site (without the http bit, e.g. mysite.azurewebsites.net) as the Qualifier and then attach to the w3wp.exe process.
I am having the exact same issue. It seems that the Azure sign-in in Visual Studio is redirecting to our organizational Single Sign-On instead of the Microsoft one. I have managed to work around this problem by using a Microsoft account that is not tied to my organization:
Create new Microsoft account or use an existing account not associated with your organization
In https://manage.windowsazure.com select Subscriptions/Manage Administrators
Choose Add+ and add the new Microsoft account as administrator to your subscription
Log on to Azure using the new account from Visual Studio
/Morten
I changed my Microsoft account's email address and had this problem. Adding an alias did not help.
The problem is to do with the Azure Active Directory Library for DotNet. For whatever dumb reason, they throw an exception when Azure returns an ID different than the one requested (if the server isn't crying about it, why make up an error and make the client deal with it?).
Since Azures's support was no help, I had to build a custom copy of the ADAL with that moronic exception removed and an assembly version matching the one used in VS2013 (2.11). Also importantly, disable strong name verification for the custom assembly.

Connect to Microsoft Azure Subscription fails

In Visual Studio 2013 Update 4 (and Update 5 CTP 2), Tools / Connect to Microsoft Azure Subscription is failing immediately for me with an error:
"An error occurred during the sign in process: authentication_ui_failed: The browser based authentication dialog failed to complete for an unkown reason"
Any idea how to solve this problem? I can sign in through the Azure Portal just fine. I also tried adding a New Deployment in an Azure web project. It brings up the Deploy to Resource Group dialog but doesn't show anything in the Subscription pull-down. When I choose Manage in that menu, it brings up the Manage Microsoft Azure Descriptions dialog which shows I have a subscription with Subscription ID and User Account filled in with reasonable info.
There are several other places in VS to connect to Azure (eg, Server Explorer pane) but they all fail exactly the same way.
Someone else in my company is able to connect his VS 2013 to the same Azure subscription, though as a different user of course. His brings up a Connect to Visual Studio dialog. I think mine is trying to as I see a rectangular flash about the same size as this dialog an instant before getting the error message.
It appears that it is trying to access my Visual Studio account and that's failing. If I try to log out of it and back in, it displays a broken web page ("This page can't be displayed.") in a window with the URL: https://app.vssps.visualstudio.com. I tried visiting this page in Firefox, my default browser, and it loaded the page just fine. However, when I tried it in IE 11 I got the same "This page can’t be displayed" error page. I guess I need to focus on eliminating this problem first.
Any ideas on how to get past this?
I was able to resolve this problem by resetting Internet Explorer's settings to defaults. Then IE could load https://app.vssps.visualstudio.com. VS 2013 was then able to connect to Azure.
I got the same error. Issue was in IE Security settings TLS 1.x were unchecked.
Just selecting TLS 1.x solved the issue.
Try to turn off any Anti Virus softwares you have ON - that's what worked for me.

Resources