Signing using Azure Trusted Signing fails with 403 Error

Andrew 0 Reputation points
2025-06-11T11:02:43.5233333+00:00

We have a CI pipeline that uses signtool with Azure Trusted Signing to sign binaries and it just randomly broke last week. None of the configurations were changed and it suddenly randomly decided to fail with a 403 error.

Maybe related: https://learn.microsoft.com/en-us/answers/questions/2282310/how-to-troubeshoot-403-error-when-using-trusted-si

We have already reverified that the required variables are correct and present (again, the pipeline just randomly broke with no changes in Azure or on the pipeline end).

[
  {
    "cloudName": "AzureCloud",
    "homeTenantId": "***",
    "id": "***",
    "isDefault": true,
    "managedByTenants": [],
    "name": "Azure subscription",
    "state": "Enabled",
    "tenantId": "***",
    "user": {
      "name": "***",
      "type": "servicePrincipal"
    }
  }
]

Trusted Signing

Version: 1.0.60

"Metadata": {
  "Endpoint": "***",
  "CodeSigningAccountName": "***",
  "CertificateProfileName": "***",
  "ExcludeCredentials": []
}

Submitting digest for signing...
Unhandled managed exception
Azure.RequestFailedException: Service request failed.
Status: 403 (Forbidden)

Headers:
Date: Tue, 10 Jun 2025 10:20:17 GMT
Connection: keep-alive
Strict-Transport-Security: REDACTED
x-azure-ref: REDACTED
X-Cache: REDACTED
Content-Length: 0

   at Azure.CodeSigning.CertificateProfileRestClient.SignAsync(String codeSigningAccountName, String certificateProfileName, SignRequest body, String xCorrelationId, String clientVersion, CancellationToken cancellationToken)
   at Azure.CodeSigning.CertificateProfileClient.StartSignAsync(String codeSigningAccountName, String certificateProfileName, SignRequest body, String xCorrelationId, String clientVersion, CancellationToken cancellationToken)
   at Azure.CodeSigning.Dlib.Core.DigestSigner.SignAsync(UInt32 algorithm, Byte[] digest, SafeFileHandle safeFileHandle, CancellationToken cancellationToken)
   at Azure.CodeSigning.Dlib.Core.DigestSigner.Sign(UInt32 algorithm, Byte[] digest, SafeFileHandle safeFileHandle)
   at AuthenticodeDigestSignExWithFileHandleManaged(_CRYPTOAPI_BLOB* pMetadataBlob, UInt32 digestAlgId, Byte* pbToBeSignedDigest, UInt32 cbToBeSignedDigest, Void* hFile, _CRYPTOAPI_BLOB* pSignedDigest, _CERT_CONTEXT** ppSignerCert, Void* hCertChainStore)

Error information: "Error: SignerSign() failed." (-2147467259/0x80004005)
SignTool Error: An unexpected internal error has occurred.
The application signing was not successful.

Azure Trusted Signing
Azure Trusted Signing
Trusted Signing is a Microsoft fully managed, end-to-end signing solution that simplifies the certificate signing process and helps partner developers more easily build and distribute applications.
244 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Meha-MSFT 1,165 Reputation points Microsoft Employee Moderator
    2025-06-11T16:48:11.0833333+00:00

    https://learn.microsoft.com/en-us/azure/trusted-signing/faq#common-error-codes-and-mitigations

    Error code (-2147467259/0x80004005)If you use Service Principal + certificate based authentication, check your Environment Variables listed under the table for "Service principal with certificate".


  2. Meha-MSFT 1,165 Reputation points Microsoft Employee Moderator
    2025-06-13T20:46:22.0566667+00:00

    Let us take a look.

    0 comments No comments

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.