Forum Discussion

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

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

  • 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

     

  • 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. 

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

    • PradzySRG's avatar
      PradzySRG
      Copper 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

    • Ali Fadavinia's avatar
      Ali Fadavinia
      Iron 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

      • cfiessinger's avatar
        cfiessinger
        Icon for Microsoft rankMicrosoft
        Ali, not sure and my recommendation is to open a ticket with our support team so we can investigate further.
    • 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

Resources