This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Create or Move Exchange Mailbox with Workflow

Hello,


we are using ActiveRoles Version 7.

We want to automate User creation with workflows, but i have problems with the Mailbox creation.

We want to minimize the Rules we are using, so my Test approach is on Policy and after this the Settings are applied to the new user depending of the OU where the user is created.

With Mailbox creation i have tested the following:
1. Workflow sets the attributes mailnickname and homeMDB; in a later Step edsaCreateMsEchangeMailbox --> not working with Error Message "external Mail Address is missing"

2. created a default Policy with automatic creation of the Mailbox in the selected Store, the Workflow sets edsahomeMDB and edsaMoveMailbox "True" --> Error edsahomeMDB is missing

3. created a default Policy with automatic creation of the Mailbox in the selected Store, the Workflow sets extensionAttribute8 with the DN of the correctStore; a second Workflow starts a script which reads the User DN, extensionAttribute8 and mailNickname and starts "Set-QADUser $user -Proxy -ObjectAttributes @{"edsaMoveMailbox"=$true;"edsaHomeMDB"=$strEDSAhomeMDB}" --> Error Access Denied"

When i start a powershell with the User of our ActiveRoles Server Service the command "Set-QADUser $user -Proxy -ObjectAttributes @{"edsaMoveMailbox"=$true;"edsaHomeMDB"=$strEDSAhomeMDB}" works fine.

Does someone has a solution or concept for this ?

Is there some way to delete a moverequest from exchange when it is finished ?


Regards,

Florian Ballangó

Parents
  • Just so I understand this - you don't want to create a whole bunch of policies to set the location of mailboxes per OU.

    So that means that you need to intercept the user create request and insert into the request the desired location of the mailbox.

    So, your workflow needs to fire when a user create is attempted.

    Your script then needs to change the "in-flight" value of edsaHomeMDB.

    The script activity to do this needs to be placed before the User Create action in the workflow.

    The command to do this would be something like this:

     $Request.Put($Constants.ADS_PROPERTY_UPDATE, "edsaHomeMDB", "MailboxDB1")

    ("$Request" is the built-in ARS object that contains all the details of the user create request / transaction.)

    You need to wrap this in a function to be called by the script activity so something like this:

    function SetCorrectMailboxDB ($Request)

    {

    # Add code here to calculate the correct Mailbox DB

    # Example only

    $CorrectDB = "MailboxDB1"

    # Inject this new value into the target MDB attribute in the create request

    $Request.Put($Constants.ADS_PROPERTY_UPDATE, "edsaHomeMDB", $CorrectDB)

    }

    'Hope this helps.

Reply
  • Just so I understand this - you don't want to create a whole bunch of policies to set the location of mailboxes per OU.

    So that means that you need to intercept the user create request and insert into the request the desired location of the mailbox.

    So, your workflow needs to fire when a user create is attempted.

    Your script then needs to change the "in-flight" value of edsaHomeMDB.

    The script activity to do this needs to be placed before the User Create action in the workflow.

    The command to do this would be something like this:

     $Request.Put($Constants.ADS_PROPERTY_UPDATE, "edsaHomeMDB", "MailboxDB1")

    ("$Request" is the built-in ARS object that contains all the details of the user create request / transaction.)

    You need to wrap this in a function to be called by the script activity so something like this:

    function SetCorrectMailboxDB ($Request)

    {

    # Add code here to calculate the correct Mailbox DB

    # Example only

    $CorrectDB = "MailboxDB1"

    # Inject this new value into the target MDB attribute in the create request

    $Request.Put($Constants.ADS_PROPERTY_UPDATE, "edsaHomeMDB", $CorrectDB)

    }

    'Hope this helps.

Children
No Data