Forum Discussion

Stewart Davies's avatar
Stewart Davies
Copper Contributor
Aug 04, 2016

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

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

    • Deleted's avatar
      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 Curtis's avatar
        Jason Curtis
        Copper 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 Allen's avatar
      Jeffrey Allen
      Silver Contributor

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

      • Deleted's avatar
        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 Zenz's avatar
      Eric Zenz
      Icon for Microsoft rankMicrosoft

      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 Woodin's avatar
    Kevin Woodin
    Copper 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

    • mco365's avatar
      mco365
      Iron Contributor

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

      Using PS

      Set-UnifiedGroup <group> -AcceptMessagesOnlyFromSendersOrMembers <group>

      • Tammy Miller's avatar
        Tammy Miller
        Copper 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_Ansari's avatar
    Kadir_Ansari
    Copper Contributor

    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

     

Resources