Forum Discussion
Two factor authentication
- 10 years ago
Authentication is done via Azure Active Directory. You have several options for multi-factor authentication.
Using ADFS:
Multi-factor authentication Azure service:
https://azure.microsoft.com/en-us/services/multi-factor-authentication/
You can also get to this within the Office 365 Admin portal by going to Users > Active Users > More > Setup Azure multi-factor auth in the new O365 Admin portal.
There´s a problem when I´m trying to publish one pbix file into our tenant, and I´m 100% sure that is because of MFA. As we are Microsoft Partner, we need MFA now in all our users BUT my app is not working anymore and I´m really desperate in what to do.
protected static void AdquireTokenAcesso(string usuario, string senha, string ClientID)
{
// create new ADAL authentication context
var authenticationContext = new AuthenticationContext(ProgramConstants.AzureAuthorizationEndpoint);
System.Net.ServicePointManager.SecurityProtocol = System.Net.ServicePointManager.SecurityProtocol | System.Net.SecurityProtocolType.Tls12;
var userCreds = new UserPasswordCredential(usuario, senha);
var userAuthnResult = authenticationContext.AcquireTokenAsync(ProgramConstants.PowerBiServiceResourceUri,
ClientID, userCreds).Result;
Console.WriteLine("Adquirindo Token de Acesso...");
AccessToken = userAuthnResult.AccessToken;
Console.WriteLine("Usuário: " + userAuthnResult.UserInfo.DisplayableId);
}
namespace Microsoft.IdentityModel.Clients.ActiveDirectory
{
// Summary:
// Extension class to support username/password flow.
public static class AuthenticationContextIntegratedAuthExtensions
{
// Summary:
// Acquires security token from the authority.
//
// Parameters:
// ctx:
// Authentication context instance
//
// resource:
// Identifier of the target resource that is the recipient of the requested
// token.
//
// clientId:
// Identifier of the client requesting the token.
//
// userCredential:
// The user credential to use for token acquisition.
//
// Returns:
// It contains Access Token, its expiration time, user information.
//
// Remarks:
// This feature is supported only for Azure Active Directory and Active Directory
// Federation Services (ADFS) on Windows 10.
public static Task<AuthenticationResult> AcquireTokenAsync(this AuthenticationContext ctx, string resource, string clientId, UserCredential userCredential);
}
}
Message: {"AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access '00000009-0000-0000-c000-000000000000'.\r\nTrace ID: 3793b357-9420-4f9e-9a19-44073b8a1200\r\nCorrelation ID: 3edc0be6-8c6a-41f0-a37a-010e05ae2a01\r\nTimestamp: 2019-10-31 13:16:16Z"}
Any help GuyInACube?
brunozanoelo Were you able to solve this issue? I am also getting similar error after multi factor authentication is enabled.
Any idea how to disable multi-factor authentication by default?
- cahernandez4 years agoNew Member
Tengo el mismo problema, cual fue tu solucion?
- brunozanoelo2 years agoPost Patron
Hello piper!
Yeah, I solved this situation disabling the default securitu parameter in azure:
I seens Microsoft enables it without permission or consent time to time (this is ridiculous, it´s my enviroment), must pay attention on it.
https://portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/Overview
Plus, disable the MFA in the user and should be fine!
Best regards!