Forum Discussion
Multifactor Authentication MFA and Virtual Machines VM
We are a small development company using Office365. For a new project we now want to use some Windows VMs in the cloud. Because Azure integrates nicely with Office365 it seems to make sense to create these VMs on Azure. The plan is that the existing Office365 logins stored in Azure AD can also be used to grant access to the VMs Windows OS (as managing separate credentials for each VM is a PITA).
We created the VMs and assigned access rights - there are specific roles for this (login as user, login as administrator) which is exactly what we need. We tried to login and - bummer. Login doesn't work.
After some searching we found out that the reason seems to be that we have MFA turned on and this is not supported by the Windows OS. So we figured we need to change access configuration e.g. by using Bastion instead of plain RDP for remote access but - bummer. Bastion also doesn't support MFA.
After looking around for a while we came to the conclusion that currently there seems to be no way to get this done (at least with an acceptable amount of work/money for a small company like us). The official MS suggestion is to turn off MFA for RDP by using Azure AD conditional access. This is acceptable because we are securing remote access by source IP so MFA for RDP is overkill anyway. So we opened up the Azure AD configuration page and - bummer. Azure AD conditional access is only available when using Azure AD Premium which increases costs by about 5-10$ per user per month. That's inacceptable only to turn off functionality!
Therefore we decided to disable enforcing company-wide MFA so those users who need RDP to the VMs could remove their MFA and successfully login. This indeed works but - bummer. Everytime a MS website is opened (e.g. the Azure Portal) there is a message saying the user needs to configure MFA. After a click on the "Next" button the setup screen opens where the user can select "Skip setup" and login without MFA. How stupid is that - but so far we found no way to get rid of this.
Sure, we could manage separate credentials for each VM - but that's what we want to prevent and something that we could also do with all other cloud providers so why use Azure?
We are currently unsure if we should just delete all Azure resources and move our VMs to another cloud provider. So we'd like to ask if there is something that we missed:
- Is there a (feasible) way to get RDP login to Azure VMs to work when using Azure AD credentials with MFA?
- Is there a way to turn off MFA for RDP only without additional costs?
- Is there a way to get rid of the stupid MFA setup screens when turning company-wide MFA off?
- Is there any other approach or solution to our (quite simple and common) requirements?
- Ok, so I think I found the problem.
As described above I have disabled MFA for my account in order to be able to login to the VMs using the AzureAD credentials. I was then able to login as desired but got redirected to the MFA setup wizard every time I logged in to some MS website. I then skipped the setup as I expected this would deny login to the VMs again.
I now realized that this MFA setup was for another organization where I was added as an external user. This organization still has company-wide MFA required and therefore I was bothered with the setup at every login. I now completed the MFA setup process and it really only requires it for that company and not for my own company so login to the VMs is still possible. I have to admit that I find this behavior quite confusing as it is nowhere shown for what organization you are setting up MFA.
Therefore my main problem is solved now. I would prefer to enable MFA and disable it only for RDP or even better enable it everywhere but unfortunately this seems to be too complicated. If a simple solution pops up please let me know.
24 Replies
- DavidTexCopper Contributor
HI SandroRudin
There are some questions/answers that could help the community better analyze it.
What is the licensing that you have on the O365 tenant?
What kind of permission granularity will you desire to have within the VMs?
Without all the context here are some of my considerations:
If you considered so far Bastion, why not consider Azure VPN Gateway with Azure AD authentication with security defaults.
Will allow it MFA to login.It's about same price for East US for example.
Regarding the authentication on Windows, you could have AADDS where VMs will join domain, and have it sync with the Azure AD tenant where is your O365.
Hope it helps to shed some light. - lukemurraynzLearn Expert
I'm confused about whether you have or don't have conditional access. But there are a few things to look at:
- You can use: Azure Windows VM Sign-in service principal in your Conditional Access policies to control access: https://docs.microsoft.com/en-us/azure/active-directory/devices/howto-vm-sign-in-azure-ad-windows?WT.mc_id=AZ-MVP-5004796#using-conditional-access
- You can deploy a NAT Gateway on your virtual network and force traffic through specific IP addresses, that you can then whitelist in your MFA policy. https://docs.microsoft.com/en-us/azure/virtual-network/nat-gateway/nat-gateway-resource?WT.mc_id=AZ-MVP-5004796
- SandroRudinCopper Contributor
lukemurraynz As I said: "Azure AD conditional access is only available when using Azure AD Premium which increases costs by about 5-10$ per user per month. That's inacceptable only to turn off functionality!" So: No.
From what I understand both your suggestions involve the use of conditional access policies and are therefore not what I'm looking for.
- lukemurraynzLearn ExpertYou can use Network Gateway with per user MFA, by adding the private IP your traffic will be coming from (from the NAT gateway) into the per user MFA.
Conditional Access is part of Business Premium now, so depending on your Office licenses, you may already have it.