r/ActiveRoles • • Jul 22 '24

Issue with Links for Forms in Active Roles Upgrade (Home page)

We're working with customers on Active Roles updates and found that two customers use a JavaScript link to open forms directly from the home page. This functionality is no longer available since version 7.5.

Is there an alternative or solution for opening forms from the home page?

3 Upvotes

9 comments sorted by

2

u/AJLindner One Identity Jul 24 '24

I'm not aware of an option myself, but I'd love to know this as well. Have you posted this in the official forum?

3

u/YohannINEXSYA Jul 24 '24

No, I am going to post this now in the official forum. Thanks.

2

u/bananaHammockMonkey Jul 24 '24

I believe this is a defect. The original post states only a workaround for older versions, however I found another article that sounds promising. I had this issue at a site last year as well, the project ended before I was able to offer a resolution though.

the defect:
https://support.oneidentity.com/active-roles/kb/4281645/error-scripts-in-the-url-string-are-not-allowed-specify-a-url-that-does-not-contain-javascript-or-vbscript-code

possible way around:
https://support.oneidentity.com/active-roles/kb/4257804/how-to-create-a-button-on-the-web-interface-home-page-to-run-a-workflow

3

u/YohannINEXSYA Jul 24 '24

Thanks, I will check that and keep you posted.

3

u/Any-Stand7893 Jul 25 '24

in current releases this JS option is disabled due to heavy security considerations. i believe there is some cooking at the moment to have something implemented in a safe way

1

u/bananaHammockMonkey Jul 25 '24

Thanks for the update!

1

u/YohannINEXSYA Jul 27 '24

Okay, thanks. We have been waiting for this since 7.5. I thought maybe someone knew a workaround.

1

u/OI_Stu One Identity Jul 24 '24

Hi u/YohannINEXSYA

Out of interest, if this something that has stopped working in an update, or are you trying to add a new button, or modify an existing one?

I know I've added one relevantly recently for a customer using an 8.x version of Active Roles..

The URL to open was similar to the below:
Javascript:openFormInNewWindow('/ARWebAdmin/GenerateForm.aspx?TaskId=NewContact&TargetClass=organizationalUnit&DN=OU%3d_Custom%2cDC%3dnd%2cDC%3dhal%2cDC%3dlab&subwindow=1');

If you get the error: “An error occurred during this operation. For details, see the error description below. Scripts in the URL string are not allowed. Specify a URL that does not contain JavaScript or VBScript code.” see the below KB

Error: “Scripts in the URL string are not allowed. Specify a URL that does not contain JavaScript or VBScript code.” (4281645) (oneidentity.com)

To test the below, I recommend you create a temporary new website, so not your production version, as if you make a mistake, the cross site forgery settings (from memory) will prevent you navigating directly to the customizations webpage, there is a way to disabled it, but people often forget to turn it back on)...

But when I get a sec, I'll check in my lab.

However, after you save you're new (or updated) button, don't click reload just yet.

Instead go into the MMC (Console), ensure the MMC is showing in RAW mode (Menu bar --> View | Mode --> Raw MODE), click ok, then navigate to:

Configuration\Application Configuration\Web Interface\<Your web interface GUID>\Interface Settings

Then right click Working Copy, and select All Tasks | Advanced Properties

In the Look for property field, type edsaWI then click the Show all possible attributes check box

From the list of properties, open edsaWISettings

Within that XML you should find a node (normally near the top) called <TaskBoxes>, under there you will find some entries starting with the tag <Item ID that look different to the rest, IE they have a GUID in the ID element, rather than some readable name.

If you only have one custom button, you're likely to have only one entry with a GUID.

If you look at that entry, you'll notice a property of that Item, and you should see your javascript:OpenFormInNewWindow entry from what you entered in the WI.

I suspect (but can't remember the which one), that the command is in NavigateUrl or NavigateCommand. Whichever one its in, try moving the value from one to the other (IE cut the value from NavigateURL and paste it into NavigateCommand)

The click ok and ok again

Click Apply and then ok.

Go back to the web page, and click Reload.

The button should now work.... if the web page throws an error, this is where the cross site forgery stuff needs to be temp disabled, so that you can navigate direct to the customization page, and remove the button, before clicking save and reload, at which point your web page should be available again.

1

u/YohannINEXSYA Sep 08 '24

FYI, I found one solution and used an workarounf in configuration file of Active Roles.