Can't log into OneDrive, getting error 0x8004deef or browses to users OneDrive online

Alex Moss 1 Reputation point
2026-02-10T12:09:28.76+00:00

We found an issue where the OneDrive client would not sign in and the OneDrive portal would not load for a new user, after recreating the profile and removing / re-adding license we then found the UPN to differ to the primary email account due to a local Azure AD sync problem this then led us onto find most of this fix as below that has been mentioned before but by default you should apply everyone except external users via the below steps this should then provide the fix for the source of the problem longer term. Also added the powershell to force the creation of the SharePoint site

  1. Log into your SharePoint admin account
  2. Open the admin center
  3. Hit "Show All" in the left pane and go to SharePoint admin center
  4. In the Classic SharePoint admin center, go to "user profiles" in the left pane
  5. Under "People" click "Manage User Permissions"
  6. For each user having issues, type their name into the box and hit "Add"
  7. Add everyone except from external users, and then assign them all permissions (Create, Follow, Use)
  8. Hit OK
  9. Then you can force it to re create it by remove / re-adding license after 15 mins or use these power shell commands
  10. Install-Module -Name Microsoft.Online.SharePoint.PowerShell Connect-SPOService -Url https://yoursharepoint-admin.sharepoint.com/ Request-SPOPersonalSite -UserEmails ******@domainname.com

Worth mentioning that removing everyone can also stop users having OneDrive folders if that is a preference as well

Microsoft 365 and Office | OneDrive | For business | Other
0 comments No comments

2 answers

Sort by: Most helpful
  1. Demi-N 20,075 Reputation points Microsoft External Staff Moderator
    2026-02-10T13:38:31.5266667+00:00

    Hello @Alex Moss,

    Thank you so much for taking the time to share this detailed solution with the community.

    We truly appreciate the effort you put into documenting the steps and explaining the background of the issue, especially since scenarios involving OneDrive provisioning, UPN mismatches, and SharePoint personal site creation can be very tricky to diagnose.

    Your contribution doesn’t just help answer one question; it has the potential to support many other users who may run into the same problem but don’t know where to start. 

    Sharing this kind of practical, tested guidance strengthens the community and helps others feel less stuck when facing similar issues.

    Once again, thank you for contributing back to the community. Your willingness to share what worked for you will certainly make a difference for many users encountering the same situation.

    Kind regards,


    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 

    Was this answer helpful?


  2. AI answer

    2026-02-10T12:10:45.07+00:00

    To resolve the issue of not being able to log into OneDrive and encountering the error code 0x8004deef, you can follow these steps:

    1. Check License Assignment: Ensure that the user has a valid OneDrive license assigned. This can be done by a Microsoft 365 administrator in the admin center. Navigate to Users > Active users, select the user, and check under Licenses and apps to confirm that a OneDrive license is assigned.
    2. Remove Cached Account Identities: If the license is valid, you may need to clear cached account identities. This involves modifying the registry:
      • Open the Registry Editor.
      • Navigate to HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Common\Identity.
      • Right-click on Identity and select Delete. If Shared Computer Activation is enabled, also delete the corresponding subkey for the user SID.
    3. Use Microsoft Support and Recovery Assistant: If the issue persists, you can download and run the Microsoft 365 Support and Recovery Assistant to help diagnose and fix the problem.
    4. Check for UPN Issues: Since you mentioned a potential UPN mismatch due to Azure AD sync issues, ensure that the UPN matches the primary email account. This can be critical for proper sign-in functionality.
    5. Force Creation of SharePoint Site: If necessary, you can use PowerShell commands to force the creation of the SharePoint site for the user. This involves connecting to the SharePoint service and requesting a personal site for the user.

    By following these steps, you should be able to resolve the sign-in issue with OneDrive and ensure that the user has the necessary permissions and configurations set up correctly.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.