I’ve been working with FIM quit a bit, but I never got involved with workflows. Today I saw something passing the FIM forums which I thought is worth blogging about. If it’s no use for you, it will be for me to find it back afterwards anyhow. One of the things with user account creation is the password generation/communication process. Using the FIM declarative provisioning it’s quit straight forward to get a random password generated and flow that out to AD. On the other hand, it would be pretty neat if at the same time the manager for the new employee gets a mail with the username/password. In order to accomplish this you can follow the following steps:
The easiest way to solve this is by using one SR and three activities in an action workflow.
The SR: On the workflow tab on the SR designer, create a parameter called InitialPassword. On the outbound flow tab, map this parameter to the unicode password attribute. The use of a workflow parameter will tell the SR that this value will be calculated in a workflow and passed in by the SR activity.
Activity 1: Function activity to generate a random password
Source: "Pass" + RandomNum(1000,9999) + "word" (This will generate a 12 char password)
Activity 2: SR activity
Select to add the SR. The InitialPassword parameter from the SR is visible. Set its value to [//WorkflowData/Password]
Activity 3: Email activity
Craft an email. Where you want the initial password to appear you enter [//WorkflowData/Password].
All you need now is an MPR and a set to trigger this workflow.
This is just a copy-paste of Andreas Kjellman in Sending user's details in mail
Thanks to Markus for bringing it up: Random password and FIM