# Role Assignment Question

**URL:** <https://developer.sailpoint.com/discuss/t/role-assignment-question/372>\
**Category:** IIQ Discussion and Questions\
**Created:** [March 31, 2021, 6:47pm UTC](https://developer.sailpoint.com/discuss/t/role-assignment-question/372 "2021-03-31T18:47:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrickboston](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/patrickboston/32/5876_2.png) [@patrickboston](https://developer.sailpoint.com/discuss/u/patrickboston)\
**Post date:** [March 31, 2021, 6:47pm UTC](https://developer.sailpoint.com/discuss/t/role-assignment-question/372/1 "2021-03-31T18:47:26Z")

</div>

Question about role assignment for a specific situation I am encountering.

We have a Joiner Workflow that looks for roles that should be assigned to an identity and builds a provisioning plan to provision these roles via an IIQ AccountRequest. These roles show as being assigned by source LCM and the assigner as RequestHandler. This gives high visibility into what roles were assigned to provision the birthright accounts by seeing what was assigned in the IdentityRequest that is generated.

Let’s say the assignment logic on one of the roles changes. The expectation would be for the refresh task (with appropriate options set) would now remove that role because the identity no longer meets the auto assignment criteria. However, it seems that because this role was assigned via LCM and has an assigner (RequestHandler), it’s treating the role like something that was manually assigned and will not automatically pull the role off of the identity.

I understand that this is probably expected behavior so roles can be requested and stay vs automatically assigned and deassigned. I guess my main question is: **What attribute needs to be removed from the RoleAssignment to ensure roles that are assigned through these workflows can later on be automatically removed via the refresh task? Should the source be “Rule” rather than “LCM”? Or should there not be an “assigner” present?**

I turned on logging on a few different classes and didn’t see anything too obvious to point out what would keep these roles that appear as “manually assigned”.

---

<div class="post-metadata">

**Author:** ![drosenbauer](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/drosenbauer/32/3381_2.png) [@drosenbauer](https://developer.sailpoint.com/discuss/u/drosenbauer)\
**Post date:** [March 31, 2021, 10:43pm UTC](https://developer.sailpoint.com/discuss/t/role-assignment-question/372/2 "2021-03-31T22:43:49Z")

</div>

The source of “Rule” is the correct answer.

However, if your users match the assignment logic anyway, I would think that you may as well use auto-assignment instead of a Joiner.

---

<div class="post-metadata">

**Author:** ![patrickboston](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/patrickboston/32/5876_2.png) [@patrickboston](https://developer.sailpoint.com/discuss/u/patrickboston)\
**Post date:** [April 1, 2021, 12:10am UTC](https://developer.sailpoint.com/discuss/t/role-assignment-question/372/3 "2021-04-01T00:10:45Z")

</div>

Yeah - I guess I thought it would be nice to see the joiner lifecycle event and what roles were assigned. Since our auth source is SAP HCM, everything is action code based, so there is actually a generic workflow that calculates the roles and assigns them and then I built out a framework that can call certain rules based on the numerous different action codes that can be passed down to us.

I will do some testing on changing the source to “Rule”. I think a simple plan argument will do the trick and then some kind of clean up task for all the people that are being affected by this today.

---

<div class="post-metadata">

**Author:** ![00816585](https://avatars.discourse-cdn.com/v4/letter/0/8edcca/32.png) [@00816585](https://developer.sailpoint.com/discuss/u/00816585)\
**Post date:** [April 22, 2022, 3:01pm UTC](https://developer.sailpoint.com/discuss/t/role-assignment-question/372/4 "2022-04-22T15:01:03Z")

</div>

am facing the same issue, refresh or the aggregation is not removing the role assignment even though the assignment rule is returning false, please advise.

Note: I changed the source to Rule (debug) and ran aggregation and refresh but no luck.

---

<div class="post-metadata">

**Author:** ![patrickboston](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/patrickboston/32/5876_2.png) [@patrickboston](https://developer.sailpoint.com/discuss/u/patrickboston)\
**Post date:** [April 22, 2022, 3:38pm UTC](https://developer.sailpoint.com/discuss/t/role-assignment-question/372/5 "2022-04-22T15:38:17Z")

</div>

I believe I had to change the source to Rule and also set the assigner field to null to make it work. Additionality, I also did this on all the IdentityEntitlement objects associated with the RoleAssignment. Might not be necessary but wanted to be safe.

---

<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:** [July 19, 2023, 2:25pm UTC](https://developer.sailpoint.com/discuss/t/role-assignment-question/372/6 "2023-07-19T14:25:04Z")

</div>

Closed on July 19, 2023, 2:25pm UTC


