Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

OneDrive: "You can't edit your files because your license to use OneDrive ended over a couple of months ago"

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

A user opens their OneDrive for work or school and cannot edit or upload anything. The message says that the licence to use OneDrive ended over a couple of months ago. On our reading, it is a matter for the administrator rather than a fault on the user's computer, because the page's fixes are administrator tasks.

Microsoft's page for this message gives a cause that is concrete and checkable by an administrator: enforcement of policy changes for unlicensed OneDrive accounts, which went into effect on January 27, 2025. It then gives two checks and fixes, in order: the licence assigned to the user, and the user's role as primary site collection administrator of their own OneDrive site. The sections below follow that order.

Nothing before the Fix section changes anything.

What the error means

The page says that when a user in your organisation tries to access their OneDrive for work or school site, they receive this message:

You can't edit your files because your license to use OneDrive ended over a couple of months ago.

As a result they cannot edit or upload files to the site. The page's cause is that the issue "occurs because of enforcement of policy changes for unlicensed OneDrive accounts. These changes went into effect on January 27, 2025."

The page defines an unlicensed account as one where either of two conditions is true:

  • The license assigned to the user does not include OneDrive.
  • The OneDrive license assigned to the user is expired.

The page does not describe what the user can still do in this state beyond not being able to edit or upload, and it does not say what happens to the files over time. On our reading, treat the message as a licence and ownership problem for an administrator, and not as a fault on the user's computer.

Likely causes

Cause What you see How to confirm
The user has no licence that includes OneDrive The message for that user; other users with a licence are fine Microsoft 365 admin center, Users, Active users, the user, Licenses and apps
The OneDrive licence has expired Same message; the user was working before The same screen shows no valid licence that includes OneDrive
The user is not the primary site collection administrator of their own OneDrive site The message continues after the licence is correct SharePoint admin center or the SharePoint Online Management Shell, described below
The primary owner of the site was set to someone else Same as above; the page says issues might still occur The owner returned by the shell command below is not the user

The page gives no counts, so the rows are not in order of likelihood. The first two are the page's first check. The last two are its second.

Prove the cause before changing anything

All of these read only.

  1. Ask the user for the exact message and whether it appears on their own OneDrive. The page's scenario is a user accessing their own OneDrive for work or school.

  2. Check the licence. In the Microsoft 365 admin center, go to Users, then Active users. Select the affected user account. In the details pane, select Licenses and apps. Expand the Licenses section and check whether a valid licence that includes OneDrive is assigned. The page does not list which licences include OneDrive, so the check is yours to make against the tenant's own licence details.

  3. Check the site owner. The page says the user must be the primary site collection administrator of their OneDrive site, "not a secondary owner or site collection administrator", and gives two methods, both run by an account that has the SharePoint Administrator role.

    In the SharePoint admin center, the page's route is: select More Features; under User Profiles select Open; under People select Manage User Profiles; in the Find profiles box enter the affected user and select Find; right-click the user and select Manage site collection owners. Look at the Primary Site Collection Administrator section to see whether the user account is displayed. Do not change the section yet.

    The other route, if the SharePoint Online Management Shell is installed, starts by connecting to the SharePoint Online admin centre, then reads the owner:

Connect-SPOService -Url https://<tenant name>-admin.sharepoint.com
(Get-SPOSite -Identity <the user's OneDrive site URL>).Owner

The page gives the URL format of a user's OneDrive site as: https://<tenant name>-my.sharepoint.com/personal/<user principal name>. The first command prompts for the account name and password of a SharePoint administrator. The second command only reads the owner.

  1. Record what you found: the licence, the owner returned and the time. Save the shell's output for the owner, because that is the only record of who the primary owner was before any change.

Example (illustrative): at a Hobart professional-services firm, ayla@example.com.au has been on leave and returns to a OneDrive that will not let her edit. In the admin center her Licenses section shows only a mailbox plan with no OneDrive. That is the page's first condition, "The license that's assigned to the user doesn't include OneDrive."

Fix

Work through the page's two checks in order. Stop when the user can edit again, and note that licence changes take time to apply.

Check 1: assign a valid licence that includes OneDrive

Risk: The next step changes the user's licence in the tenant. Assigning a licence is a decision for the person who owns the tenant's licences; the page does not describe cost or availability, and the page says changes might take up to 24 hours to take effect if the user account is not archived, and up to 48 hours if the account is archived.

Before you change the licence, write down what is currently assigned in the Licenses section, as shown in the Microsoft 365 admin center.

If the user does not have a valid licence that includes OneDrive, assign the required licence to the user in the Licenses and apps pane.

To undo it: the licence can be removed again in the same pane, but removing a licence that includes OneDrive puts the account back into the unlicensed state the page describes, so the same message would return. Use the list you wrote down as the record of the earlier state, and ask the licence owner before you remove anything.

Check 2: make the user the primary site collection administrator of their own OneDrive site

Risk: The next steps change who is the primary site collection administrator of a user's OneDrive site. The page warns that if the primary owner is set to someone else, issues might still occur, and that removing a user as admin of their own OneDrive can break many user experiences. The page gives no command to restore a previous owner.

The page says to do this only if the issue persists after Check 1. It carries two cautions: the user must be the primary site collection administrator, not a secondary one, and "Don't remove a user as the admin of their own OneDrive site because this action can break many user experiences."

Before you start, keep the owner output from the proof step above, or a screenshot of the Primary Site Collection Administrator section.

Using the SharePoint admin center, as described in the proof step: in the Primary Site Collection Administrator section, check whether the user account is displayed. If it is not, add the user account and select OK.

Using the SharePoint Online Management Shell, in the session connected earlier, and only after the owner read shows that the affected user is not the primary site collection administrator, run:

Set-SPOUser -Site <the user's OneDrive site URL> -LoginName <user name> -IsSiteCollectionAdmin $true

To undo it: the page gives no command or portal step that returns a site to a previous owner, and it warns against removing a user as the admin of their own site. The recorded owner from the proof step is the only reference for what was there before. Decide with the tenant owner before you change a site whose owner was set on purpose.

Confirm the fix

  • The user can edit and upload files in their OneDrive for work or school, and the message does not return on the next sign-in.
  • The Licenses section shows a valid licence that includes OneDrive, and the Primary Site Collection Administrator section shows the user.
  • Allow the time the page gives: up to 24 hours for a licence change on an account that is not archived and up to 48 hours on an archived account.
  • The ticket records the licence and the owner before and after, with the date of the change.

What to watch afterwards

  • Other users whose licences do not include OneDrive or have expired. The page's cause is the policy for unlicensed accounts, so the same message can appear for them.
  • Licence changes that remove OneDrive from a user, such as a plan change or a leaver who is later reinstated. The page's definition of unlicensed covers both a licence without OneDrive and an expired one.
  • OneDrive sites whose primary owner was changed by someone. The page's second check exists because a different primary owner can leave issues.
  • Any process that removes a user from the admin role of their own OneDrive site. The page says it can break many user experiences.

Risks and limits

These steps have not been run or lab-tested.

The page gives its policy date as January 27, 2025, and its own date is 2025-06-25, so check the current page for changes after that. It does not say which Microsoft 365 licences include OneDrive, what the user can still do in the unlicensed state, or how long the files are kept. It gives no way to restore a previous primary site collection administrator. The shell command in Check 2 changes ownership of a site, so run it only after the owner read shows the user is not already the primary administrator. Microsoft's pages give no counts for how many cases each cause covers.

Sources