Restrict File Type(.exe,.dll files) upload to document library in ModernSharepoint?

Srikanth Manga 1 Reputation point
2022-10-25T05:46:50.77+00:00

253716-exefileupload.jpg

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xyza Xue_MSFT 30,176 Reputation points Microsoft External Staff
    2022-10-25T09:01:34.14+00:00

    Hi @Srikanth Manga ,
    There is no OOTB facility with SharePoint Online to restrict specific file extensions in SharePoint Online.
    But after my research and testing , I can create a flow as a workaround that will auto-runs on each file upload and if it doesn't match the given type or extension (.exe ,.dll in your case), auto-delete that document and send email to the author who uploaded it.
    Compose 2 inputs:

    last(split(triggerOutputs()?['body/{FilenameWithExtension}'],'.'))  
    

    253837-image.png
    253825-image.png


    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.


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.