How to automatically mount an Azure file share as a network drive on login

Kayak2 21 Reputation points

Current scenario:

On-premises Domain controller, users log in and the share on the on-premises server is automatically mounted as a network drive


User logins into Azure Active Directory and the Azure file share is automatically mounted as a network drive
I’m trying to get this working using a 30 day free trial of Azure, so far I have the Azure file share and I can mount it as a network drive using PowerShell on a test machine where the user is logged into Azure Active Directory


Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
13,472 questions
Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
815 questions
No comments
{count} votes

Accepted answer
  1. Sumarigo-MSFT 31,991 Reputation points Microsoft Employee

    @Kayak2 Based on the error message can you please refer to the suggestion mentioned in this link.

    Also refer to this GitHub link: Error 86 Specified password is incorrect

    Active Directory authentication over SMB for Azure file shares:

    Azure Active Directory Domain Services authentication on Azure Files:ht tps://

    If the issue still persists, please share the screenshot of the error message or error code.

    For additional information please see here also, which gives an idea on your query

    Hope this helps!

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.

2 additional answers

Sort by: Most helpful
  1. T. Kujala 8,526 Reputation points

    Have you tried to use a cmdkey command?

    cmdkey / /user:AZURE\ /pass:

    Users have to give credentials at once. I think that is the easiest way.

    Other ways:

  2. Manu Philip 14,356 Reputation points MVP

    Hello @Kayak2 ,

    I have made simple notes on this topic in my blog as below. You can create Azure file share and attach it as a drive in your computer. Please check the blog and correct what is needed

    Please mark as "Accept the answer" if the above steps helps you. Others with similar issues can also follow the solution as per your suggestion