Your Onedrive has not been Setup (Error 0x8004e4f1)

Background

Recently, I was working on migrating users from one domain to another. To migrate the users to the new domain, I logged on to the Microsoft 365 admin center and updated their User Principal Name (UPN) to the new one.

In Microsoft 365, the UPN (User Principal Name) is what users use to sign in to their devices, and it can be distinct from their email address. However, the UPN and the user’s email address are the same in my situation.

For instance, a user’s old UPN was xyz@cloudinfra.net, later modified to xyz@myotherdomain.com. Both of these domains are verified domains within the same Microsoft 365 tenant.

Modifying the primary email address and UPN typically takes a few hours to propagate in the backend. When you alter a user’s UPN, their primary SMTP email address will automatically change to match the user’s UPN.

Following this change, you can ask users to reconfigure Outlook and Microsoft 365 apps such as Word and Excel and prompt them to reconfigure OneDrive.

The modification should function correctly with all other Microsoft 365 apps except OneDrive. During the reconfiguration on the user’s device, it became apparent that OneDrive could not be set up with the user’s new UPN address.

I received the error message: Your OneDrive has not been set up. Please get in touch with your IT department (Error code: 0x8004e4f1).

You might also encounter an error message stating a problem connecting to OneDrive. Check your Internet connection and try again later (Error Code: 0x8004deed).

onedrive has not been setup (Error 0x8004e4f1)
onedrive has not been setup (Error 0x8004e4f1)

There isn’t a straightforward solution to this problem, but we can explore several different troubleshooting approaches. The user’s OneDrive URL is associated with their UPN, which changes when the user’s UPN is modified.

It is advisable to make UPN changes on Friday at the end of the business day. This allows the changes to propagate in the backend over the weekend, reducing the likelihood of user issues.

If you continue to encounter problems with setting up OneDrive using the new UPN, please follow these troubleshooting steps:

Before proceeding, be sure to back up any unsynced or unsaved files, as troubleshooting OneDrive could potentially result in data loss if you have unsaved work.

Note

1. Clear Onedrive cache from Credential Manager

The initial step is to clear the OneDrive credential cache on your Windows device using the Credential Manager. This cache stores OneDrive credentials used to sign in to the OneDrive application. It might still contain the old credentials from before the UPN change. Here are the steps to follow:

  • Log in to the Windows device and click on Start.
  • Search for Credential Manager.
Credential Manager open from start menu
Credential Manager
  • Go to Windows credentials and search for OneDrive cookie / cached credentials. Click on Remove to delete the credentials from your device.
Clear Onedrive cache from Credential Manager
Clear Onedrive cache from Credential Manager

Another option is to unlink OneDrive from the OneDrive settings. This will allow you to log in again using the user’s new UPN.

  • Go to Onedrive in the system tray and click the Settings icon.
Unlink OneDrive from the PC and re-login
Unlink OneDrive from the PC and re-login
  • Click on Account > Unlink this PC.
Unlink this PC on Onedrive
Unlink OneDrive from the PC and re-login
  • Click on the Unlink account button on the option Unlink account on this PC?.
Unlink account onedrive
Unlink OneDrive from the PC and re-login
  • Please sign in to OneDrive using the new UPN address provided by the administrator. Then click on the Sign in button to continue.
re-login on Onedrive after unlink
Unlink OneDrive from the PC and re-login
  • As you can see, we just signed in successfully using the new UPN address for this user.
OneDrive Sign in progess
Unlink OneDrive from the PC and re-login

3. Reset OneDrive application

If you continue to experience problems logging into the OneDrive application and encounter the OneDrive setup error, you can attempt to reset the application using the following steps:

  • Launch Powershell or command prompt as an administrator.
  • Navigate to C:\Program Files\Microsoft OneDrive where the OneDrive app is Installed.
  • Type the command Onedrive.exe /reset to reset this application.

You may get an error message at this stage OneDrive can’t be run using full administrator rights. Please restart OneDrive without administrator rights. This means that Onedrive could not be started automatically, you can start the Onedrive application as a normal user.

OneDrive can't be run using full administrator rights. Please restart OneDrive without administrator rights.
OneDrive can’t be run using full administrator rights

https://support.microsoft.com/en-us/office/reset-onedrive-34701e00-bf7b-42db-b960-84905399050c

More Informaiton on Reset OneDrive

You can also try to re-link or update/refresh the user’s UPN to the new UPN using the following PowerShell cmdlets. Please remember that any Microsoft 365 user account changes may take a couple of hours to propagate. I recommend waiting for at least 24 hours before trying again.

#Install ExchangeOnline Powershell Module
Install-Module -Name ExchangeOnlineManagement

#Connect to Exchange Online
Connect-ExchangeOnline

#Refresh User's UPN to New UPN
Set-MsolUserPrincipalName -UserPrincipalName "jatin.makhija@cloudinfra.net" -NewUserPrincipalName "jatin.makhija@newdomainname.com"

5. Download Latest version of OneDrive and reinstall

Another approach is to uninstall the old version of OneDrive and upgrade to the latest version, including bug fixes and the latest features. You can download the latest version from the following link: https://www.microsoft.com/en-gb/microsoft-365/onedrive/download.

6. Raise a Support Ticket with Microsoft

If you continue to experience issues with OneDrive and it’s not setting up for users, you can also open a support ticket with Microsoft from the Microsoft 365 admin center. To create a support ticket for Microsoft support, follow these steps:

  • Log in to the Microsoft 365 admin center > Support > Help & support.
  • Provide Information on How can we help? pane and create a ticket from there.

Conclusion

In this blog post, we’ve explored various approaches to troubleshoot OneDrive setup issues. While there is no straightforward solution, even though it’s a known issue, the exact cause remains unclear. This problem typically arises when you change a user’s UPN, which can impact OneDrive.

Usually, allowing the change to propagate for 24 hours often resolves the issue. If the problem persists, follow the troubleshooting steps in this blog post.

Leave a Comment