# Account Activities Error Message in Saved Search Query

**URL:** <https://developer.sailpoint.com/discuss/t/account-activities-error-message-in-saved-search-query/22449>\
**Category:** SHF Discussion and Questions\
**Tags:** apis, identity-security-cloud, search\
**Created:** [December 11, 2023, 11:48am UTC](https://developer.sailpoint.com/discuss/t/account-activities-error-message-in-saved-search-query/22449 "2023-12-11T11:48:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShuenShuen1](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@ShuenShuen1](https://developer.sailpoint.com/discuss/u/ShuenShuen1)\
**Post date:** [December 11, 2023, 11:48am UTC](https://developer.sailpoint.com/discuss/t/account-activities-error-message-in-saved-search-query/22449/1 "2023-12-11T11:48:52Z")

</div>

Hi all.

We are scheduling saved search to send out report but we are having issues to include Account Activities error message in the reports columns. The report to be sent is expected to include a list of failed accounts after daily aggregation.

In **POST /v3/search** API, we include the “accountRequests.result.errors” and the error message can be returned in the API response.

However, in the **POST /v3/saved-searches** API, the report generated doesn’t include the error message as what I saw from the previous API response.

This is the request body:

```auto
{
    "name": "Failed Account After Aggregation From All Target",
    "description": "Failed Account Status After Aggregation in all target systems in the past 24 hours.",
    "indices": [
        "accountactivities"
    ],
    "public":false,
    "columns":{
    "accountactivities": [
            {
                "field": "recipient",
                "header": "User"
            },
            {
                "field": "accountRequests.result.errors",
                "header": "Error"
            }
    ]
    },
    "query": "created:[now-1d TO now] AND status:incomplete AND (sources:\"AD-source\")"

}

```

Any help provided is very much appreciated!

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [January 3, 2024, 3:32pm UTC](https://developer.sailpoint.com/discuss/t/account-activities-error-message-in-saved-search-query/22449/2 "2024-01-03T15:32:07Z")

</div>

Since the output of a saved search is a CSV file, I’m guessing the issue is in trying to reference an array field in your column. It is likely expecting a single value field, like a string, number, or object. I don’t think you can used saved search to export array fields. You can try just exporting the entire `accountRequests` field in the column to capture all of the information.

```json
{
      "field": "accountRequests",
      "header": "Error"
}

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [March 3, 2024, 3:32pm UTC](https://developer.sailpoint.com/discuss/t/account-activities-error-message-in-saved-search-query/22449/3 "2024-03-03T15:32:44Z")

</div>

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