Skip to main content

Azure Multi-Factor Authentication (Day 31 of 31)

List of all posts from this series:

Short Description 
Azure Multi-Factor Authentication is an authentication service that requires more than one authentication method. For example you need to enter the password and a code that is send over SMS or email.

Main Features 
Authentication method supported
In this moment the fallowing authentication methods are supported:

  • Biometric (you are)
  • Passwords (you know)
  • Phone or Device (you have)
  • Azure Active Directory

It is fully integrated with Azure Active Directory. In this way all the authentications that are made over Azure Active Directory can use this service.
On-Premises Resources
If you integrate Azure Active Directory with your on-premises one you can secure the access to all your on-premises resources using Azure Multi-Factor Authentication.
Web Application integrations
Using Azure Multi-Factor Authentication Server we can integrate this service in applications that are hosted on IIS. In this way we can create web applications that are more secure.
On-Premises Authentications methods that can be integrated
Below you can find a list with a part of authentication methods that can be integrated with Multi-Factor with out-of-the-box support:

  • Windows Authentication
  • LDAP
  • Microsoft IIS Web Applications

No setup for integration with Microsoft Services
Microsoft services like Office 365 are fully integrated with this kind of authentication. This mean that we don’t need to make any kind of setup related to Multi-Factor. We only need to specify that we want to use Multi-Factor Authentication.
Below you can find a part of Microsoft services that are full integrated:

  • Office 365 (or other Microsoft Online Services)
  • Dynamics CRM Online
  • Azure
  • VPN Connections
  • Windows Intune
  • or… Dropbox, OneDrive, Salesforce

The current SDK that Azure Multi-Factor Authentication has allow us to integrate it in any type of application, from the mobile one to web or desktop.
Something you have
This is a feature that I pretty like. One of the authentication step is using something that you have like:

  • A mobile application that you have installed on a device
  • A SMS on your mobile phone
  • A phone call on your phone

Real Time Alerts and Metrics
We have the ability to monitor in real time what users are authenticated, the number of errors and so on. We can define custom rules for alerts. On top of this we can use the logs to detect automatically odd pattern and react at them.
Cross Platform
It works on any platform or device. You can use this service on devices with Linux, Android or iOS. We are not limited only on Microsoft devices or operating systems.
Simple to Use
For users this service is very simple to use and understand. Initially they need to configure Multi-Factory using a friendly interface. Once this was done, he can use it without problems.
Password resetting, phone number change and many more can be made directly by users without IT support. In this way we don’t only reduce the costs of monitor and support actions but also we can react in less time at users needs.
This service is extremely scalable and ready to respond to any kind of demand. Based on the current figures the current system manage more than 200 million of active users each day and billions of authentication every day.
The current SLA contains three nines – 99.9%, uptime.
Company Branding
Each company can add his own logo and name on authentication page used for log-in - similar to Azure Active Directory.

For normal end-users there are no limitations. There are some use cases when Multi-Factor Authentication cannot be used:
For Power Shell commands that are using accounts where Multi-Factor Authentication is activated
For below use cases I recommend to create an account only for Power Shell commands that is disabled by default and activated only for the period of time when we need to execute a script of a Power Shell command.

Applicable Use Cases 
Below you can find some use cases when I would use Azure Multi-Factor Authentication
Secure Enterprise Web Applications
If you have business applications used by your employee than you may want to increase the security level. This can be done very easily using Multi-Factor Authentication. Using this service you will be sure than even the users password is compromised, the access to your business applications is still restricted.
Increase the protection level of your document
In combination with Office 365 you can increase the protection level of your sensitive data. You will be sure that the documents that are accessed by users using Multi-Factor Authentication are the one that hold the account.

Code Sample 

Pros and Cons 

  • Support SMS and Phone Calls
  • Self-Management
  • Can be integrated with Web Applications
  • On-Premises support


If you calculate the costs of Azure Multi-Factor Authentication Service you should take into account:

  • Number of users
  • Number of authentications

Based on this information you have the option to pay a monthly subscription per user or pay per number of authentications.

This is a service that will be used in near future more and more often to increase the security level of different resources and can add extra value to your system. Because the SDK is simple to use, we can integrated it in existing application with minimal costs.


Popular posts from this blog

ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded

Today blog post will be started with the following error when running DB tests on the CI machine:
threw exception: System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See for more information. at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName, String providerInvariantName) This error happened only on the Continuous Integration machine. On the devs machines, everything has fine. The classic problem – on my machine it’s working. The CI has the following configuration:

TeamCity.NET 4.51EF 6.0.2VS2013
It seems that there …

Entity Framework (EF) TransactionScope vs Database.BeginTransaction

In today blog post we will talk a little about a new feature that is available on EF6+ related to Transactions.
Until now, when we had to use transaction we used ‘TransactionScope’. It works great and I would say that is something that is now in our blood.
using (var scope = new TransactionScope(TransactionScopeOption.Required)) { using (SqlConnection conn = new SqlConnection("...")) { conn.Open(); SqlCommand sqlCommand = new SqlCommand(); sqlCommand.Connection = conn; sqlCommand.CommandText = ... sqlCommand.ExecuteNonQuery(); ... } scope.Complete(); } Starting with EF6.0 we have a new way to work with transactions. The new approach is based on Database.BeginTransaction(), Database.Rollback(), Database.Commit(). Yes, no more TransactionScope.
In the followi…

GET call of REST API that contains '/'-slash character in the value of a parameter

Let’s assume that we have the following scenario: I have a public HTTP endpoint and I need to post some content using GET command. One of the parameters contains special characters like “\” and “/”. If the endpoint is an ApiController than you may have problems if you encode the parameter using the http encoder.
using (var httpClient = new HttpClient()) { httpClient.BaseAddress = baseUrl; Task<HttpResponseMessage> response = httpClient.GetAsync(string.Format("api/foo/{0}", "qwert/qwerqwer"))); response.Wait(); response.Result.EnsureSuccessStatusCode(); } One possible solution would be to encode the query parameter using UrlTokenEncode method of HttpServerUtility class and GetBytes method ofUTF8. In this way you would get the array of bytes of the parameter and encode them as a url token.
The following code show to you how you could write the encode and decode methods.