Saturday, April 20, 2024
HomeMicrosoft 365We could not find the Microsoft 365 Group connected to this site

We could not find the Microsoft 365 Group connected to this site

Connect to a Microsoft 365 group

Introduction





The error message “We could not find the Microsoft 365 Group connected to this site” typically occurs in SharePoint Online when a site is not properly connected to its associated Microsoft 365 group.

When you create a modern SharePoint site, it is automatically associated with a Microsoft 365 group that provides additional features and functionality, such as a shared inbox, calendar, and OneNote notebook. However, if the site was created prior to the Microsoft 365 group being created or if the group was deleted or disconnected from the site, you may encounter this error message.

To resolve this issue, you can try reconnecting the site to its associated Microsoft 365 group. To do this, follow these steps:

  1. Go to the SharePoint site that is showing the error message.
  2. Click on the gear icon in the upper-right corner and select “Site Information”.
  3. In the “Connected to” section, check if the site is connected to a Microsoft 365 group. If not, click “Connect to a new group”.
  4. Select “Create a new group” or “Connect to an existing group” and follow the prompts to connect the site to the group.
  5. Once the site is connected to the group, the error message should no longer appear.

If the above steps do not resolve the issue, you may need to contact your SharePoint or Microsoft 365 administrator for further assistance.

To reconnect a SharePoint Online site to its associated Microsoft 365 group using PowerShell, you can use the following script:





# Connect to SharePoint Online
Connect-SPOService -Url https://contoso-admin.sharepoint.com

# Get the site
$siteUrl = "https://contoso.sharepoint.com/sites/SiteName"
$site = Get-SPOSite -Identity $siteUrl

# Get the group
$groupId = $site.GroupId
$group = Get-UnifiedGroup -Identity $groupId

# If the site is not connected to a group, connect it
if (!$group) {
    Connect-SPOSite -Identity $siteUrl -GroupOwner "GroupName@contoso.onmicrosoft.com"
}

# If the site is connected to a group but the connection is broken, reconnect it
elseif ($group.ExternalDirectoryObjectId -ne $site.ExternalDirectoryObjectId) {
    Disconnect-SPOSite -Identity $siteUrl
    Connect-SPOSite -Identity $siteUrl -GroupOwner "GroupName@contoso.onmicrosoft.com"
}

Replace “https://contoso-admin.sharepoint.com” with the URL of your SharePoint admin center, “https://contoso.sharepoint.com/sites/SiteName” with the URL of the site you want to reconnect, and “GroupName@contoso.onmicrosoft.com” with the email address of the group owner.

The script first connects to SharePoint Online using the Connect-SPOService cmdlet. It then gets the site and its associated group using the Get-SPOSite and Get-UnifiedGroup cmdlets, respectively. If the site is not connected to a group, the script uses the Connect-SPOSite cmdlet to connect it. If the site is already connected to a group but the connection is broken, the script first uses the Disconnect-SPOSite cmdlet to disconnect it and then reconnects it using the Connect-SPOSite cmdlet.

Once you run the script, the site should be reconnected to its associated Microsoft 365 group.

Most Popular