Azure Connector FilterString question

I have had no luck trying to use filterstring on an azure connector source. i am referencing the following link https://community.sailpoint.com/t5/IdentityNow-Wiki/IdentityNow-Account-Filtering-during-Account-Aggregation/ta-p/142873.

the following filters i tried do not work. has anyone successfully created a working contains filter for azure for user attributes?

`onPremisesDistinguishedName.contains( "Divisions" )"
onPremisesDistinguishedName.contains("Divisions")"
onPremisesDistinguishedName.contains("Divisions")"
onPremisesDistinguishedName.contains(ā€˜Divisionsā€™)"
onPremisesDistinguishedName.containsIgnoreCase("Divisions")"``

Hi Eddie,

Looking at the filters youā€™ve shared, it just be missing escape characters for your filter value:

onPremisesDistinguishedName.contains(\ā€œDivisions\ā€)
Edit: just realised you may very well have escape characters in your filters but the post didnā€™t reflect itā€¦ I had to double escape mine just now to make it render correctly aboveā€¦ so ignore that part if youā€™ve already escaped "
image

What does the filterString property look like on your source JSON?

Also if this is using the VA connector and you have access to the ccg logs Iā€™d suggest turning on debug for the AAD connector and checking what error is being reported back, it is almost always syntax related as I recently found out when using filterString for grouips.

As per the document in the link you have shared the filterString needs to be inside parenthesis.

[
  {
    "op": "add",
    "path": "/connectorAttributes/filterString",
    "value": "( type != \"Employee\" )"
  }
]

So, I suppose your filterString should be

(onPremisesDistinguishedName.contains(\"Divisions\"))

Hi iamology,

I already tried the two below as well, and they did not work either. i forgot to include these in values iā€™ve tried already, in my original post. I am not getting an error and it does slightly change what i get back from the aggregation, but the output from the aggregation still has user accounts that do not match the filterstring i am using.

(onPremisesDistinguishedName.contains(\"Divisions\"))
((onPremisesDistinguishedName.contains(\"Divisions\")))

Isnā€™t that what it is supposed to do? I thought filterString filters out the records that match the string

1 Like

Iamology, you are a genius sir. I had the filter logic backwards after correcting the format. The filter is now working as expected. Thanks for everyoneā€™s help.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.