SOLVED

Hide Group email from global address list

Copper Contributor

I have some o365 groups created though sds for classroom.

 

The groups are private but they appear in the global address list.

 

Is there a way to prevent this and hide them? 

23 Replies
best response confirmed by Stewart Davies (Copper Contributor)
Solution

Setwart you can do so via PowerShell: Set-UnifiedGroup -Id Group -HiddenFromAddressListsEnabled $True

Note that a group hidden from the GAL may appear in a few other places - notably planner. If your students are only using OWA/SP parts of groups, the method Christophe suggested is good. 

I'm not terribly fluent in PowerShell, so please forgive me if the answer is obvious. It appears that this command applies to only a specific named Group. Can this be set as the default for the tenant?

 

Set-UnifiedGroup -Id Group -HiddenFromAddressListsEnabled $True

What if I wanted to prevent email from going to a group and have it redirected or auto reply to the sender?

Problem is we have an email group centraldispatch~ and it's very similar to Centralizeddispatch~ so people are finding and using the wrong one and now I fear it's saved to some of the users Outlook clients quick address autofills.

Best,
Kevin

You could actually restrict sending messages to a particular group to only designated people

Using PS

Set-UnifiedGroup <group> -AcceptMessagesOnlyFromSendersOrMembers <group>

I am also looking for a way to hide the email address of an Office 365 Group.  I was also hoping to find a way to forward emails sent to an Office 365 Group email address to a different user, however, there doesn't appear to be a way to do this.  Restricting who can send to the group would be a second option. I restricted sending to the Office 365 group to a specific group that I am not a member of.  I sent a test email to this group and it did not reach the group, however, I did not receive any sort of notice that the email did not go through to the group.  I was expecting either a message at the time of sending or a bounce back message.  I would want the person sending to a restricted group to receive some sort of message. 

@Christophe Fiessinger, is there a way to bulk hide private groups.  The command listed below works for one at a time.  Thanks!

Your best bet for accomplishing this en-masse is to export the groups via PS and put the ones you want to hide into a CSV or txt file with the ID or name, or Identity property.  Then use get-content or import-csv and use set-unifiedgroup -HiddenFromAddressListsEnabled  $true property for them all at once.

 

Here's a CMDLET I use to do the export for my tenant.  (more info than you need, but it's nice to have a complete report, as well as see all of the attributes you can manage)

 

Get-UnifiedGroup -resultsize unlimited | select DisplayName,Name,Identity,Id,AccessType,ManagedBy,RecipientType,RecipientTypeDetails,MailTip,GroupMemberCount,GroupExternalMemberCount,PrimarySmtpAddress,ModerationEnabled,HiddenFromAddressListsEnabled,IsMailboxConfigured,ManagedByDetails,Notes,SharePointSiteUrl,SharePointDocumentsUrl,SharePointNotebookUrl,WelcomeMessageEnabled,AutoSubscribeNewMembers,AlwaysSubscribeMembersToCalendarEvents,CalendarMemberReadOnly,CalendarUrl,HiddenGroupMembershipEnabled,InboxUrl,Classification,GroupPersonification,YammerEmailAddress,AllowAddGuests,WhenSoftDeleted,SendModerationNotifications,ModeratedBy,GroupType,IsDirSynced,AcceptMessagesOnlyFrom,AcceptMessagesOnlyFromDLMembers,AcceptMessagesOnlyFromSendersOrMembers,AdministrativeUnits,Alias,GrantSendOnBehalfTo,PoliciesIncluded,PoliciesExcluded,EmailAddressPolicyEnabled,IsExternalResourcesPublished,ProvisioningOption,ConnectorsEnabled,IsMembershipDynamic | export-csv .\O365GroupsReport.csv -NoTypeInformation

Thanks @Deleted for this!  I'll give it a try.

@Jeffrey Allen you can also try Get-UnifiedGroup | Where-Object {$_.AccessType -eq 'Private'} | Set-UnifiedGroup -HiddenFromAddressListsEnabled $true

 

this will hide all private groups

Can you elaborate on this process?

"Then use get-content or import-csv and use set-unifiedgroup -HiddenFromAddressListsEnabled  $true property for them all at once."

What is the full command you would use with import-csv, for example.

 

Thanks!

Get-UnifiedGroup -ResultSize:Unlimited | Set-UnifiedGroup -HiddenFromAddressListsEnabled:$true

 

This will bulk hide all groups. Less daunting to unhide one or two if a customer calls.

Great post, Thanks! I am now using this to audit my 365 Groups. I found several users were creating groups before we locked it down. 

is it possible to hide the Groups from the GAL but still be able to see the Group via the Group Browsing funcionality in Outlook?

Using the attribute msexchhidefromaddresslists set to true Will hide them!
Hidefromexchangeclients attribute will hide it from the outlook interface
thx, we'll give this a try

@Stewart Davies

 

Please open PowerShell ISE with Administrator.
 
  1. $UserCredential = Get-Credential
  2. $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic –AllowRedirection
  3. Import-PSSession $Session
  4. Import-PSSession $Session -DisableNameChecking
  5. Set-UnifiedGroup -Identity "AffectedGroupName" -PrimarySmtpAddress "AffectedGroupEmailAddress" -HiddenFromExchangeClientsEnabled:$false

 

@Christophe Fiessinger I have a Office365 group mailbox, I checked the HiddenFromAddressListsEnabled proerty in powershell; it set to $True.


Also, I checked the Exchange Admin Center, it is checked mark.

 

Grp mailBox setting - Hidden.png

Also, I let the GAL to be synced and downloaded in the Offline Address Book, but still this group mailbox show-up in the Address Book for Outlook.

Do you have any idea how I can fix this?

Thanks

Ali, not sure and my recommendation is to open a ticket with our support team so we can investigate further.
1 best response

Accepted Solutions
best response confirmed by Stewart Davies (Copper Contributor)
Solution

Setwart you can do so via PowerShell: Set-UnifiedGroup -Id Group -HiddenFromAddressListsEnabled $True

View solution in original post