We have a solution to create a new default profile on end user's windows machine when the whole organization is moving to a new M365 tenant ( moving from old M365 tenant to a new M365 tenant). We are using Profman library to make MAPI calls to manipulate Outlook profile and our solution is in C#. Here are some detailed steps:
- copy original default profile as a new profile through Profile.Copy API
- delete the service for old email address at the new cloned profile through Services.Delete
- add the service for email address from new M365 tenant to the new profile through Services.Add API
- set MAPI properties including PR_DISPLAY_NAME, PR_DISPLAY_NAME_W, PR_ProviderDisplay_W, PR_PROFILE_USER_SMTP_EMAIL_ADDRESS_W, PR_PROFILE_CONFIG_FLAGS, PR_PROFILE_UNRESOLVED_SERVER_W, PR_PROFILE_UNRESOLVED_NAME_W, PR_ROH_PROXY_SERVER_W.
- set new cloned profile as default profile.
- Outlook is launched with new default profile
Our solution has been working well until recently. Right now, at some end user's machines, when outlook is launched with new profile generated by our tools, they would get the following error dialog first:
and then end user would get the second error dialog:
After that outlook might be launched although it would be very slow. The new email could not be expanded at outlook. If this happens, on some machine, we could delete this cloned profile and then manually create a new profile with new email address and then it would work. However on some other machine, we need to remove all the profiles, reboot machine and then create a new profile with new email address to get Outlook working again. It seems that Outlook might get into a weird state without machine reboot in the latter case when it gets above two error dialogs.
It would be really appreciated if some experts in Outlook/MAPI could shed some lights on what we saw and especially what is changed recently on M365/Exchange Online/Outlook (M365 version) which cause our solution not working any more.