# Get Users With More Than One Account in the authoritative source like Workday

**URL:** <https://developer.sailpoint.com/discuss/t/get-users-with-more-than-one-account-in-the-authoritative-source-like-workday/13320>\
**Category:** SHF Discussion and Questions\
**Tags:** identity-security-cloud, aggregation\
**Created:** [June 26, 2023, 7:23am UTC](https://developer.sailpoint.com/discuss/t/get-users-with-more-than-one-account-in-the-authoritative-source-like-workday/13320 "2023-06-26T07:23:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kalyannambi2010](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@kalyannambi2010](https://developer.sailpoint.com/discuss/u/kalyannambi2010)\
**Post date:** [June 26, 2023, 7:23am UTC](https://developer.sailpoint.com/discuss/t/get-users-with-more-than-one-account-in-the-authoritative-source-like-workday/13320/1 "2023-06-26T07:23:30Z")

</div>

Hi Team,

We would like to search in IDN to get users with more than one account in the authoritative source like Workday and restrtict for only one source.

Thanks  
Kalyan

---

<div class="post-metadata">

**Author:** ![rajeshs](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@rajeshs](https://developer.sailpoint.com/discuss/u/rajeshs)\
**Post date:** [June 26, 2023, 9:14am UTC](https://developer.sailpoint.com/discuss/t/get-users-with-more-than-one-account-in-the-authoritative-source-like-workday/13320/2 "2023-06-26T09:14:07Z")

</div>

I don’t think the above can be done via Search. The below link provides us the explanation which can be helpful. Hope it helps

> [@Get Users With More Than One Account in the Same Source](https://developer.sailpoint.com/discuss/t/get-users-with-more-than-one-account-in-the-same-source/338/13?_ga=2.88438879.559418066.1687767870-422826209.1682826138):
>
> The query above will only work when limiting by authoritative source. The reason for this is that the top level source object on an identity object is that identity’s authoritative source. If you need to restrict your query to a non-authoritative source, then you will need to use the following query. { "query": { "query": "@accounts(source.id:2c918088814e6a610181686b56977fa8)" }, "indices": ["identities"], "aggregationsDsl": { "accounts": { …

---

<div class="post-metadata">

**Author:** ![kalyannambi2010](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@kalyannambi2010](https://developer.sailpoint.com/discuss/u/kalyannambi2010)\
**Post date:** [June 26, 2023, 11:51am UTC](https://developer.sailpoint.com/discuss/t/get-users-with-more-than-one-account-in-the-authoritative-source-like-workday/13320/3 "2023-06-26T11:51:14Z")

</div>

Hi Rajesh Kumar,

Thank you for your reply and I have already tried to execute this for authoritative source but I was getting error using Postman.

Thanks  
Kalyan

---

<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:** [June 26, 2023, 2:23pm UTC](https://developer.sailpoint.com/discuss/t/get-users-with-more-than-one-account-in-the-authoritative-source-like-workday/13320/4 "2023-06-26T14:23:34Z")

</div>

The solution that @rajeshs linked above should work for your use case. What error are you receiving?

---

<div class="post-metadata">

**Author:** ![rajeshs](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@rajeshs](https://developer.sailpoint.com/discuss/u/rajeshs)\
**Post date:** [June 26, 2023, 6:33pm UTC](https://developer.sailpoint.com/discuss/t/get-users-with-more-than-one-account-in-the-authoritative-source-like-workday/13320/5 "2023-06-26T18:33:05Z")

</div>

@kalyannambi2010 Can you please post the error message ?

---

<div class="post-metadata">

**Author:** ![kalyannambi2010](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@kalyannambi2010](https://developer.sailpoint.com/discuss/u/kalyannambi2010)\
**Post date:** [June 28, 2023, 6:43am UTC](https://developer.sailpoint.com/discuss/t/get-users-with-more-than-one-account-in-the-authoritative-source-like-workday/13320/6 "2023-06-28T06:43:38Z")

</div>

Hi Colin and Rajesh,

Looks like the query is working now and we are testing the query with our data. I will reach out to you again if I face any issues.

Thanks  
Kalyan

---

<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:** [August 27, 2023, 6:44am UTC](https://developer.sailpoint.com/discuss/t/get-users-with-more-than-one-account-in-the-authoritative-source-like-workday/13320/7 "2023-08-27T06:44:26Z")

</div>

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