I understand that the GetObject operation is invoked (if defined and implemented) after a successful account create.
My question is, is it possible to invoke GetObject in a before or after rule programmatically when doing the Add Entitlement operation? How would I do it?
The response received after a successful Add Entitlement operation does not suffice for my use case. So currently I just perform another call to the target system to get the information I need within a rule using the available java methods and objects. However I have a defined GetObject operation that already does what I want, it would be nice if I could invoke it programmatically in my rule (or any other way).
if you want to invoke getobject in your before or after rule. This will work if you have getobject operation configured for your webservice. Use below code to achieve it.
String appName = accReq.getApplicationName();
Application app = context.getObjectByName(Application.class, appName);
String nativeIdentity = accReq.getNativeIdentity();
Connector connector = ConnectorFactory.getConnector(app, null);
ResourceObject active = connector.getObject("account", nativeIdentity, null);
if (active != null) {
//You can put the logic if account is found using get object call
}
@ninosp Yes. You can do a single account aggregation/getObject using connector APIs in your before and after rule. Also, if you want to avoid additional rule, you can try to create chained endpoints as well.. where you can clone the getObject endpoint to AddEntitlement-GetObject → then IIQ will call AddEntitlement followed by AddEntitlement-GetObject endpoint.
I believe you want to aggregate all the attributes from get object which is not coming from add entitlement. You should be able to achieve this with chained endpoints as well.
Note: Found a fix?Help the community by marking the comment as solution. Feel free to react(,, etc.)with an emoji to show your appreciation or message me directly if your problem requires a deeper dive.
I removed featureString from the application object “NO_RANDOM_ACCESS” and now it works. However, I can’t quite find what this flag does and what removing it does?
This is the code that works in after rule and it executes the getObject successfully, however I need to map the toXml() provided so it updates the Link with new values.
The NO_RANDOM_ACCESS feature flag tells SailPoint that the connector/application does not support direct/random lookup of individual objects by their native identity.
// When NO_RANDOM_ACCESS is set, SailPoint assumes you cannot do:
connector.getObject(“account”, nativeIdentity, null);
If the code works, that’s great, you can now update updates the Link with new values. Do mark the post as solution, as it helps other member in the community.
I implemented the GetObject but I realized this is not the same as Single Account Aggregation. So navigating to Manage Access > Manage Accounts > Account > Refresh Account will trigger GetObject but not update the account. Apparently I need to instantiate some aggregator class and use it.
So two questions:
I wonder if you have some template code for this?
Can I place this aggregation logic inside GetObject or will it cause issues as GetObject is used by IIQ on account create.
What are you trying to do?? if you want to call getobject and then update account endpoint?? or something else. If you can tell me the requirement clearly, I can assist better.