19 thoughts on “How to Completely Disable External Sharing for a Single Office 365 Group”

  • Hello,
    Great article, but it seems the title article ‘COMPLETELY DISABLE EXTERNAL SHARING’ is not accurate.
    In fact we do still have right to share files and folders within SharePoint even if the guest access is blocked. We have to go to SharePoint admin center, go to site related to the O365 group and block share with external and.. done 🙂

    • Forget about my comment, I did not go trough the next part of your article…. 🙂

  • Hi Laura, thanks for the post. Have you tried to call the graph API post from PowerShell so that the external sharing get disabled for the group? I’m struggling to adapt your C# code to PowerShell and call the graph API query

    • Some here. Without an endpoint for MS Graph and C# it’s impossible to set this stuff except if you are azure ad admin. 🙁

    • @Quantum: Great that you got the C# sample working. 🙂

      @Luis: I know this reply comes quite late but earlier this month the Microsoft Graph team released a new Microsoft Graph PowerShell module. I recommend you give that a go as it doesn’t require you to do authentication and build the REST requests yourself.

      Laura

    • Hi Walter,

      Yes, there is — though it is a tenant-wide setting. You can do this through the UI by going to the Teams admin center -> Org-wide settings -> Guest access -> Enable “Allow guest access in Teams” and then disabled “Chat” under messaging.

      Laura

  • I’m having exactly the same issue when doing this with PowerShell. It seems to require Global Admin rights to execute the New-AzureADObjectSetting cmdlet. I’ve tried every possible individual admin role, no luck so far.
    I’m wondering if it’s because we need to use the AzureAD Preview module, if there’s a limitation there perhaps?

    • Hi Richard,

      Thank you for sharing your findings! It’s good to know that you need to be a global admin to make those changes.

      The global admin permission is probably required simply because you are creating a new object setting in Azure AD. I think I’ve always run that commandlet as a global administrator in the past anyway, so I can’t personally say for sure that it didn’t require those permissions in the past. If it didn’t, I’ll take your word for it. 🙂 However, I can’t say why it changed if it did.

      Laura

  • Hi
    Seems like Microsoft has changed the permissions required for the PowerShell option recently! All the sudden it fails with a Forbidden error – seems like Global Admin is required now!? Anything you have seen?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.