Dynamic DNS, with a domain in Azure can i edit config.xml to set subscription id

Started by scottsdaleaz, May 24, 2025, 03:51:28 AM

Previous topic - Next topic
The gui does not offer an ability to set the subscription id for an Azure based domain name.

Can i edit this config.xml directly?  If so what keys do i need to add?

    <DynDNS version="1.5.1">
      <general>
        <enabled>1</enabled>
        <verbose>0</verbose>
        <allowipv6>0</allowipv6>
        <daemon_delay>300</daemon_delay>
        <backend>opnsense</backend>
      </general>
      <accounts>
        <account uuid="cad3372f-5967-43a2-bb6c-0464b668b17e">
          <enabled>1</enabled>
          <service>azure</service>
          <protocol/>
          <server/>
          <username>2727f4f0-6beb-405b-87c3-f6eaf7eb37a5</username>
          <password>2e1910c8-f0b2-4a21-adcb-6822ac9c9cf9</password>
          <resourceId>d6fbdc4b-9684-4087-b56f-c23dac47140e</resourceId>
          <hostnames>cav.dummydomain.com</hostnames>
          <wildcard>0</wildcard>
          <zone/>
          <checkip>web_dyndns</checkip>
          <dynipv6host/>
          <checkip_timeout>10</checkip_timeout>
          <force_ssl>1</force_ssl>
          <ttl>300</ttl>
          <interface>wan</interface>
          <description>dummydomain_inxsol</description>
        </account>
      </accounts>
    </DynDNS>
  </OPNsense>


Given the commit that resolved https://github.com/opnsense/plugins/issues/3037, the subscription id goes into the resource id that shows up in advanced mode...

I've never used ddclient, dynDNS or Azure. Just a bit of research...


Are you saying that the id you input in the UI resourceId is nowhere to be found in config.xml, likely right along the rest of your identifiers?

The dialog does not have a field for subscription id, and if i try using "resourceId" with sunscription id entered into it -  it doesn't solve the issue.  OnPF sense i recall setting both.





"subsciptionid" (assumed) is not present in the config and not present in the dialog to enter it.

I had based my original answer on this line:
        "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/example/providers/Microsoft.Network/dnszones/example.com",   <---- ResourceIdWhich I took to imply that the resourceId would be plugged in the URL where a subscription Id should fit (pretty typical for REST API).

But a few lines below, there's this:
            resourceId = self.settings.get('resourceId', '')
            if resourceId.find('subscriptions/') == -1:
                syslog.syslog(syslog.LOG_ERR, 'No subscription id found for account %s' % self.description)
Which implies the resourceId must be formatted as 'subscriptions/YOUR_SUB_ID_HERE'.

The tenant ID is extracted from authentication data a few lines later.

Also, the message from the author of the commit indicates an additional setting here:
https://github.com/opnsense/plugins/issues/3037#issuecomment-1373596121

You've got a few things to try...