Hello Mark,
Since this is using a multi-valued attribute, it will be limited to 1500 values correct? We will have groups with more members than that.
Unfortunately, custom multi-valued attributes are limited to about 1300 values and the number is shared between all the multi-valued attributes of an object. For example, if a custom multi-valued attribute contains 1000 values, the rest of multi-valued attributes can contain up to 300 values in total. Thus, the script will not work for the groups whose members number exceeds the limit.
There may already be a feature request on this but we should be able to use business rules against rule-based groups even if the available actions are limited.
Thank you for the suggestion. We have forwarded it to the corresponding department for consideration.