Using Update AD Object when AD attributes have a hyphen in the name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2022 02:14 PM
Before I write a custom PowerShell script, has any been successful in using the out of the box Update AD Object workflow activity to update an AD attribute in which the name of the AD attribute has hyphens in the name?
For example, an attribute like msRTCSIP-DeploymentLocator?
When I pass an attribute with a hyphen in the name to that workflow activity, the activity fails and the response I get back says "The specified directory service attribute or value does not exist."
I've tried many variations of the object attribute I'm passing to the workflow activity but none have succeeded.
Thanks,
Michael Domke
- Labels:
-
Orchestration (ITOM)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2022 02:44 PM
Hi,
Have you tried using square bracket notation [ ] ?
Ideally, if you can avoid having it hyphenated, that would be the best outcome, but you can try using square brackets and see if that works for you. Also, you can try quotes around it as well, additionally, if already using them, as they may be escaped.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2022 03:09 PM
The hyphenated attributes are out of the box in AD, for example, msRTCSIP-DeploymentLocator, so I have no control over that.
I have tried quite a few variations:
- obj.['msRTCSIP-DeploymentLocator'] = value
- obj.["['msRTCSIP-DeploymentLocator']"] = value
- obj.["[msRTCSIP-DeploymentLocator]"] = value
- obj.["('msRTCSIP-DeploymentLocator')"] = value
- obj.["(msRTCSIP-DeploymentLocator)"] = value
I'm sure there were a few others but they all returned the "attribute value doesn't exist" message.
I'm not very confident it's possible using the Update AD Object activity so I'm going to move forward with a custom PowerShell script.
Michael

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2022 03:18 PM
Hi,
Yeah, sorry, my point I meant was if you can avoid even working with hyphenated AD Objects, regardless of their availability out of box, within the context of ServiceNow, I'd avoid it, haha.
It's been known to cause problems, another example here: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0713097
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2022 05:23 AM
Thanks for the link to the Support KB. Workaround, "...use PowerShell..." 🙂