0

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:

  1. copy original default profile as a new profile through Profile.Copy API
  2. delete the service for old email address at the new cloned profile through Services.Delete
  3. add the service for email address from new M365 tenant to the new profile through Services.Add API
  4. 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.
  5. set new cloned profile as default profile.
  6. 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:

canNotLogOn

and then end user would get the second error dialog:

resourceLow.

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.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
windfly2006
  • 1,703
  • 3
  • 25
  • 48
  • Do you have any problems when you create new profiles manually? – Eugene Astafiev Oct 18 '22 at 21:44
  • @EugeneAstafiev before our tools run on the machine, no problem in creating profile manually. After our tools run, we could created manual profile and add same new email address, however it might not be working when outlook launches even after cleaning up the bad profiles. Might require a machine reboot and then recreate the profile to get Outlook working. – windfly2006 Oct 19 '22 at 00:48
  • The best course of action would be to open a support case with MS – only they would know what changed and how to fix it. None of this is ever documented… – Dmitry Streblechenko Oct 19 '22 at 06:24
  • If you don't have problems with creating mail profiles manually, only programmatically with your code, I'd recommend opening a support case with Microsoft. – Eugene Astafiev Oct 19 '22 at 12:21

0 Answers0