Storing account id in Workflow

Hi All,

Is there a way to store the account id details of a particular source in workflow from get account action.

Thanks
Shantanu

Hi @schattopadhy,
You can store it in variable.

But what is your use case ? what do you want to do with this storing variable ?

Not also that from get account action, also subsequent steps can use variable that are retrieved.

Hi @schattopadhy ,

You can store the account_id details in a variable.

For retrieving that, you can use the “HTTP request” action in the workflow which can be designed to hit the “get source by id” endpoint of v3/beta api and from that, get the account_id of the attributes.

@baoussounda i want to get the account id and call an HTTP request to delete the user account using workflow.
Can you share some example of how to store account id using variable

Thanks
Shantanu

@schattopadhy For that you don’t want do store account id in variable.

After get account you can directly use manage account or http action for deleting accounts ?

I suppose that you have a delimeted file source ?

@schattopadhy you for example use the following workflow :

With get account action you retrieve all accounts of your identity.

With manage accounts action you can delete account by retrieving accounts retrieved with get account action but you will filter only for account that you need to delete by using following filter :

$.getAccounts.accounts[?(@.sourceName=='yoursourceName')].id

You must replace "yoursourceName’ by your source name.

Or you can also filter by your source id :

$.getAccounts.accounts[?(@.sourceId=='yoursourceId')].id

You must replace "sourceId’ by your source id.

1 Like

@baoussounda we basically are using a scim based app so we want to trigger the delete using http option only the delete account i am not sure if it will delete so we want to store the account id and pass it in http request

1 Like

@schattopadhy if you want to delete on the target you can effectively store your source id variable.

in your variable definition try to use the same filter in advanced option :

$.getAccounts.accounts[?(@.sourceName=='yoursourceName')].id

If the filter above does not work, try

$.getAccounts.accounts[?(@.sourceName=='yoursourceName')].id[0]

You can also check with “verify data type” or compare string if the account id is not null.

Note also that if you know your sourceId and identity id you can use http action to retrieve user accounts by using list-accounts | SailPoint Developer Community.

2 Likes

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