Microsoft Team is a communication product/service from Microsoft 365. This helps the user to connect and communicate between the users within the organization or external Organization. There are two sets of user types within an Organization for a Team. Those are Owners and Members.
By default, team members or owners can mention the @team in chat messages. There is a setting available in Microsoft teams to block or allow the team mentions. In this post, I would like to show you how to restrict the users from mentioning the team in chat messages.
Team UI
- Open Microsoft Team
- If you are the owner of the Microsoft Team, Click the More Options (...) button for the particular Team
- Click the Settings Tab
- Expand the @mentions
- Uncheck the option "Show members the option to @team or @[team name] (this will send a notification to everyone on the team)". Settings get automatically saved.
Microsoft Graph API
We can also use the Microsoft Graph API to do the same action. Use the below options in Microsoft Graph Explorer to block the same option.
Microsoft Graph API EndPoint
PATCH https://graph.microsoft.com/v1.0/teams/<team id>
Consent Permission
Delegated Permission: TeamSettings.ReadWrite.All, Group.ReadWrite.All**, Directory.ReadWrite.All**
The below request headers should be sent along with the request to update the settings,
Request Header
Content-Type: application/json
Request Body
{
"messagingSettings": {
"allowTeamMentions": false
}
}
In Microsoft Graph Explorer, click Run Query to send the request and update the settings for the Team.
Output
Now the users won't be able to mention the team in their messages in the Microsoft Team Chat. The below response will be returned after submitting the request.
{}