Create a file in Azure FileShare using postman.
Pre-Requisite
- Azure Storage account with a file share
- Role assignment Storage File Data Privileged Contributor scoped to file share.
Get required access token.
-
az login
-
az account get-access-token --resource https://storage.azure.com
Run following postman collection.
Copy the access token from above step and update the value of secret "token" in environment "fileRest".
Update the value of accountName, shareName, fileNameWithExt
Reference link:
- https://learn.microsoft.com/en-us/rest/api/storageservices/create-file
- https://learn.microsoft.com/en-us/azure/storage/blobs/authorize-access-azure-active-directory#microsoft-authentication-library-msal
- https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/storage#storage-file-data-privileged-contributor