Unable to map a network drive to a PC with AzureAD credentials

Christopher Townsend 0 Reputation points
2025-03-12T17:52:45.45+00:00

We are trying to map a drive from one PC to another utilizing an AzureAD account.

This AzureAD account is a member of the local administrators group on the PC we are trying to map the network drive to (C$, Admin$, etc). Everytime we try, it gives us a username or password is incorrect (you can see this in Security logs on the remote PC). This is not a Windows firewall or any firewall issue between the devices as they are on same network (local Windows firewalls are disabled) and you CAN map a drive to the destination PC if you select a locally created account that IS an administrator. The remote PC is a Windows 11 laptop and the server we are mapping from is Windows Server 2025 Standard.

Is this some limitation of AzureAD or some additional setting that is required? We know the AzureAD account works and its password is good, as we can RDP into this remote PC with the AzureAD account.

Thoughts?

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
11,074 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jose Benjamin Solis Nolasco 706 Reputation points
    2025-03-13T16:32:05.53+00:00

    Hello @christopher townsend

    Mapping a network drive with Azure AD credentials often fails because SMB authentication doesn’t automatically interpret Azure AD UPNs correctly without the right prefix or configuration. By explicitly specifying your username in the format AzureAD\john (or AzureAD\******@contoso.com) when prompted, or by using the net use command with the correctly formatted user string, you can typically work around the issue. If problems persist, double-check local security settings and consider a local account or hybrid join configuration as alternatives.

    What You Can Try

    Use the Correct Username Format: When mapping the drive or entering credentials manually, try one of these formats:

    Prefix with “AzureAD\”: For example, if your AzureAD account is ******@contoso.com, try entering the username as:

       AzureAD\john
    
      **Use the Full UPN with the Prefix:** Alternatively, try:
      
      ```sql
      AzureAD\******@contoso.com
      ```
      
      Sometimes one format works better than the other depending on your exact environment and how the profile is set up on the remote PC.
      
    
    1. Map the Drive via Command Prompt: Use the net use command from a Command Prompt (opened as administrator) to force the credentials in the proper format. For example: cmd
         net use Z: \\RemotePC\C$ /user:AzureAD\******@contoso.com
      
      Then, enter your password when prompted. This method can sometimes bypass issues that the GUI mapper encounters.

    😊 If my answer helped you resolve your issue, please consider marking it as the correct answer. This helps others in the community find solutions more easily. Thanks!


  2. Jose Benjamin Solis Nolasco 706 Reputation points
    2025-03-13T19:09:52.9566667+00:00

    Just following up, Do you need more guidance or assistance ?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.