0 votes

I have some custom command like "User Separation", which is sequenced with bunch of other actions, like disable, delete & modify etc. This custom command is published to web interface, so HR guy can login to the portal and run the command on a user account.

But if John Doe's last date is on Next Friday, 5PM, we want to give a option in the web portal thru which HR guy can pre-date/schedule the user separation custom command on John Doe's account for one time execution. And job executes on the particular date and time.

Is the possible?

by (460 points)

1 Answer

0 votes
by (216k points)
selected by
Best answer

Hello,

Yes, it is possible. First, you need to create a Home Page Action for specifying the separation date. The date will be passed via an Adaxes virtual property for date/time values, e.g. CustomAttributeDate1. Such attributes are not stored in AD, but can be used the same as any other attribute of AD objects.

Also, you will need to create a Shceduled Task that will run, say, daily and compare the date set for each user to the current date/time. If it is already the time to separate a user, it will run your Custom Command.

To do this:

i. Create Home Page Action for setting the separation date

For information on how to create a Home Page Action that allows modifying a user, see Configure Home Page Actions, section Modify Object. On Step 4 of the section, you will find instructions on how to modify the form used by the action. You need to remove everything. Then, you'll need to add a property that will be used to pass the separation date, for example, CustomAttributeDate1.

ii. Create Scheduled Task to perform user deprovisioning
To create a Scheduled Task that will execute your Custom Command for users on the dates specified for them:

  1. Create a new Scheduled Task.

  2. On the 3rd step of the Create Scheduled Task wizard, select User.

  3. On the 4th step, click Add Action and select the Execute a Custom Command action.

  4. In the Action parameters section, click Select and select the Custom Command you need.

  5. Click OK.

  6. Now, you also need to add an action to clear the custom attribute that is used to specify the deprovision date. This is needed to avoid processing the same user again. Right-click the action and select Add New Action.

  7. Select Update the User and click Add.

  8. In the Property to modify drop-down list, select Show all properties.

  9. Select the property that is used to specify the deprovision date, e.g. CustomAttributeDate1.

  10. Switch the radio button to Remove property.

  11. Click OK 2 times.

  12. Now, you need to specify when a user must be deprovisioned. First of all, the property that is used to specify the deprovision date must not be empty. Right-click the action you've just added and select Add Condition.

  13. Select the If <property> <relation> <value> condition type.

  14. In the Condition parameters section, specify If CustomAttributeDate1 is not empty:

    • where CustomAttributeDate1 is the property that is used to specify the deprovision date.
  15. Click OK.

  16. Also, the date when a user must be deprovisioned must be less than or equal to the current time. Right-click the action and select Add Condition again.

  17. Select the If <property> <relation> <value> condition type.

  18. In the Condition parameters section, specify If CustomAttributeDate1 is less then or equal.

    • where CustomAttributeDate1 is the property that is used to specify the deprovision date.
  19. Click the Edit button embedded in the Value field.

  20. Activate the Generate date tab.

  21. Select Current date/time.

  22. Click OK 2 times. You should receive something like this:

  23. Finish creation of the Scheduled task.

Also, to tell your users more about the meaning and the function of the field, you can change the name under which the property that you've chosen for the separation date appears in Adaxes. For details, see Customizing Display Names for AD Properties.

0

This works. I will fine my solution in next few days & will get back in case any issues. Only problem with this is I have to track usage of this Custom Date attribute against my scheduled tasks.

0

Hello,

Actually, as mentioned in the very beginning of the instructions, CustomAttributeDate1 is just an example. There are 5 virtual properties that can store date and time, CustomAttributeDate1 to CustomAttributeDate5. If you are already using CustomAttributeDate1 for any purposes, you can use any of the remaining 4 instead.

0

Thanks, I saw those extra attributes. I have two follow up questions.

  1. When this CustomAttributeDate1 gets updated as per date and time selection, Is there an option to send out a confirmation mail to the initiator that this has been scheduled?

  2. As tasks are getting scheduled for later execution, they are loosing Initiator's details. In the Custom Task I have few Action Items which sends emails and create other service request tickets, departure audit logs in other systems on behalf of initiator (%adm-InitiatorEmail%). So if there is a way to capture who initiated the original schedule, I can use that attribute for my other work flow.

0

Hello Brajesh,

  1. Initiator is already performing this operation, what's the sense of making them confirm the action once more? Or do you want just an email notification as a reminder?

  2. No, because in case if an operation is performed by a Scheduled Task, the Scheduled Task acts as the initiator. As a workaround, you can store the Distinguished Name (DN) of the initiator in a certain attribute of the departing user, and then use the DN in your conditions. For this purpose you can use Adaxes virtual attributes that allow storing String values, e.g. CustomAttributeText1.

0
  1. Correct, for later schedules we usually provide a confirmation to the initiator saying this has been accepted & scheduled for this time and ready to go. So initiator use it for tracking & other business wide follow up/changes or re-schedule them if there is any changes in departure.

  2. That will be great. I can use that DN attribute to pull out original initiators email ID etc. & use it for my other alien systems workflow. Please help me with that process.

0

I am able to use your idea ;-).
I am using a business rule; if this Date1 attribute is changed, catch initiators email ID for immediate confirmation email & then update Txt1 attribute for later use.
Thank you!!

0

Hello Brajesh,

As far as we understand, you've already implemented this yourself. Do you need our further assistance with this request?

0

All solved. Thank you.

Related questions

0 votes
1 answer

Is it possible to grant selected user option to add custom license plan (or just subset of its licenses) to given user(s) using web interface?

asked Feb 28, 2023 by KIT (960 points)
0 votes
1 answer

I have Search configured for one of our web interfaces. One of the fields that can be searched is a custom attribute admCustomAttributeText4 (with a friendly name of ... are definitely some accounts with that attribute populated. Is this behaving as designed?

asked Sep 19, 2018 by sandramnc (870 points)
0 votes
1 answer

Good afternoon everyone, I have a web form that will create a simple OU with nothing more than a name and description. There next lies a business rule that kicks off ... is being ran from the same domain controller that the web interface ran its creation from?

asked Mar 30, 2017 by strikk (360 points)
0 votes
1 answer

Because before "Create User" a manager has to approve this action, I can not use the "Show Create Mailbox form after creation" option. So I want to create a ... Rule a powershell script will run to create the mailbox automatically. Is this possible? Remco

asked Nov 27, 2013 by RTiel (780 points)
0 votes
1 answer

How do I script my custom command to display the output in the web interface? For instance, I need to see the output of the following ... interface. add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010 Get-MailboxDatabase | Get-MailboxDatabaseCopyStatus

asked Dec 11, 2012 by mdeflice (350 points)
3,549 questions
3,240 answers
8,233 comments
547,826 users