Views:

Applies To:

GroupID 10 - Automate

Business Case:

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?

Solution:

This requirement can be achieved by creating a custom script in the Smart Groups's Query Designer.

Steps:

  1. Launch GroupID Management Console.

  2. Click Automate > right-click All Groups > New > Smart Group.

  3. In the New Smart Group wizard, set parameters as desired. On the Update Options page, select Update Later.

  4. Complete the wizard to create the Smart Group.

  5. Right-click the newly created Smart Group and select Modify Query. On the Query Designer window, select the Smart Script tab.

  6. Click Edit Script.

  7. 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.

  8. On the toolbar, click Build > Compile Script.

  9. Close the window and when prompted to save changes, click Yes.

  10. Now click the Identity Store tab in the Query Designer and add the conditions as shown below:

  11. 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.

Reference:

GroupID Online Help – Automate

Comments (0)