Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
Hello Mark Siminski
it looks like you're trying to make your Azure Storage Account accessible to all users at their workstations, specifically by mounting a shared drive through a script. Here’s how you can approach this:
Steps to Ensure Accessibility:
- Role-Based Access Control (RBAC) Assignments:
- Ensure that the users have the necessary permissions to access the storage account. You can assign them roles through the Azure portal by going to Access Control (IAM) for your storage account. The recommended roles for users are:
- Reader and Data Access
- Storage Blob Data Contributor
- Storage File Data Privileged Contributor
- Follow these steps:
- Go to your storage account in the Azure portal.
- Select Access Control (IAM).
- Click on + Add > Add role assignment.
- Select the role and add the users.
- Network Firewall Settings:
- Check the firewall settings of your storage account. Make sure that the client IP addresses of your users are allowed through the firewall. You can temporarily set the access to "Allow from all networks" to confirm if the issue lies with the firewall.
- Authentication Setup:
- If you are using Microsoft Entra ID, make sure that Entra authentication is set up correctly. Users need to authenticate with an identity that has access to the storage.
- Mounting the Storage:
- You can use a script to mount the Azure File Share as a network drive. This typically involves using a PowerShell script that utilizes the
net usecommand or similar to map the drive letter to your Azure File Share.
- You can use a script to mount the Azure File Share as a network drive. This typically involves using a PowerShell script that utilizes the
- Test Access:
- After assigning the appropriate roles and configuring network settings, test the access to the storage account again.
Refer this article: How to Mount the Azure file share with File Explorer
NOTE: The Azure portal provides a PowerShell script that you can use to mount your file share directly to a host using the storage account key. However, we recommend using identity-based authentication instead of the storage account key for security reasons. If you must use the storage account key, follow the mount instructions, but under Authentication method, select Storage account key.
You can mount an SMB Azure file share on Windows using the Azure portal or Azure PowerShell.
Reference: How to mount Azure file share using Powershell/Portal
$storageAccountName = "<YourStorageAccountName>"
$shareName = "<YourFileShareName>"
$storageAccountKey = "<YourStorageAccountKey>"
$networkDriveLetter = "Z:"
# Construct the context to connect to the storage account
$context = New-AzStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $storageAccountKey
# Mount the Azure File Share
net use $networkDriveLetter "\\$storageAccountName.file.core.windows.net\$shareName" /u:"Azure\$storageAccountName" $storageAccountKey
References:
- Azure Storage Account Access Control
- Assign Roles to Users for Access
- Azure Storage Network Security
Hope the above answer helps! Please let us know do you have any further queries.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".