Inserting a custom JS query in Sailpoint

Which IIQ version are you inquiring about?

*8.2

Hi Sailors,

I have one question, we have to inject a custom java script in SailPoint UI, which will basically give us the performance of each click.

Is there any way, we can inject this query in the UI?? I tried checking within the ui/JS directory, but did not get any dashboard page, where i can inject this query, so it will be called with each click.

Can some one suggest, what will be best option to achieve this.

Hi @naveenkumar3,

about that, in IIQ you can find the pages into the folders are contains in identityiq main folder; for example in identityiq/identity you can find all pages relative to identies management:


and are the same for other pages but not for all, because mostly are dinamically generetad or are built with a complex structure. So, its not easy to find everything.

You must to search in this directory and “joking” with the browser inspector to find want you want in each case.

Thanks for your response @enistri_devo. Don’t we have a dashboard or homepage in IIQ, where we can put this script. In that case, it will be invoked at each click.

I have already checked this html pages, and not sure where to put these script. Is there any other way we can inject this script, like creating a Plugin??

sorry, how you dont have a dashboard or homepage? :thinking:

I think yes, but actually I dont know if with a plugin how you manage JS.

No, I am asking do we have dashboard/homepage page in within the identityiq , Since I was not able to find. so, I can put the custom script within that file, and see how it works

You can build a plugin and host a single page app in this. Otherwise you can also use the plugin framework to load a custom javascript in any IIQ page.

Regards

The requirement is, we have a custom JS script to get the performance feedback, and that script should be called, with each click we do in sailpoint GUI. Can we achieve it via Plugin?? or we need to put the script somewhere else??

The home page is create dinamically starts on home.xhtml in identityiq folder. On this file you can start to analyze and undestard how is build the home page and find where you can insert you code.

Thanks for your response, let me check that file, and try to figure it out, where can we place it. In my view we can paste that script in the header section, but Will have a proper check and update.

1 Like

If that doesnt work out you can deploy a javascript snippet with a plugin. How to do that is in the plugin developer guide.

I have put the script in header of home.xthml, and can see the script is getting called. I have just putting an alert in the script, to see if it is getting called. but when I go to other tabs, say access request & Manage user Access, the script is not getting invoked. Does that mean, I have copy this script in the individual html pages??

I Have modified a plugin, where we can hide the manual application from the user, so they don’t see it and do a password reset and try to enable it.

For this requirement, what do you think, where i can make the changes in the plugin, so the script is called in each and every click…

I’m not a JS developer. But there is something you should know and it might helpful.
Plugins have a manifest file that contains various configurations and there is something called “regexPattern” within Snippets. The purpose of regexPattern is to match against the current URL in the browser. If the URL matches the specified pattern, the snippet will attempt to execute the JS.

Based on your requirement the JS file should execute for each and every click
May be you should write some event listeners some thing like below

document.addEventListener('click', function() {
    loadScript('path/to/your/external.js');
});

For more details about plugin you check below link

Thanks Deepak for your response, let me check.

I have seen one of the post, where you have shared the plugin to hide workitem forward button. Can you please share with me also, as i can have a look for reference and build my plugin on top of it

Plugin zip file is attached. Please download it. let me know if you face any issues

I was able create plugin and the script is getting executed on each and every page. Thanks for the suggestion.

1 Like

Cool. Happy learning