• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Issue Microsoft Azure DNS extension: record writes intermittently rejected by Azure with 400 “resource type does not match the type in the request body”

Quinten

Regular Pleskian
Server operating system version
Ubuntu 24.04 x86_64
Plesk version and microupdate number
Plesk Obsidian 18.0.82.3
Server operating system version: Ubuntu 24.04 x86_64
Plesk version and microupdate number: Plesk Obsidian 18.0.82.3


Hello,


On two Plesk servers with the Microsoft Azure DNS extension (1.2.5-8214), DNS records are intermittently not synchronized to Azure DNS. Records that exist in Plesk are missing in Azure, and the set of missing records changes between zone updates.


Nothing is logged in /var/log/plesk/panel.log. However, the Azure Activity Log of the DNS zone shows the extension’s app registration receiving 400 Bad Request on record set writes of every type (A, CNAME, TXT):


"The resource type 'Microsoft.Network/dnsZones/CNAME' does not match the type in the request body 'CNAME'."


Operation: Microsoft.Network/dnsZones/CNAME/write, status Failed, BadRequest.


It looks like the extension sends the short record type (“CNAME”, “A”, …) in the type field of the request body. Azure appears to have recently started validating this field against the resource type in the URL, apparently only on some backends, which would explain why the failures are intermittent. The DNSControl project hit the same issue and fixed it by no longer sending the type field: fix(AZURE_DNS): bug: intermittent "resource type does not match the type in the request body" errors by TomOnTime · Pull Request #5040 · DNSControl/dnscontrol


Two related observations:


  • The extension still calls the API with api-version 2016-04-01, which does not support CAA record sets (“No registered resource provider found for location ‘global’ and API version ‘2016-04-01’ for type ‘dnszones/CAA’”), so any zone with a CAA record fails to sync.
  • The extension repeatedly attempts “Delete SOA”, which Azure always rejects.

Re-saving a missing record in Plesk sometimes pushes it successfully, which matches the intermittent behavior.
 

Attachments

  • Screenshot 2026-11-16 152111.png
    Screenshot 2026-11-16 152111.png
    88.5 KB · Views: 0
The same 400 error occurs on both servers, which sync to two separate Azure tenants and subscriptions with separate app registrations, so it is not tied to one Azure environment.

Everytime i update the zone other records go missing..
This is causing alot of problems on both servers with many domains and DNS zones.
 
Hi, @Quinten . We already have a registered bug (ID EXTPLESK-14624) for the reported behavior, and our team is working on a fix. I cannot provide an ETA yet. Until the issue is fixed, the suggested workaround is:

1. Log into the server via SSH as root.
2. Save the following script as /root/azuredns-hotfix-EXTPLESK-14624.sh:
Bash:
#!/bin/bash
# Hotfix for EXTPLESK-14624 (Microsoft Azure DNS 1.2.5): stop sending the read-only "type" field
# in Azure record-set PUT bodies, which some Azure backends reject with
# 400 "The resource type ... does not match the type in the request body".
# Patches the (unencoded) vendor library. An extension update overwrites it.
# apply: bash azuredns-hotfix-EXTPLESK-14624.sh
# rollback: bash azuredns-hotfix-EXTPLESK-14624.sh --rollback
set -euo pipefail
ROOT=$( [ -d /opt/psa ] && echo /opt/psa || echo /usr/local/psa )
F="$ROOT/admin/plib/modules/azuredns/vendor/thenetworg/oauth2-azure/src/Provider/Azure.php"
BAK="$F.bak-EXTPLESK-14624"
MARK='EXTPLESK-14624 hotfix'
[ -f "$F" ] || { echo "Not found: $F"; exit 1; }
if [ "${1:-}" = "--rollback" ]; then
[ -f "$BAK" ] || { echo "No backup at $BAK"; exit 1; }
cp -p "$BAK" "$F" && echo "Rolled back: $F"
exit 0
fi
grep -q "$MARK" "$F" && { echo "Already applied: $F"; exit 0; }
grep -q "^<?php" "$F" || { echo "Unexpected file format (encoded?), not patching"; exit 1; }
[ "$(grep -cF "if (isset(\$options['body']) && ('array' == \\gettype" "$F")" = 1 ] \
|| { echo "Anchor not found exactly once, not patching"; exit 1; }
cp -p "$F" "$BAK"
LC_ALL=C perl -0pi -e 's/(\n(\s*)if \(isset\(\$options\[\x27body\x27\]\) && \(\x27array\x27 == \\gettype)/\n$2\/\/ '"$MARK"': "type" is read-only in Azure record sets, never send it\n$2if (isset(\$options[\x27body\x27]) && \\is_array(\$options[\x27body\x27])) {\n$2 unset(\$options[\x27body\x27][\x27type\x27]);\n$2}$1/' "$F"
if ! /usr/bin/sw-engine -l "$F" >/dev/null 2>&1; then
cp -p "$BAK" "$F"; echo "Syntax check failed, restored backup"; exit 1
fi
echo "Applied: $F (backup: $BAK)"
grep -n -A3 "$MARK" "$F"
3. Run the script:
Code:
bash /root/azuredns-hotfix-EXTPLESK-14624.sh
4. To repair a zone that is already incomplete, make any DNS change in Plesk for that domain (for example, add and then remove a record). The synchronization rebuilds the whole Azure zone from Plesk.
5. In the Azure portal, go to DNS zones > the zone > Recordsets and compare the records and their values with Plesk. In the Activity log of the zone, check that there are no failed Create or update record set events.
6. To roll back the hotfix, run the following command:
Code:
bash /root/azuredns-hotfix-EXTPLESK-14624.sh --rollback
 
Back
Top