how to store files on azure Vm through Azure AD?

Sudesh Sharma 46 Reputation points

Hello Guys

I have created a 'ABC' user on azure ad with all admin privileges. I have created azure vm. Now I want the 'ABC' user can stored files from azure AD to azure vm file server.
Is it Possible, If possible then how? please help?

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
14,714 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
5,259 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Laude 85,216 Reputation points


    Ensure that the user 'ABC' has access to the Azure VM, you might then want to create for example an Azure File Share on your Azure VM, where your user 'ABC' can store his/her files.

    Create an Azure file share

    Once the Azure file share is created, the user 'ABC' can mount the file share on his/her local machine by using the SMB 3.0 protocol, or you can use tools like Storage Explorer to access files in your file share. From your application, you can use storage client libraries, REST APIs, PowerShell, or Azure CLI to access your files in the Azure file share.

    Use an Azure file share with Windows

    Best regards,

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. soumi-MSFT 11,651 Reputation points Microsoft Employee

    @SudeshSharma-8729, Thank you for reaching out and I apologize for the delay in my response. Based on your requirement, you can follow the steps mentioned below:

    1. Storage Account (General purpose)
    2. Create Azure AD DS
    3. Storage join Azure AD DS (Under Configuration blade)
    4. Create a user in AAD and provide the following RBAC roles on the Storage account (Storage File Data SMB Share Reader, Storage File Data SMB Share Contributor, Storage File Data SMB Share Elevated Contributor)
    5. Join the VM to Azure domain.
    6. Login to the VM as admin user.
    7. Mount the fileshare using storgae name and key. --
    8. Righ click fileshare (Security Add the domain user).
    9. Unmount the fileshare.
    10. Logout from the VM.
    11. Login as domain user. --
    12. Mount the share with the share path (eg: net use <desired-drive-letter>: \\<storage-account-name>\<share-name>)

    You would also want to check the following article:

    Hope this helps.

    Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as Answer; if the above response helped in answering your query.

    1 person found this answer helpful.
    0 comments No comments

  2. soumi-MSFT 11,651 Reputation points Microsoft Employee

    @Sudesh Sharma , Can you explain a bit what you mean by "I want the 'ABC' user can stored files from azure AD to azure vm file server". Azure AD doesnt store any files in itself.

    A user in Azure AD can be given permissions to manage a VM also he or she can manage a fileserver but that has got nothing to do with AAD. AAD is just storing the user's identity and making that user available to be added to other Azure Resources in that tenant.

    Also as @Leon Laude mentioned, Azure File shares is also an option, where you can mount the share on your machine.

    Do share the details as what type of files you would want the user to manage and where are these files currently stored so that we can help you better.

    0 comments No comments

  3. Sudesh Sharma 46 Reputation points

    hey @soumi-MSFT I have created a website that is hosted on azure vm. I have created login and profile page on that website. Now I want to stored
    files according to client login details (means client can access files according to their login details).client can download files
    from their profile after login to my website.

    I want to give access "ABC' user to stored files according to client login details. I dont want to share my vm credentials with
    'ABC' user.

    files are in zip format. Files are stored in my system HDD.

    0 comments No comments