Azure.Authenticate with interactive user login (Microsoft.Azure.Management.Fluent) Azure.Authenticate with interactive user login (Microsoft.Azure.Management.Fluent) azure azure

Azure.Authenticate with interactive user login (Microsoft.Azure.Management.Fluent)


According to SDK source code, there is no interactive user login currently.

 credentialsCache[adSettings.TokenAudience] = await UserTokenProvider.LoginSilentAsync(                        userLoginInformation.ClientId, TenantId, userLoginInformation.UserName,                        userLoginInformation.Password, adSettings, TokenCache.DefaultShared);

But it only covers options that will store credentials on the HDD which I'd like to avoid. So that whatever user is using my program is needed to login.

To avoid storing credentials on the HDD , if no interactive user login is accepted we could use Login Slient model with username and password.

var credentials = new AzureCredentials(new UserLoginInformation { ClientId = "Azure client Id",UserName = "username",Password = "Password"}, "tenant Id", AzureEnvironment.AzureGlobalCloud);  //AzureChinaCloud,AzureGermanCloud,AzureUSGovernmentvar azure = Azure            .Configure()            .Authenticate(credentials)            .WithDefaultSubscription();


Fluent libraries does not support interactive login. If your project targets .Net Core then you can use Device Flow authentication, but that will require you to pop-up to the caller information received from Azure AD Source code in Fluent Repo