An Azure service to easily conduct machine translation with a simple REST API call.
Hello @Matthew ,
Welcome to Microsoft Q&A .Thank you for reaching out to us.
Thank you for sharing the detailed scenario The observed behavior-text translation working while document translation fails with InvalidDocumentAccessLevel indicates that the issue is specific to how document translation interacts with storage, rather than a general service availability, region alignment, or document format problem.
The document translation differs from text translation in an important way that while text translation processes content directly, document translation requires the service to read from and write to Azure Blob Storage. Because of this dependency, failures can occur even when permissions appear to be correctly configured.
The error InvalidDocumentAccessLevel not be interpreted as a permissions issue alone. In addition to identity and access configuration, this error may also occur due to:
- Request structure inconsistencies
- Incorrect or mismatched storage paths
- File versus container interpretation differences
- URL formatting or encoding issues
Please check if the following steps help -
- Validating Request Format and Endpoint Pleaes ensure the batch request follows the correct format: Endpoint:
https://<resource-name>.cognitiveservices.azure.com/translator/text/batch/v1.1/batchesRequired headers:-
Ocp-Apim-Subscription-Key -
Content-Type: application/json
inputsstructure with correctsourceUrlandtargetUrlPlease note that when using managed identity, SAS tokens should not be included in the URLs. -
- Validating File v/s Container Scenario Confirm whether the request is intended for:
- Full container translation (container URL), or
- Specific file translation (file-level URL)
- Verifying Managed Identity and RBAC Configuration
- Ensure system-assigned managed identity is enabled on the Translator resource
- Assign appropriate roles:
- Source: Storage Blob Data Reader
- Target: Storage Blob Data Contributor
- Ensure roles are assigned to the correct identity and scope
- Allow sufficient time for RBAC propagation after updates
- .Validating Storage URLs and Paths Ensure that storage URLs are accurate and correctly formatted:
- Container:
https://<storage-account>.blob.core.windows.net/<container> - File:
https://<storage-account>.blob.core.windows.net/<container>/<file>
- No typographical or encoding issues
- Correct source and target containers
- Unique target paths for each language
- No conflicting output files in the destination container
- Container:
The following references might be helpful , please check them out
Authorize Blob Access with Microsoft Entra ID - Azure Storage | Microsoft Learn
Assign Azure roles using the Azure portal - Azure RBAC | Microsoft Learn
Create and use managed identities - Foundry Tools | Microsoft Learn
Please let us know if the response was helpful
Thank you
Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the response was helpful. This will be benefitting other community members who face the same issue.