Modifying workflow from creating Exchange mailbox to creating a 365 mailbox

We have a workflow put in place by a previous administrator that creates an Exchange mailbox when a new hire account is placed in a specific OU.  We have recently migrated over to Microsoft 365 and are looking for a way to modify the workflow to create a remote mailbox for 365 instead of the on-prem Exchange mailbox it is currently creating.

From what i've been able to deconstruct from analyzing the workflow parameters, the workflow currently looks for any user accounts where the msExchRecipientDisplayType is blank and then changes the Create User Mailbox (edsaCreateMsExchMailbox) property to True and somehow it generates the formatted email address of firstname.lastname@<ourdomain>.org.  Has anybody created a workflow that will generate a M365 mailbox?

Parents
  • Are you in a hybrid exchange? 

    If so, you probably need to run an "enable-remotemailbox".  I do this by having a custom script to run the command.  In my workflow (pre-action) I look to see if the "Create User Mailbox" from the Requested Changes is True.  If so, I write to a custom virtual attribute (edvsa-CreateRemoteMail) to "user".  I do this because I use the same script to create share/room mailboxes too. I then remove all the mail settings from the request (Create User Mailbox, Alias, homeMDB, edsaEstabilshEmail, recipientType(s), targetAddress, mail).  I then take the samAccountName to look up what the user details are to build the smtp for the user.  Yes it takes a bit of cycles to ensure that smtp is available (even checking soft-deleted mailboxes), but only a few extra seconds.  Once I have that, I have enough information to create the enable-remotemailbox request.

    I know, it seems like a lot, but it works.

Reply
  • Are you in a hybrid exchange? 

    If so, you probably need to run an "enable-remotemailbox".  I do this by having a custom script to run the command.  In my workflow (pre-action) I look to see if the "Create User Mailbox" from the Requested Changes is True.  If so, I write to a custom virtual attribute (edvsa-CreateRemoteMail) to "user".  I do this because I use the same script to create share/room mailboxes too. I then remove all the mail settings from the request (Create User Mailbox, Alias, homeMDB, edsaEstabilshEmail, recipientType(s), targetAddress, mail).  I then take the samAccountName to look up what the user details are to build the smtp for the user.  Yes it takes a bit of cycles to ensure that smtp is available (even checking soft-deleted mailboxes), but only a few extra seconds.  Once I have that, I have enough information to create the enable-remotemailbox request.

    I know, it seems like a lot, but it works.

Children
No Data