Skip to content

Azure DNS Validation Failes with (400) Bad Request #2359

@tenscrolls

Description

@tenscrolls

When using manual validation on dns-01 with azure since the latest upgrade, the TXT records are not able to be validated?
Service Principal has access,
DNS is fine and domain HTTP configured on IIS on server side.
Error with redacted details below

PLEASE NOTE THE ISSUE IS A BAD REQUEST BEING SEN TO AZURE DNS FROM WINACME? No other issues, unless I am missing something i the command sent

wacs.exe --target manual --host "HOSTNAME" --reuse-privatekey --ocsp-must-staple --siteid X --certificatestore My --validationmode dns-01 --validation azure --azuretenantid <TID> --azuresubscriptionid <SID> --azureclientid <CID> --azuresecret <SECRET> --azureresourcegroupname <RSG>;

THE RESPONSE:

`[VERB] Starting commit stage
[DBUG] [HTTP] Send PUT to https://management.azure.com/subscriptions/SID/resourceGroups/RSG/providers/Microsoft.Network/dnsZones/domain/TXT/_acme-challenge.domain?api-version=2018-05-01
[VERB] [HTTP] Request content: {"properties":{"TXTRecords":[{"value":["VALUE]}]}}
[VERB] [HTTP] Request completed with status BadRequest
[VERB] [HTTP] Response content: {"code":"BadRequest","message":"The request was invalid."}
[EROR] Error updating DNS records in domain
Azure.RequestFailedException: Service request failed.
Status: 400 (Bad Request)

Content:
{"code":"BadRequest","message":"The request was invalid."}

Headers:
Cache-Control: private
Date: Tue, 18 Apr 2023 16:40:35 GMT
Server: Microsoft-IIS/10.0
X-Content-Type-Options: REDACTED
Strict-Transport-Security: REDACTED
x-ms-request-id: REQUESTID
X-Powered-By: REDACTED
x-ms-ratelimit-remaining-subscription-resource-requests: REDACTED
x-ms-correlation-request-id: REDACTED
x-ms-routing-request-id: REDACTED
Content-Length: 58
Content-Type: application/json; charset=utf-8`

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions