Jul 18 2017 04:04 AM - edited Jul 24 2017 01:55 AM
The Set-UnifiedGroup PowerShell commandlet has a couple of interessting properties. In particular, hiding the group from the global address list (HiddenFromAddressListsEnabled) and enabling/disabling the welcome e-mail (UnifiedGroupWelcomeMessageEnabled).
Is there a way to set these properties either as default for the entire O365 tenant or via the Graph API on a per group basis?
Background info:
I am looking for a way to do this without PowerShell, on purpose, because I am working on a provisioning solution coded in C# (and not PowerShell). All provisioning actions should run in the same thread...
Sep 06 2019 02:50 AM - edited Sep 06 2019 02:51 AM
Now you can set resourceBehaviorOptions attribute while creating new group, but it is still not supported in edit group.
For more info: https://www.morgantechspace.com/2019/09/hide-office-365-group-from-gal-using-graph-api.html
Jan 18 2021 06:21 AM
@Tony Redmond One reason is if you -- like me -- are developing hosted services for use in a client's tenant and must use graph API calls to accomplish tasks like this because your code does not run within the client's network.
Jan 18 2021 06:52 AM
@doughorton That's fair and a good reason. Another good reason is when you must deal with hundreds or even thousands of groups as Graph-based code will be much faster to process these objects than PowerShell will ever be. My comment still holds true in many other cases when PowerShell can do a job without the need to write any Graph code.
Mar 30 2022 09:04 AM
Mar 30 2022 10:45 AM
If you set the MailNickname property when running New-MgGroup and the group is mail enabled, the MailNickname becomes the root of the primarySmtpAddress.
$Group=New-MgGroup -DisplayName "March 2023 Sales Operations Team" -GroupTypes Unified -MailNickName March.2023.Sales.Operations -MailEnabled:$True -SecurityEnabled:$False -Description "A group for Sales Operation management"
Get-unifiedgroup -Identity $Group.Id | fl primarysmtpaddress
PrimarySmtpAddress : Email address removed
Mar 31 2022 06:13 AM
Mar 31 2022 06:48 AM
Apr 25 2022 06:24 AM
Apr 25 2022 06:35 AM
Apr 25 2022 07:11 AM
Apr 25 2022 07:17 AM