Disable standard Teams and SharePoint site creation

Jack Chuong 401 Reputation points
2024-09-20T08:32:19.8466667+00:00

Hi all,

I want to prevent creating sharepoint site every time user create Microsoft Team group.

I read this article https://www.sprobot.io/learn/disable-standard-teams-and-sharepoint-site-creation

I did step 2 Disable SharePoint site creation

I get issue with step 1 Limit Microsoft 365 group creation , I followed this guide https://learn.microsoft.com/en-us/microsoft-365/solutions/manage-creation-of-groups?view=o365-worldwide

.\GroupCreators.ps1
Welcome to Microsoft Graph!

Connected via delegated access using 14d82eec-204b-4c2f-b7e8-296a70dab67e
Readme: https://aka.ms/graph/sdk/powershell
SDK Docs: https://aka.ms/graph/sdk/powershell/docs
API Docs: https://aka.ms/graph/docs

NOTE: You can use the -NoWelcome parameter to suppress this message.

Update-MgBetaDirectorySetting : Insufficient privileges to complete the operation.
Status: 403 (Forbidden)
ErrorCode: Authorization_RequestDenied
Date: 2024-09-20T08:21:40
Headers:
Transfer-Encoding             : chunked
Vary                          : Accept-Encoding
Strict-Transport-Security     : max-age=31536000
request-id                    : bf515205-b265-4fb1-baab-6a9bc3f12836
client-request-id             : 6532efd2-1951-4d37-93e4-46480c6671cd
x-ms-ags-diagnostic           : {"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF00001A31"}}
x-ms-resource-unit            : 1
Cache-Control                 : no-cache
Date                          : Fri, 20 Sep 2024 08:21:40 GMT
At D:\jack\GroupCreators.ps1:45 char:1
+ Update-MgBetaDirectorySetting -DirectorySettingId $settingsObjectID - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: ({ DirectorySett...ectorySetting }:<>f__AnonymousType206`3) [Update-MgBetaDirectorySetting_Update], Exception
    + FullyQualifiedErrorId : Authorization_RequestDenied,Microsoft.Graph.Beta.PowerShell.Cmdlets.UpdateMgBetaDirectorySetting_Update

Name                            Value
----                            -----
NewUnifiedGroupWritebackDefault true
EnableMIPLabels                 false
CustomBlockedWordsList
EnableMSStandardBlockedWords    false
ClassificationDescriptions
DefaultClassification
PrefixSuffixNamingRequirement
AllowGuestsToBeGroupOwner       false
AllowGuestsToAccessGroups       true
GuestUsageGuidelinesUrl
GroupCreationAllowedGroupId
AllowToAddGuests                true
UsageGuidelinesUrl
ClassificationList
EnableGroupCreation             true

Please give me some advice, thank you very much.

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
4,993 questions
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,183 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,007 questions
0 comments No comments
{count} votes

Accepted answer
  1. Xyza Xue_MSFT 24,901 Reputation points Microsoft Vendor
    2024-09-25T07:47:19.26+00:00

    Hi @Jack Chuong ,

    Understand what you're saying, and it really can only be fixed from Limit Microsoft 365 group creation.

    From the error message, it shows permission issue. Please grant the following permission to see if it can work. User's image

    Hope the above information can help and if there's any update, feel free to let us know.

    0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Xyza Xue_MSFT 24,901 Reputation points Microsoft Vendor
    2024-09-23T02:11:13.7966667+00:00

    Hi @Jack Chuong ,

    Thank you for posting in this community.

    If "Disable SharePoint site creation" setting is disabled, new SharePoint sites will not be automatically built when a user creates a new group in a team. However, because creating a new group in Teams simultaneously generates a SharePoint site for the group, this setting will also stop users from creating new Office 365 groups. So there is no need to do it manually STEP 1 : Limit Microsoft 365 group creation.


    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

  2. Jack Chuong 401 Reputation points
    2024-09-23T06:43:10.5033333+00:00

    Hi @Xyza Xue_MSFT ,

    I did "Disable SharePoint site creation" , but when user create Microsoft Team group , a sharepoint site is still created.

    Capture

    0 comments No comments

  3. Xyza Xue_MSFT 24,901 Reputation points Microsoft Vendor
    2024-09-23T07:40:28.4066667+00:00

    Hi @Jack Chuong ,

    After my tests, it's just as you said. The change that can be made from the sharepoint level is to disable SharePoint site creation. I consulted with Teams experts and came to the conclusion that the creation of sites is automatically generated when Teams is created and there is no setting to actively cancel it. Because he is where the teams file is stored, this is by design.

    User's image

    https://learn.microsoft.com/en-us/sharepoint/teams-connected-sites


    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

  4. Jack Chuong 401 Reputation points
    2024-09-23T08:07:31.6633333+00:00

    Hi @Xyza Xue_MSFT ,

    I need a way to prevent creating sharepoint site every time user create Microsoft Team group, this is by design then I have to:

    • Limit Microsoft 365 group creation
    • Or Limit Microsoft Team creation

    Because my users create so many Team group so many sharepoint sites are created.

    0 comments No comments

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.