[ { "id": "adex06-1", "type": "tab", "label": "Attribute values and overrides - DRY RUN", "disabled": false, "info": "Each row is independent. Explicit message fields override editor fallbacks; attributeChanges entries override message fields. Selecting attributes in the editor suggests a value type, but message-driven attribute names need a matching msg.ad.valueType. Multi-value set REPLACES all values, it does not append. Empty string is not clear. countryCode cannot be cleared: read/save its original value before any real change; replace the reset example value 0 with that confirmed original value. A dry-run reports planned changes; repeating it does not create a no-op unless AD already contains those values. Technical error details may contain internal information." }, { "id": "adex06-2", "type": "ms-ad-config", "name": "Example Active Directory - CONFIGURE ME", "protocol": "ldaps", "host": "dc.example.com", "port": "", "baseDN": "DC=example,DC=com", "tlsEnabled": true, "rejectUnauthorized": true, "tlsServername": "", "caCert": "", "caCertPath": "" }, { "id": "adex06-3", "type": "comment", "z": "adex06-1", "name": "Attribute values and overrides - DRY RUN", "x": 350, "y": 40, "wires": [], "info": "Each row is independent. Explicit message fields override editor fallbacks; attributeChanges entries override message fields. Selecting attributes in the editor suggests a value type, but message-driven attribute names need a matching msg.ad.valueType. Multi-value set REPLACES all values, it does not append. Empty string is not clear. countryCode cannot be cleared: read/save its original value before any real change; replace the reset example value 0 with that confirmed original value. A dry-run reports planned changes; repeating it does not create a no-op unless AD already contains those values. Technical error details may contain internal information.\n\nManual Injects only. All writes are DRY RUN in both node and message. Replace neutral identities and configure AD credentials before running. No credentials are embedded." }, { "id": "adex06-4", "type": "debug", "z": "adex06-1", "name": "Would change (dry-run) / changed", "x": 1150, "y": 80, "wires": [], "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg" }, { "id": "adex06-5", "type": "debug", "z": "adex06-1", "name": "Already in desired state", "x": 1150, "y": 130, "wires": [], "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg" }, { "id": "adex06-6", "type": "debug", "z": "adex06-1", "name": "Error incl. msg.error", "x": 1150, "y": 180, "wires": [], "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg" }, { "id": "adex06-7", "type": "function", "z": "adex06-1", "name": "Inspect result and msg.error", "x": 870, "y": 110, "wires": [ [ "adex06-4" ], [ "adex06-5" ], [ "adex06-6" ] ], "func": "const result = msg.ad.result;\nif (!result || !result.success) { msg.payload = { error: msg.error || (result && result.error), result }; return [null, null, msg]; }\nmsg.payload = { dryRun: result.dryRun, changed: result.changed, alreadyInDesiredState: result.alreadyInDesiredState, changes: result.changes };\nreturn result.alreadyInDesiredState ? [null, msg, null] : [msg, null, null];", "outputs": 3, "noerr": 0, "initialize": "", "finalize": "", "libs": [] }, { "id": "adex06-8", "type": "inject", "z": "adex06-1", "name": "Set title", "x": 230, "y": 280, "wires": [ [ "adex06-9" ] ], "props": [ { "p": "ad.user", "v": "ExampleUser", "vt": "str" }, { "p": "ad.dryRun", "v": "true", "vt": "bool" }, { "p": "ad.attributeAction", "v": "set", "vt": "str" }, { "p": "ad.attribute", "v": "title", "vt": "str" }, { "p": "ad.valueType", "v": "string", "vt": "str" }, { "p": "ad.value", "v": "Engineer", "vt": "str" } ], "once": false, "onceDelay": 0.1, "repeat": "", "crontab": "", "topic": "" }, { "id": "adex06-9", "type": "ms-ad-set-user-attribute", "z": "adex06-1", "name": "", "x": 620, "y": 280, "wires": [ [ "adex06-7" ], [ "adex06-7" ] ], "configName": "adex06-2", "baseDN": "", "customInputPaths": false, "userSearchField": "auto", "attribute": "title", "action": "set", "valueType": "string", "value": "Editor fallback", "outputProperty": "ad.result", "dryRun": true }, { "id": "adex06-10", "type": "inject", "z": "adex06-1", "name": "Set telephoneNumber", "x": 230, "y": 390, "wires": [ [ "adex06-11" ] ], "props": [ { "p": "ad.user", "v": "ExampleUser", "vt": "str" }, { "p": "ad.dryRun", "v": "true", "vt": "bool" }, { "p": "ad.attributeAction", "v": "set", "vt": "str" }, { "p": "ad.attribute", "v": "telephoneNumber", "vt": "str" }, { "p": "ad.valueType", "v": "string", "vt": "str" }, { "p": "ad.value", "v": "+49 555 0100", "vt": "str" } ], "once": false, "onceDelay": 0.1, "repeat": "", "crontab": "", "topic": "" }, { "id": "adex06-11", "type": "ms-ad-set-user-attribute", "z": "adex06-1", "name": "", "x": 620, "y": 390, "wires": [ [ "adex06-7" ], [ "adex06-7" ] ], "configName": "adex06-2", "baseDN": "", "customInputPaths": false, "userSearchField": "auto", "attribute": "title", "action": "set", "valueType": "string", "value": "Editor fallback", "outputProperty": "ad.result", "dryRun": true }, { "id": "adex06-12", "type": "inject", "z": "adex06-1", "name": "Set employeeID", "x": 230, "y": 500, "wires": [ [ "adex06-13" ] ], "props": [ { "p": "ad.user", "v": "ExampleUser", "vt": "str" }, { "p": "ad.dryRun", "v": "true", "vt": "bool" }, { "p": "ad.attributeAction", "v": "set", "vt": "str" }, { "p": "ad.attribute", "v": "employeeID", "vt": "str" }, { "p": "ad.valueType", "v": "string", "vt": "str" }, { "p": "ad.value", "v": "ID-00042", "vt": "str" } ], "once": false, "onceDelay": 0.1, "repeat": "", "crontab": "", "topic": "" }, { "id": "adex06-13", "type": "ms-ad-set-user-attribute", "z": "adex06-1", "name": "", "x": 620, "y": 500, "wires": [ [ "adex06-7" ], [ "adex06-7" ] ], "configName": "adex06-2", "baseDN": "", "customInputPaths": false, "userSearchField": "auto", "attribute": "title", "action": "set", "valueType": "string", "value": "Editor fallback", "outputProperty": "ad.result", "dryRun": true }, { "id": "adex06-14", "type": "inject", "z": "adex06-1", "name": "employeeNumber keeps leading zeros", "x": 230, "y": 610, "wires": [ [ "adex06-15" ] ], "props": [ { "p": "ad.user", "v": "ExampleUser", "vt": "str" }, { "p": "ad.dryRun", "v": "true", "vt": "bool" }, { "p": "ad.attributeAction", "v": "set", "vt": "str" }, { "p": "ad.attribute", "v": "employeeNumber", "vt": "str" }, { "p": "ad.valueType", "v": "string", "vt": "str" }, { "p": "ad.value", "v": "00042", "vt": "str" } ], "once": false, "onceDelay": 0.1, "repeat": "", "crontab": "", "topic": "" }, { "id": "adex06-15", "type": "ms-ad-set-user-attribute", "z": "adex06-1", "name": "", "x": 620, "y": 610, "wires": [ [ "adex06-7" ], [ "adex06-7" ] ], "configName": "adex06-2", "baseDN": "", "customInputPaths": false, "userSearchField": "auto", "attribute": "title", "action": "set", "valueType": "string", "value": "Editor fallback", "outputProperty": "ad.result", "dryRun": true }, { "id": "adex06-16", "type": "inject", "z": "adex06-1", "name": "Explicit clear (no value)", "x": 230, "y": 720, "wires": [ [ "adex06-17" ] ], "props": [ { "p": "ad.user", "v": "ExampleUser", "vt": "str" }, { "p": "ad.dryRun", "v": "true", "vt": "bool" }, { "p": "ad.attributeAction", "v": "clear", "vt": "str" }, { "p": "ad.attribute", "v": "telephoneNumber", "vt": "str" } ], "once": false, "onceDelay": 0.1, "repeat": "", "crontab": "", "topic": "" }, { "id": "adex06-17", "type": "ms-ad-set-user-attribute", "z": "adex06-1", "name": "", "x": 620, "y": 720, "wires": [ [ "adex06-7" ], [ "adex06-7" ] ], "configName": "adex06-2", "baseDN": "", "customInputPaths": false, "userSearchField": "auto", "attribute": "title", "action": "set", "valueType": "string", "value": "Editor fallback", "outputProperty": "ad.result", "dryRun": true }, { "id": "adex06-18", "type": "inject", "z": "adex06-1", "name": "carLicense: array replaces list", "x": 230, "y": 830, "wires": [ [ "adex06-19" ] ], "props": [ { "p": "ad.user", "v": "ExampleUser", "vt": "str" }, { "p": "ad.dryRun", "v": "true", "vt": "bool" }, { "p": "ad.attributeAction", "v": "set", "vt": "str" }, { "p": "ad.attribute", "v": "carLicense", "vt": "str" }, { "p": "ad.valueType", "v": "multiString", "vt": "str" }, { "p": "ad.value", "v": "[\"EX-AB-123\",\"EX-CD-456\"]", "vt": "json" } ], "once": false, "onceDelay": 0.1, "repeat": "", "crontab": "", "topic": "" }, { "id": "adex06-19", "type": "ms-ad-set-user-attribute", "z": "adex06-1", "name": "", "x": 620, "y": 830, "wires": [ [ "adex06-7" ], [ "adex06-7" ] ], "configName": "adex06-2", "baseDN": "", "customInputPaths": false, "userSearchField": "auto", "attribute": "title", "action": "set", "valueType": "string", "value": "Editor fallback", "outputProperty": "ad.result", "dryRun": true }, { "id": "adex06-20", "type": "inject", "z": "adex06-1", "name": "otherTelephone: one value per line", "x": 230, "y": 940, "wires": [ [ "adex06-21" ] ], "props": [ { "p": "ad.user", "v": "ExampleUser", "vt": "str" }, { "p": "ad.dryRun", "v": "true", "vt": "bool" }, { "p": "ad.attributeAction", "v": "set", "vt": "str" }, { "p": "ad.attribute", "v": "otherTelephone", "vt": "str" }, { "p": "ad.valueType", "v": "multiString", "vt": "str" }, { "p": "ad.value", "v": "+49 555 0101\n+49 555 0102", "vt": "str" } ], "once": false, "onceDelay": 0.1, "repeat": "", "crontab": "", "topic": "" }, { "id": "adex06-21", "type": "ms-ad-set-user-attribute", "z": "adex06-1", "name": "", "x": 620, "y": 940, "wires": [ [ "adex06-7" ], [ "adex06-7" ] ], "configName": "adex06-2", "baseDN": "", "customInputPaths": false, "userSearchField": "auto", "attribute": "title", "action": "set", "valueType": "string", "value": "Editor fallback", "outputProperty": "ad.result", "dryRun": true }, { "id": "adex06-22", "type": "inject", "z": "adex06-1", "name": "countryCode: set number", "x": 230, "y": 1050, "wires": [ [ "adex06-23" ] ], "props": [ { "p": "ad.user", "v": "ExampleUser", "vt": "str" }, { "p": "ad.dryRun", "v": "true", "vt": "bool" }, { "p": "ad.attributeAction", "v": "set", "vt": "str" }, { "p": "ad.attribute", "v": "countryCode", "vt": "str" }, { "p": "ad.valueType", "v": "number", "vt": "str" }, { "p": "ad.value", "v": "276", "vt": "num" } ], "once": false, "onceDelay": 0.1, "repeat": "", "crontab": "", "topic": "" }, { "id": "adex06-23", "type": "ms-ad-set-user-attribute", "z": "adex06-1", "name": "", "x": 620, "y": 1050, "wires": [ [ "adex06-7" ], [ "adex06-7" ] ], "configName": "adex06-2", "baseDN": "", "customInputPaths": false, "userSearchField": "auto", "attribute": "title", "action": "set", "valueType": "string", "value": "Editor fallback", "outputProperty": "ad.result", "dryRun": true }, { "id": "adex06-24", "type": "inject", "z": "adex06-1", "name": "countryCode: reset SAVED value (edit 0)", "x": 230, "y": 1160, "wires": [ [ "adex06-25" ] ], "props": [ { "p": "ad.user", "v": "ExampleUser", "vt": "str" }, { "p": "ad.dryRun", "v": "true", "vt": "bool" }, { "p": "ad.attributeAction", "v": "set", "vt": "str" }, { "p": "ad.attribute", "v": "countryCode", "vt": "str" }, { "p": "ad.valueType", "v": "number", "vt": "str" }, { "p": "ad.value", "v": "0", "vt": "num" } ], "once": false, "onceDelay": 0.1, "repeat": "", "crontab": "", "topic": "" }, { "id": "adex06-25", "type": "ms-ad-set-user-attribute", "z": "adex06-1", "name": "", "x": 620, "y": 1160, "wires": [ [ "adex06-7" ], [ "adex06-7" ] ], "configName": "adex06-2", "baseDN": "", "customInputPaths": false, "userSearchField": "auto", "attribute": "title", "action": "set", "valueType": "string", "value": "Editor fallback", "outputProperty": "ad.result", "dryRun": true }, { "id": "adex06-26", "type": "inject", "z": "adex06-1", "name": "Mixed batch: entries take precedence", "x": 230, "y": 1270, "wires": [ [ "adex06-27" ] ], "props": [ { "p": "ad.user", "v": "ExampleUser", "vt": "str" }, { "p": "ad.dryRun", "v": "true", "vt": "bool" }, { "p": "ad.attributeAction", "v": "set", "vt": "str" }, { "p": "ad.attribute", "v": "title", "vt": "str" }, { "p": "ad.valueType", "v": "number", "vt": "str" }, { "p": "ad.attributeChanges", "v": "[{\"attribute\":\"title\",\"type\":\"string\",\"value\":\"Analyst\"},{\"attribute\":\"otherTelephone\",\"type\":\"multiString\",\"value\":[\"+49 555 0103\",\"+49 555 0104\"]},{\"attribute\":\"info\",\"type\":\"string\",\"action\":\"clear\"}]", "vt": "json" } ], "once": false, "onceDelay": 0.1, "repeat": "", "crontab": "", "topic": "" }, { "id": "adex06-27", "type": "ms-ad-set-user-attribute", "z": "adex06-1", "name": "", "x": 620, "y": 1270, "wires": [ [ "adex06-7" ], [ "adex06-7" ] ], "configName": "adex06-2", "baseDN": "", "customInputPaths": false, "userSearchField": "auto", "attribute": "title", "action": "set", "valueType": "string", "value": "Editor fallback", "outputProperty": "ad.result", "dryRun": true }, { "id": "adex06-28", "type": "inject", "z": "adex06-1", "name": "Invalid input: inspect error output", "x": 230, "y": 1380, "wires": [ [ "adex06-29" ] ], "props": [ { "p": "ad.user", "v": "ExampleUser", "vt": "str" }, { "p": "ad.dryRun", "v": "true", "vt": "bool" }, { "p": "ad.attributeAction", "v": "set", "vt": "str" }, { "p": "ad.attribute", "v": "manager", "vt": "str" }, { "p": "ad.valueType", "v": "dn", "vt": "str" }, { "p": "ad.value", "v": "not-a-dn", "vt": "str" }, { "p": "ad.includeErrorDetails", "v": "true", "vt": "bool" } ], "once": false, "onceDelay": 0.1, "repeat": "", "crontab": "", "topic": "" }, { "id": "adex06-29", "type": "ms-ad-set-user-attribute", "z": "adex06-1", "name": "", "x": 620, "y": 1380, "wires": [ [ "adex06-7" ], [ "adex06-7" ] ], "configName": "adex06-2", "baseDN": "", "customInputPaths": false, "userSearchField": "auto", "attribute": "title", "action": "set", "valueType": "string", "value": "Editor fallback", "outputProperty": "ad.result", "dryRun": true } ]