Hello,
Actually, I wanted to suggest a solution that is almost exactly what jiambor suggested to you. jiambor, thank you for your active participation on our forum. We really appreciate it!
Here's what you can do to accomplish your task: you can add the user to your 'Emergency Support' group with the help of a Custom Command. In this Custom Command, you can send the action for approval, and then, when approved, you can set a certain property of the user whom you add to the group to the date and time when the user should be removed from the group. For this purpose you may use one of the Adaxes virtual properties that can be used to store date and time values, for example, CustomAttributeDate1. Adaxes virtual properties are not stored in Active Directory, but you may use them as any other property of directory objects.
Then, you can create a Scheduled Task that will run, say, every hour and check the value of that virtual property of every user account and compare it to the current date and time. If it is already the time to remove the user from the group, the Scheduled Task will do this.
To create such a Custom Command:
- Create a new Custom Command.
- On the 2nd step of the Create Custom Command wizard, select User.
- On the 3rd step, add the Send this operation for approval action.
- Click the Add Action button.
- Add the Update the User action and press Add...
- In the dialog that appears, open the drop-down list of the Property to modify field and select Show all properties.
- Select the property that you chose to store the date/time when the user should be removed from the group (for example, CustomAttributeDate1).
- Click the calendar button that is embedded in the New value field.
- In the dialog box that appears, activate the Generate date tab and select Current Date/Time in the Set the date to field.
- Tick the checkbox opposite day and select plus 1 day.
- Click OK 3 times.
- Click the Add Action button.
- Select the Add the User to a group action and click Select Group.
- In the dialog box that appears, select the group that you would like to add the user to ('Emergency Support').
- Click OK two times and finish creation of the Custom Command.
To create the Scheduled Task:
- Create a new Scheduled Task.
- On the 3rd step of the Create Scheduled Task wizard, select User.
- On the 4th step, add the remove the User from a group and click Select Group.
- In the dialog box that appears, select the group that the Scheduled Task should remove the user from ('Emergency Support').
- Click OK two times.
- Click the Add Action button.
- Select the Update the User action and press Add...
- In the dialog that appears, open the drop-down list of the Property to modify field and select Show all properties.
- Select the property that you chose to store the date/time when the user should be removed from the group and that you chose on step 7 of creating the Custom Command (for example, CustomAttributeDate1).
- Switch the radio button to Remove property. This will remove the property as we no longer need it after the Scheduled Task completes its job.
- Click OK two times.
- Click the Add Condition button.
- In the dialog box that appears, select the If <property> <relation> <value> condition and open the <property> drop-down list.
- Select Show all properties.
- Select the property that you chose to store the date/time when the user should be removed from the group and that you chose on step 7 of creating the Custom Command (for example, CustomAttributeDate1).
- Select If CustomAttributeDate1 less or equal and press the calendar button.
- In the dialog box that appears, activate the Generate date tab and select Current Date/Time in the Set the date to field.
- Click OK two times and finish creation of the Scheduled Task.