GroupID 10 - Automate
We want to create a Smart Group that identifies the users whose accounts will expire in X number of days. The idea is to take preemptive measures and avoid user dissatisfaction. Can this be achieved using GroupID Automate?
This requirement can be achieved by creating a custom script in the Smart Groups's Query Designer.
Launch GroupID Management Console.
Click Automate > right-click All Groups > New > Smart Group.
In the New Smart Group wizard, set parameters as desired. On the Update Options page, select Update Later.
Complete the wizard to create the Smart Group.
Right-click the newly created Smart Group and select Modify Query. On the Query Designer window, select the Smart Script tab.
Click Edit Script.
Add the following script in the Sub_ATM_BuildQuery(ByVal atmsource As Object, ByVal args As QueryEventArgs) function:
args.Criteria = String.Format (args.Criteria, DateTime.Now.AddDays(3).Ticks().ToString())
Here we have set the number of days to 3. You can modify the value as per your requirement.
On the toolbar, click Build > Compile Script.
Close the window and when prompted to save changes, click Yes.
Now click the Identity Store tab in the Query Designer and add the conditions as shown below:
Close the Query Designer and update the Smart Group. The preview may not return any number of objects. However, when the Smart Group is updated, it will have the correct membership.
GroupID Online Help – Automate