Search query to fetch account attributes

Hello Community,

I have been trying to fetch the account attributes of a AD source, based on that result to build a workflow .
but i don’t see any supportive doc related to fetch value related accounts

ex: @accounts(source.name:xyz )AND account.samAccountname

Has anybody came across such situation to filter these results?
any API which will give account attribute details?

you want to know, for example samAccountname for a user?

not that attributes.. A date attribute coming from a source

please clarify: do you need see date info of a particular identity of some xyz source?

You can use below api to get the account attributes of an identity.

/v3/accounts?filters=identityId eq “identityid” and source.name eq “Azure Active Directory”

You should be able use the API https://xxxx.api.identitynow.com/v3/accounts/ to pull the required details instead of using search query in workflow.

Hello, As far as I know, you can only fetch the Identity attributes using attribute. but not the account attributes which are present in account schema.

Using the Rich REST APIs of SailPoint ISC, you can achieve that but not through Search Queries.

Hi All,
I m using search query(v3/search) to identity “disabled=false” accounts and trying to fetch account id by using this expression in a variable.
however its not substituting any value.
is something wrong with this expr
$.hTTPRequest.body.accounts[?(@.sourceName==‘xyz’)].id

Hi,

You can apply this filter directly in API of getting account then you can store the account id in variable.

Thanks.

This expression will not work as the sailpoint defineVariable operator only stores string & the above expression will return the array.

If you still want the JSON Path expression use the below expression to get a accountID based on the source id from HTTP Request body:

P.S This will also not work in define Variable but you will be able to see it being evaluated just not being stored

$.hTTPRequest.body[*].accounts[?(@.source.name=="xxxx" )].id

This will return the account ID for the respective source if it exists. You can use Json Path Evaluator | SailPoint Developer Community to verify the JSON Path.

Tried this query: @accounts(source.name: "Source Name") AND @account(_exists_ samAccountname:*), but it didn’t work.
I even modified it a bit, but still no results showed up.

hi @Neeraj ,
I tried with this expression as well in loopinput
its not fetching accountid

1 Like

@nidhipriya the easiest way I can tell is 2 step process.

  1. Map the AD source attribute to one of the identity attributes. Lets say DateFromAd.
  2. Then in search query choose column DateFromAd from column chooser.

Let me know if you have any questions.
Thank you,
Vaibhav

1 Like

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