Forum Discussion
Hide Group email from global address list
- Aug 04, 2016
Setwart you can do so via PowerShell: Set-UnifiedGroup -Id Group -HiddenFromAddressListsEnabled $True
Setwart you can do so via PowerShell: Set-UnifiedGroup -Id Group -HiddenFromAddressListsEnabled $True
- DeletedFeb 01, 2017
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 CurtisJun 27, 2018Copper 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 AllenJan 31, 2018Silver Contributor
cfiessinger, is there a way to bulk hide private groups. The command listed below works for one at a time. Thanks!
- DeletedFeb 07, 2018
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
- Jeffrey AllenFeb 08, 2018Silver Contributor
Thanks Deleted for this! I'll give it a try.
- Eric ZenzAug 12, 2016Microsoft
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.
- Ali FadaviniaJan 29, 2021Iron Contributor
cfiessinger 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.
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- cfiessingerJan 29, 2021MicrosoftAli, not sure and my recommendation is to open a ticket with our support team so we can investigate further.
- Ali FadaviniaFeb 04, 2021Iron Contributor
cfiessinger I thought to give an update here and express my thanks for the direction and advice.
Problem was raised with Microsoft, their engineer did a great job, we worked along, ran diagnostics on their end that fixed the issue. So it was just a bad O365 Mailbox creation and/or the propertyaddresslistmembership was not being synced properly.
All in all, that scripting command works like a charm if you needed to hide your O365 email address from GAL.Ali
- PradzySRGJan 24, 2024Copper Contributor
Here is a good way to do this in bulk
export a list and put in the text file all the groups you want to hide and run this
gc .\gal.txt | Set-UnifiedGroup -HiddenFromAddressListsEnabled $true