how can i login to my Azure VM with my AAD credentials? - azure

I'm trying to login to my Azure VM with my AAD credentials (login with Azure AD already enabled while creating the VM), a RBAC as " virtual machine administrator login " is also already assigned to this VM. im trying to login with RDP and with this form:
username: AzureAD\username#work-domain.com
password: my-password
But i receive this error message : "The Sign-in method you're trying to use isn't allowed. For more info, contact network administrator". can anyone help?
note: i have already tryed with GPO but it didn't help out

To login to the Azure VM with AAD credential, you can follow the steps in Sign in to Windows virtual machine in Azure using Azure Active Directory authentication (Preview). And here is something important for you:
Remote connection to VMs joined to Azure AD is only allowed from
Windows 10 PCs that are Azure AD joined or hybrid Azure AD joined to
the same directory as the VM. Additionally, to RDP using Azure AD
credentials, the user must belong to one of the two RBAC roles,
Virtual Machine Administrator Login or Virtual Machine User Login.
The local machine that you use to remote connect to the VM via the AAD credential needs to be joined in the Domain as your Tenant. On my side, I use the user of the Tenant and can connect to the VM successfully. For example, the Tenant is centoso.com, then the user should be username#centoso.com. And also, you need to check if the AADLoginForWindows extension is installed successfully for the VM.

Related

RDP with Azure credentials to Win Server 2019 Hybrid Joyned VM in AWS. Domain joined to DC ec2 with Azure Connect. Is possible?

So that. Here is the environment:
A bunch of windows servers in ec2 instances in aws (1, 2, 3, x,...)
A DC ec2 instance in aws also that we will call DC01.
DC01 has azure connect and works fine and appears in the Azure portal as "Hybrid Azure AD joined".
Servers joined to the domain in DC01 appears also in the Azure portal as "Hybrid Azure AD joined".
My local machine is also joined to the same AAD in the same tenant.
I can RDP to the servers and log in with credentials from the local domain.
I cannot RDP and log in with credentials from azure.
There is mention of an extension in Azure for VM in Azure. But what about ec2 in aws?
I tried:
Modifying the RDP file with:
address:s:IPADDRESS:3389
prompt for credentials:i:0
authentication level:i:2
enablecredsspsupport:i:0
username:s:USERNAME#DOMAIN.onmicrosoft.com | USERNAME#DOMAIN.com
domain:s:AzureAD
Modifying the log in user:
azuread\username
azuread\username#domain.com
username#domain.com
username
Deactivating the Network level authentication. But still cant log in as it says user or password are incorrect.
So the only thing left would be to import the users from Azure AD to the ADDS in DC01. But this would be so wack.
Recommendations and guides will be appreciated.
I have follow the documentation from Microsoft but this is not explained.
So i assume is not possible? Or just not intuitive?
The users in Azure AD need an object of type user in the on-premise AD? If so can it be something not pair or that do not write to azure?

Azure Bastion Service

Can we use Azure Bastion to login to a Azure AD joined Windows 10 device using my AAD credentials?
I am consistently getting the error 'The username or password is incorrect' whereas in reality it is correct. Login via RDP works.
Please help.

AAD authentication to Azure Windows Server 2019 virtual machine

I'm having issues authenticating my Azure Windows Server 2019 virtual machine with my AAD user.
According to Microsoft's documentation: https://learn.microsoft.com/en-us/azure/active-directory/devices/howto-vm-sign-in-azure-ad-windows, I've created Azure Windows Server 2019 VM using Terraform and installed Windows AAD authentication extension using:
provisioner "local-exec" {
command = "az vm extension set --publisher Microsoft.Azure.ActiveDirectory --name AADLoginForWindows --resource-group ${data.azurerm_resource_group.RG.name} --vm-name ${var.prefix}"
}
The machine is up and running and the extension installed successfully.
I've also assigned the appropriate role with users and groups in order to log in that VM with AAD authentication.
And ensured that my VMs network configuration permits outbound access over TCP port 443.
However, when trying to log in the VM with RDP and my AAD user (associated with the role) I get the error "The logon attempt failed" as shown above.
I'm trying to RDP Windows 10 VM from Windows 10 Pro VM.
My Windows 10 Pro VM is joined to Azure AD (with my AAD user).
Yet, I get this error when RDP to the other Windows VM from my main Win10Pro VM.
When trying to login Linux VMs with AAD authentication everything works as expected.
Running the command "dsregcmd /status" from the Win10Pro VM gave the above output:
Also tried to RDP with "AzureAD\Username#Domain" but git the same credentials error.
What can be the problem?
Thanks for the help :)
For the error, you could verify that the Windows 10 PC you are using to initiate the remote desktop connection is one that is either Azure AD joined, or hybrid Azure AD joined to the same Azure AD directory where your VM is joined to. For more information, see the document.
Please note that
Remote connection to VMs joined to Azure AD is only allowed from
Windows 10 PCs that are Azure AD joined or hybrid Azure AD joined to
the same directory as the VM. Additionally, to RDP using Azure AD
credentials, the user must belong to one of the two RBAC roles,
Virtual Machine Administrator Login or Virtual Machine User Login.
Solved, I had to configure both the Windows10Pro which I RDP from and the Windows10Pro which I RDP to be joined to Azure AD with my AAD user.
Only when I joined both VMs to AAD with my AAD user I could RDP with that user.
So in case of authenticating using AAD credentials to Windows VM some steps should be considered:
The machine which we RDP from should be Windows 10.
The machine which we RDP to should be Windows 10.
AADLoginForWindows extension should be installed on the remote VM.
Login roles should be assigned with the AAD user/ group to the remote VM.
Both machines should be Azure AD Joined or hybrid Azure AD joined.

Does Azure Bastion with AAD Credentials

I recently created a Azure Bastion service and Azure VM in my organisation's Subscription. When I try to connect to the VM via the Bastion using local Admin ID it worked. However the same is failing when I try with my Azure AD ID. Is this a limitation?
There are two (2) authentication schemes:
Azure Active Directory (AAD) authentication: Azure Bastion does not currently support authentication using AAD-based (cloud) users. This request is known and prioritized as "high" by the product team. See this [link][1] for details in user voice. The advantage of this approach is to provide full cloud-based authentication, with no dependency on on-premises technology (in this case, Active Directory). One workaround for now is to expose a jumpoint on a vNet until availability of this feature.
Azure Directory (AD) authentication: Azure Bastion does currently support authentication using AD-based users (Windows AD User). Since this is a managed "Active Directory" provided by Microsoft, the use of Azure AD Connect is needed to sync this domain (and users) to Azure Active Directory (AAD). The drawback of this approach is to continue building using on-premises technology (Active Directory).
Public preview announced during Microsoft Ignite 2021 to include support for Azure AD login for Bastion enabled VMs. It is available using Azure CLI client on Windows and leveraging native client (openSSH to do Azure AD based SSH for Linux and mstsc to do Azure AD based RDP for Windows). Details can be found at https://learn.microsoft.com/en-us/azure/bastion/connect-native-client-windows

Azure VM Login using RBAC Role 'Virtual Machine User Login'

Using the Azure portal to assign someone to a role of 'Virtual Machine User Login'.
IAM Access control
So forgive my ignorance here, the tool tip says 'Users with this role have the ability to login to the virtual machine as a regular user'.
Now I have tried RDP into this VM using the email and pass I use for the portal and it doesn't work. Am i missing a pre-req here? This is an isolated VM not on a domain, does it have to be?
RDP Fail
This is for Linux VMs only.
Log in to a Linux virtual machine in Azure using Azure Active Directory authentication (Preview)
For Windows VMs, you have a few more steps
Enable Azure Active Directory Domain Services using the Azure portal

Resources