Office 365 Group not created for default domain

Marcus 6 Reputation points
2021-08-30T12:16:09.417+00:00

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?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,567 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,446 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 95,096 Reputation points MVP
    2021-08-30T13:42:08.93+00:00

    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.