Make All Teams Site read only for group of users but keep editable for rest Powershell

GoodResource 376 Reputation points
2022-04-28T05:41:54.993+00:00

Hi,

We have a requirment, where we want Team site in such a way that no particular group of users should be able to share/upload files on Teams.

  • I am aware to disable onedrive for those users so that they can't share or upload files on chat.
  • I am also aware that from Site permission, if i take off the setting and make the members read only, they will not be able to share files on Teams site.

I am looking for a powershell script where i can run for all Team site, where group of users won't be able to upload/share files on Site but owners and members can.

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,070 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,587 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,624 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Emily Du-MSFT 41,786 Reputation points Microsoft Vendor
    2022-04-28T09:21:16.973+00:00

    @GoodResource

    For a team site collection, you could change Site sharing settings to control who could share files. And according to my research, there is currently no complete PowerShell command that can support to change the Site sharing settings.

    197286-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.


  2. Emily Du-MSFT 41,786 Reputation points Microsoft Vendor
    2022-05-05T09:55:01.903+00:00

    @GoodResource

    I'm glad to hear you solve the problem ,if you have any issue about SharePoint, you are welcome to raise a ticket in this forum.

    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.". and according to the scenario introduced here: Answering your own questions on Microsoft Q&A, I would make a brief summary of this thread:

    [Make All Teams Site read only for group of users but keep editable for rest Powershell]

    Issue Symptom:
    We have a requirement, where we want Team site in such a way that no particular group of users should be able to share/upload files on Teams.

    • I am aware to disable onedrive for those users so that they can't share or upload files on chat.
    • I am also aware that from Site permission, if i take off the setting and make the members read only, they will not be able to share files on Teams site.

    I am looking for a powershell script where i can run for all Team site, where group of users won't be able to upload/share files on Site but owners and members can.

    Current status:
    This is applicable for MS teams. I found below article and this way i can restrict users to share/upload any files over chat or teams channel. It is a great article and exactly what i wanted to achieve. Basically we disabled onedrive for those users, deleted the onedrive personal site if they have created already and then as final step apply file restriction teams policy as below to those users.

    https://learn.microsoft.com/en-us/microsoftteams/turn-off-teams-native-file-upload-policy

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


    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.

    0 comments No comments