@Chetan Desai thanks for the quick feedback. can you further clarify the following additional doubts.
If you have an Exchange Online license, you can set the mail attribute at the time of creation.
How is that even possible? if the account does not yet exist how can it have a license assigned ahead of time? I'm not following this part.
Because the mail attribute is tied to Exchange Online, you cannot write to that attribute unless you have an Exchange Online license. In this case, the mail attribute is ignored.
I suppose you may not see this as a viable use case, but wouldn't I be able to make the seldom decision to use an external email provider and don't rely on Exchange. I get that Mail is "tightly coupled/integrated" with other services from Microsoft but still as an end user this could ultimately be my choice. Additionally, in a migration scenario I don't think it would not be uncommon wanting to provision users from an HR system and make them eligible for a smaller subset of services (eg. Teams only) and allow other users in the tenant to be able to at least know how they could contact the user via what I interpret as this "primary email" which would need to be stored in the mail property.
To set an external (non-Microsoft, personal email) on the user profile, use the attribute otherMails.
otherMails is a string collection.
Can you please clarify:
- An example expression on how to set that value using an expression
- Does this mean I won't be able to manually as an admin register other emails for the user because the provisioning app will most likely overwrite them?