Microsoft Visual Studio Credential Errors on Microsoft Azure Account - visual-studio

I was trying to deploy my web application to Microsoft Azure and as I enter my credentials for my Microsoft account, this error popped up and I'm unable to seek the solution to solve. However, I tried logging in through Microsoft Visual Studio itself and get the same error message as well
[Error In TextForm]
We could not add the account [myemail] user_interaction_required : One of two conditions was encountered: 1. The PromptBehavior.Never flag was passed, but the constraint could not be honored, because user interaction was required. 2. An error occurred during a silent web authentication that prevented the http authentication flow from completing in a short enough time frame
May I know what details I need to check in order to solve the following error?
Thanks in advance.

Try this:
Remove the existing account from Visual Studio
Close Visual Studio
Open a developer command prompt
Type devenv.exe /resetuserdata
Restart Visual Studio
Try and enter you credentials
Worked for me.

In my case it was because I recently left a company.
They had referenced my personal account for some reason in their Azure Active Directory and locked down the account.
I could determine I was still part of their directory from the azure portal, on the right after clicking on the user name their directory was here among others.
Just contacted then to remove the reference to my account which looks like this if your email is johndoe#hotmail.com : johndoe_hotmail.com#EST##tenantname.onmicrosoft.com

I removed the Users from Azure Active Directory group which were not having any subscriptions, and it works!!

Try this:
1. Remove existing account
2. Restart
3. Add account

Related

TF30063:You are not authorized to access dev.azure.com but I can connect

I am using Azure Devops and VS2017 15.9.7.
I am logged into Devops and can sync.
When I open my project I get a message
"TF30063": You are not authorized to access dev.azure.com/myproject
I have tried going into credentials manager and deleting all the credentials for the devops organisation.
I have looked at this question and tried logging out via the browser within VS
TF30063:You are not authorized to access dev.azure.com but I can connect
I have encountered the same issue. (I need to switch back and forth between work account and test account). Of course, there could be so many reasons and it could be different for each (cached another account, or modified the password).
To resolve this issue I have two methods/steps.
Step 1 is to clear the credential from credential manager:
Go to Control Panel (with small icon view)-->User Accounts-->Manage your credentials (on the left column)-->Select Windows Credentials-->Scroll down to the Generic Credentials section and look for your TFS server connection.
Step 2 is to click on the operation that Connects to the Team Projects which is the button/plug icon in the Team Explorer tab. Then to also right click the project you are getting this issue on and select Connect:
I also have tried other methods but not work for me, if possible, you can check if it is useful to you:
How To Fix TF30063 Error
Error TF30063: You are not authorized to access
The comment by Kirsten Greed in the accepted solution resolved the issue for me. Reproduced here:
The problem was that I was opening the project using the Recent Project section of the start page. I closed VS, re-opened and then opened the project via "connect: in Team Explorer. Then exited. Now it seems to open ok either way.
I had the same issue, It solved by simply rerunning the Visual Studio as Administrator.
Running this command in cmd prompt, forces the re-authentication screen to come up and worked for me:
tf.exe get . /r
NOTE: you may need to locate tf.exe on your disk. For instance I have it at this location: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe
Another reason for this error is that you might have to re-enter your credentials in Visual Studio:
Restarting Visual Studio and connecting to Azure DevOps did the trick for me.
If the is problem like below:
The solution will be like below:
And after that select:
Re-enter your credentials
Step 1: Add
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer" in the environment variable path
Step 2: remove azuredevops org related credential from credential manager
Step 3: Delete this folder:
C:\Users<UserName>\AppData\Local\Microsoft\Team Foundation\7.0\Cache
Step 3:
run tf workspaces /collection:https://dev.azure.com/royalmailgroup in cmd
It might be the case of a password change.
In my case I had update my account password in a different machine. So on machine #02 I went to Visual Studio > Account Settings. After the pop-up opened, there was a message to re-enter credentials.
Sometimes the password isn't updated across all used app/services and you have to enter that manually.
Hope that helps.
None of the other methods above worked for me. I tried this in visual studio 2022 and it worked.
Open the Developer PowerShell (search for PowerShell) and type in the following:
TF vc permission
This will bring up a login screen and allow you to log in.
After that you should have permission.
In Visual Studio>Navigate to Tools > Nuget Package Manager >Package Manage Settings>Azure Service Authentication>Verify/Change the account
Leo Liu's answer got me on the right track. My problem could have originated from having two different Azure DevOps accounts cached in Windows Credentials and Visual Studio started choosing which one to authenticate with at random.
Log out of both accounts in Windows Credentials.
(The Manage Connections window does not have access to source control now.)
Open up the Azure DevOps website and logout there.
Login on Azure DevOps website.
(Visual Studio's Manage Connections can access source control again.)
What did it for me was open VS without code and connect via Team Explorer, but then also it threw the same error and after some time I logged out of azure web and tried connecting via Team Explorer again and it worked.

Visual Studio - Publish Web App to Azure "Reenter your credentials" does not work

I can't publish an asp.net app to Azure Web App in Visual Studio 2015. It asks me to reenter my credentials, which I do, and then get the same "renter your credentials" screen.
I have two Azure accounts, one is my synced Azure AD identity (account#company.com), and the other as a cloud-only identity (account#company.onmicrosoft.com). When trying to log in with either of these accounts, Visual Studio still says "Reenter your credentials" and does not show any subscriptions or resource groups.
Looking at a Fiddler, I can see Azure return a list of all of my subscriptions, yet Visual Studio does not populate and thinks my credentials are invalid (Fiddler screenshot below)
I had the same problem
In the Acount settings of your visual studio top right..
Delete all acounts an then sign in with the proper azure account.
Then when you go to publish you can add the account
I have experienced exactly what you describe here, however when I ensured that I was connected to Visual Studio using the same account as I wished to publish with, the "reenter credentials" message disappeared.
Go to Options > Accounts,
On the "Add and reauthenticate accounts using:" field select Device code .
Login in the browser with the provided code and then you are able to publish without re-entering credentials.
I had this issue with visual studio 2019, my Microsoft account was linked with my gitHub account. I unlinked my github account by logging into my windows account going into security and unlinking the account
Same issue here with VS 2019 and 2022 (preview), but the account settings in Visual Studio only showed my 'Home Organization'. Deleting and re-adding didn't help.
Finally, I fixed it by removing an external organization that I was a member of from my account.
Go to https://myaccount.microsoft.com and login. On the left panel, select Organizations and delete all, except your Home Organization.
Of course, if you actually need the external organization(s), this isn't going to help you.

This account has no subscription - Publishing to Azure from Visual Studio

Earlier this year I successfully deployed a MVC app to Azure from Visual Studio.
Now I'm trying to do the same thing again, but now I am told my azure account "has no subscription".
However I am 100% positive I do have a subscription associated with my email. My old MVC app still runs and I can see my Pay-as-you-go is properly charged.
What I Have tried to fix it
Emptied my browser caches, history, cookies etc.
Removed my account from Visual Studio, restarted, and added them again.
Formatted my computer and reinstalled everything (not really because of this problem, but the timing was perfect).
Updated the Azure SDK to the newest 2.9.5.
I did the following things above based on advice from these pages:
Visual Studio not finding my Azure subscriptions
Unable to publish to Azure with VS2015
No subscription found in windows azure account
But alas, no luck.
The only thing that comes to thought is I tried to add an Azure Pass to my account, but without luck. But I can't see how that should change anything...
So my question is: How do I make Visual Studio recognize my current Pay-as-you-go subscription, so I can publish my services, apps, etc. from Visual Studio directly?
Or at least: What has gone wrong? Whom can I contact to get help with this?
As always, thank you for your time and patience, and please write a comment if you need further information.
You may try to connect first via the server explorer (ctrl+alt+s). (The server explorer has an azure root node, if the azure sdk installed)
If you have connected, the publish wizard won't ask (usually) for sign in again.
In my case, the solution was as follows:
Open Server Explorer in Visual Studio, right-click on Azure and select "Manage and filter subscriptions":
Screenshot of Manage Subscriptions Dialog
Click the Certificates tab, click Import, then click Download subscription file. This will take you to the azure portal page where you can download a .publishsettings file for your subscription. After downloading that file, click the Browse button in the Import dialog shown above and select that file.
I had the same issue. To solve it I opened the server explorer (ctrl+alt+s) and refreshed the Azure connection. It still said 0 subscriptions, but in the publishing options I could connect without any issue.

OpsHub VS Migration asking fro administrative permissions and I am the Visual Studio Admin

I keep getting Error: 1) Administrative Permissions Needed for Logged In user in Visual Studio Online.
I am the VS online Site Administrator. I double checked and I am a member of the Project Collection Service Account. Any ideas?
I tried reinstalling, I tried deleting and re adding the TFS server connection
Can you please check if user is under Project Collection Administrators as well Project Collection Service Accounts group or not. For more information please refer following guide to check you have correct group privileges for the account you are using from TFS Utility.
http://www.opshub.com/ohrel/Resources/TFS/permissions.php?page=admin
Let us know in case if it does not work for you.
Thanks,
OpsHub
If anyone else should come across this, you need to RDP onto your TFS (on-premise) box. Open a command prompt. Change Directory (cd) to the Program Files folder where TFS was installed into. See my example below:
cd "C:\Program Files\Microsoft Team Foundation Server 11.0\Tools"
Within the directory above (path may be different for your TFS install), there should be a tfssecurity.exe file. You need to run that using the following command (within the same command prompt window you ran the above command):
tfssecurity /g+ "Project Collection Service Accounts" n:"{VISUAL STUDIO ONLINE ACCOUNT EMAIL ADDRESS}" /collection:"{FULL URL TO YOUR VS SUBSCRIPTION}"
Don't forget to replace the values within braces ({VALUE}) with the values applicable to your accounts!

Visual Studio encountered an unexpected network error and can’t contact the Microsoft account service

I confirgured my windows store DEV account couple of days ago. I have developed some store apps and I need to publish it in windows store. When I try to create the App packages using Visual studio 2012 Ultimate It gives me this error
Visual Studio encountered an unexpected network error and can’t contact the Microsoft account service
I followed the solution mentioned in this link http://blogs.msdn.com/b/wsdevsol/archive/2013/01/15/visual-studio-2012-throws-an-error-saying-visual-studio-encountered-an-unexpected-network-error-and-can-t-contact-the-microsoft-account-service-when-you-try-to-create-app-packages-for-the-windows-store.aspx. But it didn't work out, still getting the same error.
To solve this problem, you need to open the Internet Explorer (not others browsers) and access https://login.live.com/oauth20_desktop.srf. A popup will appear. Check the option "In the future, do not show this warning" and click OK. You should be able to complete you task. For more details, check this post

Resources