Hide Microsoft 365 Group Mail From Global Address List

Microsoft 365 Group is a central place for Microsoft 365, by which we can manage and share the services between the collection of users. The resources, which are associated with Microsoft 365 group are Outlook Calendar, Outlook Conversations, OneNote notebook, SharePoint team site, SharePoint Folders, Planner Plans, Intune device Management. The resources can be shared between internal users and external users. 

By default, all users from the organization can see the Microsoft 365 group from the global address list. The group setting "Hide from my organization's global address list" helps to decide whether users from the organization can see the mail group from the address list or not.

In this post, I would like to show you how to hide the Mail group from the organization global address list.

Admin UI

  • Navigate to Microsoft 365 Admin Center
  • Expand the Teams & groups menu from the left navigation
  • Select Active teams & groups
  • Choose or click the group name to open
  • From the opened right side panel, click the Settings tab
  • In the General Settings section, tick the checkbox Hide from my organization's global address list
  • Click Save button

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/groups/<group id>

Consent Permission

Delegated Permission: Group.ReadWrite.All, Directory.ReadWrite.All, Directory.AccessAsUser.All

Application Permission: 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

{
    "HideFromAddressLists": true
}

In Microsoft Graph Explorer, click Run Query to send the request and update the settings for the Microsoft 365 Group.

Output

Now the Mail group will be hidden from the users across the organization's global address list. The below response will be returned after submitting the request.

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups/$entity",
    "id": "6e4axxxx-xxxx-xxxx-xxxx-xxxxxxxx51eb",
    "AccessType": "Public",
    "allowExternalSenders": false,
    "autoSubscribeNewMembers": false,
    "description": "GraphTeam Description",
    "displayName": "Graph Team",
    "EmailAddress": "graphteam@contoso.onmicrosoft.com",
    "isSubscribedByMail": false
}