Forum Discussion

Shanza's avatar
Shanza
Copper Contributor
May 05, 2023
Solved

Update Request a Team app flow to change the default external sharing settings

Hi,   To manage requests for new teams sites, we use the Request a Team app. The logic app used in this flow builds new Teams sites from scratch using a template. However, the 'New and existing gue...
  • Deleted's avatar
    Deleted
    May 15, 2023

    Shanza 

    In a Logic App, you can disable external sharing for a Microsoft Teams by utilizing the "Send an HTTP request to SharePoint" action. This action allows you to interact with the SharePoint site associated with the Microsoft Teams team and update its settings.

    Here's an example of how you can disable external sharing for a Microsoft Teams team in a Logic App:

    1. Add the "Send an HTTP request to SharePoint" action to your Logic App.

    2. Set the following details in the action:

    - Site Address: Provide the SharePoint site address associated with the Microsoft Teams team. You can use the expression `triggerBody()?['team']['webUrl']` to retrieve the site address dynamically from the Teams trigger.

    - Method: Select "PATCH".

    - Uri: Set the URI as `/_api/web/`.

    - Headers:
    - Key: Content-Type
    Value: application/json;odata=verbose

    - Body:

    {
    "__metadata": {
    "type": "SP.Web"
    },
    "SharingCapability": 1
    }

    3. Save the Logic App and run it to disable external sharing for the Microsoft Teams team's associated SharePoint site.

    The "SharingCapability" property is set to `1` in the request body to disable external sharing. You can modify the value as per your specific requirements.

    Make sure that the Logic App has the necessary permissions to access and update SharePoint sites. You may need to configure the appropriate connection and provide the required access token or credentials for authentication.

    Note that disabling external sharing for a Microsoft Teams team's SharePoint site will affect the sharing settings for associated files, documents, and other content within that site.

     

    If I have answered your question, please mark your post as Solved
    If you like my response, please give it a like

     

Resources