Resolve OneNote sync issues after a name change
Issue:
A user's sign-in username for Microsoft 365 was changed. This changes the path to their OneDrive library, which breaks older Office applications that rely on the exact path in SharePoint to sync a file. The user will see errors similar to "We're having trouble syncing. Click "Sign in again" to fix this issue." When you click "Sign in again" the sync still fails.
Resolution:
1. Click on File, Export, choose Notebook, select "OneNote Package (*.onepkg)" from the dropdown, then click the export button below.
2. When the "Save as" window opens, save the archive package locally (i.e. Downloads) and NOT in OneDrive. Make sure "Current Notebook" is selected and click Save.
3. Close the notebook by right-clicking and clicking "Close This Notebook" in the context menu.
4. Verify that the correct account is signed in by checking the name at the top right. Next, click File, Account, then check that the correct email is shown at the top left and in the Connected Services section at the bottom left. If the wrong account is shown in any location, YOU MUST correct this first by signing out and signing back into the app.
5. Once the correct Microsoft 365 account is signed in, Click File, Open, Browse, and open the OneNote archive you saved in step #2.
6. The "Unpack Notebook" wizard will open. Click Create and give OneNote a minute to start the upload process. Wait until the sync completes.
7. The "new" Notebook will open and sync correctly with Microsoft 365.
8. In a web browser, navigate to https://www.microsoft365.com/mycontent and click "Cloud Files" on the left. Next, click "Go to OneDrive at the top right.
9. If you see an error "404 FILE NOT FOUND" in SharePoint, check the username portion of the URL. In this case, the old UPN prefix is shown. Correct this to the new prefix and the page will load. This should update overtime for all web apps and Office 2019+ apps, but not OneNote.
10. Finally, open the OneNote Notebook in the web version of OneNote. Change the name as shown in step #9 if a 404 error is shown. This will create a new shortcut for the user in Recent Items that will open correctly.