How to check if user is a part of role or access profile in before provisioning rule?

I have requirement to check if user is a part of role or access profile. I have to use this in before provisioning rule. Basically I get request’s uid from plan and then I need to have a check that user is part of a particular role or access profile then only performance disablement operation.

Check this link-
Java Docs | SailPoint Developer Community
It has all the methods. The one you are looking is probably under the Identity Object

This is possible only if I am using sailpoint.object.identity.
As I have uid with me and I have to first get identity object as I can’t use context object so have to use Idn RuleUtil class and it’s method idn.findIdentiesBySearchableIdentityAttribute() which return identity list and that list is of type sailpoint.rule.identity and can’t see any method to get role under this package.

Have you tried plan.getIdentity()?
In Before Provisioning this will get you the identity which is being provisioned

Already using, but it wil be the identity of a user but I need to do checks for the action taken by requester for an identity. So, from plan I get the requestor information and then perform checks.

Food for thought:

sailpoint.rule.Identity has a getId() method that returns internal unique identifier.

You can send an API request to v3/roles/:roleID/assigned-identities to check if the above ID is present in the List returned. However, this is not available for Access Profiles, and you may create some Roles just for this purpose.

You mean to say use this end point in rule? If not why I need manual action.
I want use all in before provisioning rule.
Let me rephrase my requirements.
If requester that I get from plan perform some action on account then do something.
Here I have to check if requestor is part of a role or not.
Requestor is the one who is doing enable/disable operation on an account it could be system or a person.

That’s right. And if you are not able to cancel the operation in BeforeProv rule for any reason, then you can add a flag as an argument to the plan that will let BeforeOperation to know that the operation should be cancelled and result set as FAILED

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