Intermittent Failures on Azure Communication Services API

Matthew Brown 0 Reputation points
2023-12-11T22:57:57.9766667+00:00

Hi, I'm using the Azure Communication Services REST API to send email notifications. I'm having to build some new software to hit the REST endpoint using a presigned request.

Unfortunately the endpoint seems to provide intermittent failures that I can't link to any specific changes in the requests that I'm making.

A successful request looks like this and happens about 1 in every 4

http://<>.europe.communication.azure.com/emails:send?api-version=2021-10-01-preview

Request headers:

Content-Type: [text/json]
Content-Length: [186]
Authorization: [HMAC-SHA256 SignedHeaders=x-ms-date;host;x-ms-content-sha256&Signature=ZR5w1lxG1JEiAQccG3cnvjAKg0zTz6x4DvlyQ4T1PLA=]
X-Ms-Date: [Mon, 11 Dec 2023 22:48:26 GMT]
Date: [Mon, 11 Dec 2023 22:48:26 GMT]
X-Ms-Content-Sha256: [<>+uxQqW4C/k43eL3CZ1yigtM=]

Response headers:
Api-Supported-Versions: [2021-10-01-preview, 2023-01-15-preview, 2023-03-31]
X-Cache: [CONFIG_NOCACHE]
Content-Length: [77]
Content-Type: [application/json; charset=utf-8]
Retry-After: [3]
Mise-Correlation-Id: [31f05201-8a33-472b-85ca-c31d5f3b0a1a]
Operation-Location: [https://<endpoint>.europe.communication.azure.com/emails/operations/e6c54faa-6068-4002-8568-b98168dd541d?api-version=2023-03-31]
X-Azure-Ref: [0upF3ZQAAAAB9p0duI3QuSo/XkK8HTGZmTE9OMjFFREdFMTcxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=]
Date: [Mon, 11 Dec 2023 22:48:26 GMT]

{"id":"e6c54faa-6068-4002-8568-b98168dd541d","status":"Running","error":null}


And every other request looks like so:

http://<>.europe.communication.azure.com/emails:send?api-version=2021-10-01-preview

Status: 401 Unauthorized


Request headers:

Date: [Mon, 11 Dec 2023 22:48:24 GMT]
X-Ms-Content-Sha256: [ozRRLl0xWqrFdvnhh7Lg+uxQqW4C/k43eL3CZ1yigtM=]
Content-Type: [text/json]
Content-Length: [186]
Authorization: [HMAC-SHA256 SignedHeaders=x-ms-date;host;x-ms-content-sha256&Signature=FGKwhCgiroFt_st76cwlfrwQIbvU6knMJoW1VeH7cJQ=]
X-Ms-Date: [Mon, 11 Dec 2023 22:48:24 GMT] 

Response headers:

X-Azure-Ref: [0uZF3ZQAAAABF18MkSPe9RaE68NK/v3mlTE9OMjFFREdFMTgxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=]
Date: [Mon, 11 Dec 2023 22:48:24 GMT]
Content-Type: [application/json]
X-Cache: [CONFIG_NOCACHE]

Body: 

{"error":{"code":"Denied","message":"Denied by the resource provider."}}

Is this related to rate limiting? If shouldn't there be a retry-after header?

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
1,239 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,454 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.