Azure ML batch endpoint returns 403 “Tenant mismatch” even though token and resource tenant IDs match
I'm seeing a reproducible Azure ML Batch Endpoint invocation failure that appears to occur at the Azure ML scoring frontdoor.
az ml batch-endpoint invoke returns:
HTTP 403
Tenant mismatch: Token tenant does not match resource tenant
server: azureml-frontdoor
The endpoint and deployment provision successfully and report healthy. The failure occurs only when invoking the endpoint.
I've completed the usual authentication, tenant, endpoint, and RBAC troubleshooting and then traced the failing request with --debug.
For the exact bearer token sent to the scoring frontdoor:
aud = https://ml.azure.com
tid = [TENANT_ID]
I compared that tid with every relevant tenant value available through Azure/ARM:
| Source |
Result |
Bearer token tid |
[TENANT_ID] |
| -------- |
-------- |
Bearer token tid |
[TENANT_ID] |
Subscription homeTenantId |
[TENANT_ID] |
Workspace properties.tenantId |
[TENANT_ID] |
Workspace managed identity identity.tenantId |
[TENANT_ID] |
Only tenant returned by az account tenant list |
[TENANT_ID] |
All five are identical. There is no guest/B2B or multi-tenant discrepancy visible from the client or ARM side.
I've also tested:
Fresh az login --tenant [TENANT_ID]
az account clear followed by fresh authentication
User-principal and GitHub Actions OIDC/service-principal authentication
Data-asset and raw HTTPS blob inputs
Deleting and recreating the endpoint/deployment
az ml workspace sync-keys
Waiting ~9 hours after endpoint creation to eliminate propagation as an explanation
Most importantly, I reproduced the same 403 against a second, independent, older Azure ML workspace and batch endpoint in the same subscription/tenant, ruling out configuration specific to the new workspace.
The response is a literal 60-byte text/plain response from azureml-frontdoor, not a client-generated error. I traced the Azure ML CLI response handling to verify this.
At this point the observable tenant information contradicts the frontdoor response: the token says tenant A, ARM says the resource belongs to tenant A, but the scoring frontdoor rejects the request because it believes the resource belongs to a different tenant.
Has anyone encountered this with Azure ML Batch Endpoints?
In particular, is there another resource-level tenant association used internally by azureml-frontdoor that isn't exposed through the workspace ARM resource?
If someone from the Azure ML team can help investigate, I can reproduce on demand and provide a fresh UTC timestamp, endpoint/resource ID, sanitized token claims, full debug trace, and any request/correlation IDs returned by the frontdoor.
I don't currently have a paid Azure technical-support plan, so I'm posting here after completing the Azure-recommended troubleshooting.