Forum Discussion

trillian74's avatar
trillian74
Copper Contributor
Jan 09, 2020

how to create a team without sending out the default "you have been added to team..." mail message?

Hi

I am almost finished with my provisioning web-part for creating groups with teams using graph, but  the customer want the "provisioneer" to be able to refrain from sending out "you've been added" messages

 

I cannot seem to find if it's possible in the documentation, but then again it doesn't always have it all written down.

 

Do some of you know if it's possible?

 

thnx, O

  • Try this:

    Run the powershell command with the exchange module connected:

    Set-UnifiedGroup <groupname> -UnifiedGroupWelcomeMessageEnabled:$<true/false>

    Then try add the members to the group via AAD or admin portal.

    Keep in mind that users won’t show up immediately as members in Teams due to latency

    Adam
    • trillian74's avatar
      trillian74
      Copper Contributor

      yes, but that doesn't stop the added to teams mail from being sent out. (?) . It stops the office groups mail from being sent. When i create the team right thereafter they receive a "You've been added to a team in Microsoft Teams" mail. This is the mail i want to switch off  Gousia_Begum  has the same effect as doing it in powershell.

      • Gousia_Begum's avatar
        Gousia_Begum
        Icon for Microsoft rankMicrosoft

        trillian74 How are you adding the team member after creating the team with WelcomeEMailDisabled: True? Are you adding the user using Graph API or from the Teams UI?

  • trillian74 

    You can do that with Microsoft Graph only at creation time. Here is a sample

    Url: https://graph.microsoft.com/v1.0/groups

    Request Body:

    --

    {
        "displayName": "TestGroup-01",
        "groupTypes": [
            "Unified"
        ],
        "mailEnabled": true,
        "mailNickname": "testgroup-01",
        "resourceBehaviorOptions": [
            "WelcomeEmailDisabled"
        ],
        "securityEnabled": false,
        "visibility": "Private",
    }

Resources