Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AAD-Authentication not working since Visual Studio 2017 update to version 15.7.4

I have Visual Studio 2017 Enterprise 15.7.4 installed on Windows 10. The OS is connected to my AAD Work/School account. My problem occurs on 5 different machines and started to appear today.

When I start VS I'm logged in (top right) and every thing is fine. The list of subscriptions is shown in Cloud Explorer too.

I now open a ASP.NET Core web project and want to publish it to an existing Web App in Azure. As soon as I'm in the screen where I can define the target subscription, VS starts to re-authenticate eventually showing the popup-dialog querying for my credentials. This dialog sometime appears several times in a row.

I can authenticate without any error shown and now everywhere in VS (Account settings, Cloud Explorer, Server Explorer, Publish Dialog) appears the "Reenter your credentials" link and all subscriptions are inaccessible now.

From this moment on there is now way to authenticate against AAD inside of VS without getting the "Reenter-thing" anymore.

What I already tried:

  • Went to account settings and removed all existing accounts from VS -> restarted VS and performed signup again.
  • Closed all VS instances -> deleted the file system folder %LOCALAPPDATA%\.IdentityService -> started VS and signed in again
  • Right click on Azure Node in Server Explorer and selected "Connect to Microsoft Azure Subscription..."

Nothing of the above works. I was able to use this stuff just 2 days ago. That's why I suspect the update.

I then tried to post a question on Visual Studio Community Site. This asks me to use the "Report a problem"-feature in VS. Guess what? The sign-in is broken there too so I cannot even get my problem to MS.

Any further suggestions are highly welcome.

like image 214
Alexander Schmidt Avatar asked Jun 28 '18 18:06

Alexander Schmidt


People also ask

How do I authenticate in Visual Studio?

Once the system web browser workflow is enabled, you can sign in or add accounts to Visual Studio as you normally would, via the Account Settings dialog (File > Account Settings…). This action will open your system's default web browser, ask you to sign into your account, and validate any required MFA policy.

What is Defaultazurecredential?

Provides a default TokenCredential authentication flow for applications that will be deployed to Azure. The following credential types if enabled will be tried, in order: EnvironmentCredential. ManagedIdentityCredential. SharedTokenCacheCredential.

What is Azure Authentication connected service?

With Azure AD Authentication, your users can use their accounts from Azure Active Directory to connect to your web applications. The advantages of Azure AD Authentication with web API include enhanced data security when exposing an API from a web application.


1 Answers

Have you tried out to use a none Windows User - create a blank User on your Subscription and deploy with this user...

Maybe a problem with windows integrated User?

Best Niels

Today it was just announced that there is a new feature in preview in AzureAD - maybe that’s the reason? See https://cloudblogs.microsoft.com/enterprisemobility/2018/06/19/azure-ad-password-protection-and-smart-lockout-are-now-in-public-preview/

Update

Maybe just refresh the User Tokens...

Use this PS lines…

$cred = Get-Credential
Connect-AzureAD -Credential $cred 
$user = Get-AzureADUser | Where-Object {$_.UserPrincipalName -eq "your_aad_login_name"}
Revoke-AzureADUserAllRefreshToken -ObjectId $user.ObjectId
like image 163
Niels Ophey Avatar answered Oct 13 '22 01:10

Niels Ophey