Populate dropdown menus using an ARS policy


I'm looking for a way to update an ARS policy via a schedule. 

At the moment we populate dropdown menus in IAM Websites using onGetEffectivePolicy but it slows down accessing a user object (13 seconds to open). Adding the values to an ARS policy works perfectly (2-3 seconds to open) but these values need to be updated daily.

I found the following sample code but I think it is for an older version of ARS as it doesnt work. We are currently on 7.2.1.


Any ideas appreciated.