Mass Accept Draft Files and Access File With Desktop Application

Jon Mercer 971 Reputation points

This is with SharePoint Online which comes with M365 Premium

I have two questions. One we are migrating files over from an on-prem file share to SharePoint, but when I download the files into the SharePoint documents folder, they are all in draft status, and the only way I have found to get around that, is to one at a time switch them to pending, and then to approved. I found documentation that says it can be done in mass by selecting them all and then going to more, but they all have to have been submitted for approval first, which I have to do one at a time. Is there a way to submit a whole set of files for approval?

We have people that need to edit things like PDFs, which currently open up in a browser (Chrome) that is not editable, and they have to download the file to be able to edit it. The best case is to be able to have it open with the client (Adobe Acrobat DC in this case), and then can save it on the SharePoint server, but this doesn't sound like it is possible.

How do I change it, with complete step by step instructions for the modern interface(I have found some documents with parts of the steps) to change it to where documents open with the client program and not the browser.

A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,018 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CaseyYang-MSFT 10,326 Reputation points

    Hi @Jon Mercer ,

    You could use PnP PowerShell to approve all files in a SharePoint Online document library.

    PnP PowerShell commands:

    $SiteURL = ""  
    $ListName = "your library name"  
    #Connect to PnP Online  
    Connect-PnPOnline -Url $SiteURL  
    #Get All Files in Draft State  
    $DraftItems = Get-PnPListItem -List $ListName -PageSize 2000 | Where {$_.FileSystemObjectType -eq "File" -and  $_["_ModerationStatus"] -ne 0}  
    #Approve Files  
    $DraftItems | ForEach-Object {  
        Set-PnPListItem -List $ListName -Identity $_ -Values @{"_ModerationStatus"=0;"_ModerationComments"="Approved by Script"} | Out-Null  
        Write-host "Approved File:"$_.FieldValues.FileRef  

    But in SharePoint online we are not able to open PDF file with Adobe Acrobat DC. You could use an add-in: Adobe Acrobat for M365 as a workaround.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.