Hi everyone,
I’m working on a use case where, during the Joiner process for external identities managed by NERM, a hybrid account is created: the user is provisioned in on-prem AD and then synced to Entra ID.
At this initial stage, a mailbox is not required, but it may be requested later, once the AD account already exists. To enable the mailbox, we plan to use the Enable-RemoteMailbox command, but I have some questions about attribute handling and the correct sequence of operations.
Based on what I’ve read in the SailPoint forum, the expected flow should be:
-
Create the AD account (without mailbox)
-
Use an After Modify rule to trigger a PowerShell script that runs
Enable-RemoteMailbox -
Assign the on-prem AD group that grants the M365 license
However, I have a few questions:
1) Which attributes should be calculated before calling Enable-RemoteMailbox?
For example:
-
mail -
targetAddress -
mailNickname -
any others that should be prepared?
2) When the mailbox is requested later, do we need to recalculate the UPN?
The initial UPN of the user is different from the one we intend to use as the primary SMTP/mailbox.
So is it necessary to:
-
update the UPN before enabling the mailbox
or -
keep the existing UPN and only calculate the
mailand/ortargetAddressattributes?
3) If the UPN and/or mail-related attributes must be recalculated, where is it better to do this?
-
directly inside SailPoint before invoking the script
or -
inside the PowerShell script that runs
Enable-RemoteMailbox?
Request for Best Practices
Do you have any best practices for:
-
enabling a Remote Mailbox on an AD account that already exists
-
handling the recalculation of the UPN and mail attributes
-
ensuring attribute consistency (mail, mailNickname, targetAddress) between AD and Entra ID?
Any suggestions or implementation examples (either in SailPoint or PowerShell) would be greatly appreciated.
Thanks
Best regards
Antonio