Changing the domain with the intent to provision a group there is not the approach you should be taking. Email address policies are the best solution here, or you can simply provision the group with specifying the -PrimarySMTPaddress value when using New-UnifiedGroup cmdlet.
If you want a completely Graph-based solution, you're out of luck as Graph does not allow you to change the primary SMTP address currently, as it has very limited support for Exchange operations.
Office 365 Group not created for default domain
Hi,
I have two verified domains in Office 365 and is working with Microsoft Graph to manage groups for these domains.
The problem
Im experiencing a delay after changing "default domain", until its possible to create a group for that domain.
Due to this delay, the group I create ends up with wrong domain.
Example
Lets say DomainA.com is "default" and I update and set DomainB.com as the "default domain" (because I want to create a group for domainB.com).
Microsoft Graph returns OK when I do this update, and I can also see in Office 365 Admin Center that domainB.com is immediately marked as "default domain".
If I now create a group it will get domainA.com as domain anyway, which is not what I expect since its not marked as default anymore.
However, if I wait some time and later create a group it works fine, the group will then correctly get DomainB.com.
Email Address Policies
I dont have any extra "Email Address Policies" added via Powershell etc, so think the group always should be created for the default domain.
https://learn.microsoft.com/en-us/microsoft-365/solutions/choose-domain-to-create-groups
Could this delay be a bug, or is it an expected behaviour?
1 answer
Sort by: Oldest
-
Vasil Michev 95,666 Reputation points MVP
2021-08-30T13:42:08.93+00:00