Sharepoint Server 2019 Mysites User unable to upload files

BTurner 20 Reputation points
2023-11-01T13:03:56.3733333+00:00

I have a SharePoint 2019 server with a dedicated Mysites site collection running. I found users are unable to create or upload files to their own mysite/onedrive. I checked the permissions and each user is set to Full Access on their specific mysite site. I also noticed no +Add file button is at the top unless you are logged in as the farm admin account.

One point of note, this mysite content db was migrated from a 2013 site (then upgrade in a 2016 environment, then upgraded to 2019). It was also converted from classic to claims using powershell with the -RetainPermssions modifier. Could the conversion have an effect?

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,367 questions
{count} votes

Accepted answer
  1. Emily Du-MSFT 47,296 Reputation points Microsoft Vendor
    2023-11-02T03:01:40.55+00:00

    Hi @BTurner ,

    I'm glad to hear you solve the problem and thanks for your sharing.

    By the way, since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others.". So, I would make a brief summary of this thread.

    You could click the "Accept Answer" button for this summary to close this thread, and this can make it easier for other community members to see the useful information when reading this thread. Thanks for your understanding!

    [SharePoint Server 2019 Mysite user unable to upload files]

    Issue Symptom:

    OP have a SharePoint 2019 server with a dedicated Mysite site collection running. Users are unable to create or upload files to their own Mystie/OneDrive. OP checked the permissions, and each user is set to Full Access on their specific Mysite site collection. OP also noticed no +Add file button is at the top unless the user is logged in as the farm admin account.

    One point of note, this Mysite content db was migrated from a 2013 site (then upgrade in a 2016 environment, then upgraded to 2019). It was also converted from classic to claims using PowerShell with the -RetainPermssions modifier.

    Current status:

    Clicking "Remove Unique Permissions" for document library in the Mysite site collection lets users access their stuff once again.

    Use PowerShell to delete unique permission for document library in all Mysite site collections.

    # Get a list of all site collections in your web application
    $webAppURL = "http://mysite.domain.tld"
    $webApp = Get-SPWebApplication $webAppURL
    
    # Iterate through each site collection
    foreach ($siteCollection in $webApp.Sites) {
        $site = $siteCollection.RootWeb
    
        # Check if the "Documents" folder has unique permissions
        $documentLibrary = $site.Lists["Documents"]
        if ($documentLibrary -ne $null -and $documentLibrary.HasUniqueRoleAssignments) {
            # Reset permissions for the "Documents" folder
            $documentLibrary.ResetRoleInheritance()
            $documentLibrary.Update()
            Write-Host "Unique permissions deleted for $($documentLibrary.RootFolder.ServerRelativeUrl) in $($site.Url)"
        }
        else {
            Write-Host "No unique permissions found for $($documentLibrary.RootFolder.ServerRelativeUrl) in $($site.Url)"
        }
       
    }
    
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Rancy Kaur 20 Reputation points
    2023-11-01T16:00:28.4966667+00:00

    I would say you can use powershell to your rescue, here is an article for your reference: https://www.sharepointdiary.com/2014/12/delete-unique-permissions-reset-broken-inheritance-using-powershell.html


  2. BTurner 20 Reputation points
    2023-11-01T20:04:03.98+00:00

    For anyone with this issue.

    # Get a list of all site collections in your web application
    $webAppURL = "http://mysite.domain.tld"
    $webApp = Get-SPWebApplication $webAppURL
    
    # Iterate through each site collection
    foreach ($siteCollection in $webApp.Sites) {
        $site = $siteCollection.RootWeb
    
        # Check if the "Documents" folder has unique permissions
        $documentLibrary = $site.Lists["Documents"]
        if ($documentLibrary -ne $null -and $documentLibrary.HasUniqueRoleAssignments) {
            # Reset permissions for the "Documents" folder
            $documentLibrary.ResetRoleInheritance()
            $documentLibrary.Update()
            Write-Host "Unique permissions deleted for $($documentLibrary.RootFolder.ServerRelativeUrl) in $($site.Url)"
        }
        else {
            Write-Host "No unique permissions found for $($documentLibrary.RootFolder.ServerRelativeUrl) in $($site.Url)"
        }
       
    }
    
    

Your answer

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