Forum Discussion
Hide Group email from global address list
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?
Setwart you can do so via PowerShell: Set-UnifiedGroup -Id Group -HiddenFromAddressListsEnabled $True
- cfiessingerMicrosoft
Setwart you can do so via PowerShell: Set-UnifiedGroup -Id Group -HiddenFromAddressListsEnabled $True
- Deleted
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
- Jason CurtisCopper Contributor
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.
- Jeffrey AllenSilver Contributor
cfiessinger, is there a way to bulk hide private groups. The command listed below works for one at a time. Thanks!
- Deleted
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
- Eric ZenzMicrosoft
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.
- Kevin WoodinCopper Contributor
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- mco365Iron Contributor
You could actually restrict sending messages to a particular group to only designated people
Using PS
Set-UnifiedGroup <group> -AcceptMessagesOnlyFromSendersOrMembers <group>
- Tammy MillerCopper Contributor
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.
- Kadir_AnsariCopper ContributorPlease open PowerShell ISE with Administrator.
- $UserCredential = Get-Credential
- $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic –AllowRedirection
- Import-PSSession $Session
- Import-PSSession $Session -DisableNameChecking
- Set-UnifiedGroup -Identity "AffectedGroupName" -PrimarySmtpAddress "AffectedGroupEmailAddress" -HiddenFromExchangeClientsEnabled:$false