Need syntax help with Look up Objects by Filter action in Flow (MS Active Directory v2 Spoke)

gjz
Mega Sage

Hello,

 

I'm trying to convert from Workflows using Orchestration to Flows using Spokes when creating new users.  I'm struggling with syntax, I can't seem to find anything that fits what the ServiceNow action is expecting and their help doesn't have any examples.

 

I need to search Active Directory to determine if either the UserID or Email address already exists in AD.  To do this, I'm using the MS AD v2 action Look up Objects by Filter.

 

If the new user is Jane Doe, her UserID (sAMAccountName) is JaneD and her email (mail) is jane_doe@my.company.somewhere.

 

I created flow variables since the UserID and email will be used multiple times in the Flow.

gjz_0-1727224112322.png

 

Spelled out, the AD Filter would read (|samaccountname=JaneD)(mail=jane_doe@my.company.somewhere))

 

Here is the action:

gjz_1-1727224168733.png

 

When I run the flow, I'm getting this error message:

gjz_2-1727224295054.png

 

Does anyone know what is wrong with the search filter?  It's the same filter that is used for the Orchestration action QueryAD.

0 REPLIES 0