How to enable or disable connectors in Office 365 groups. We can configure this setting by group level as well as organization level. Please refer the information mentioned below:
(Note: Connect exchange PowerShell to run the commands mentioned in the article.)
Enable Connectors for Bulk Office 365 Groups via CSV file:
To enable connectors for entire Office 365 tenant, change the
Set-OrganizationConfig cmdlet’s parameter -
ConnectorsEnabled value to $true . Once the connectors enabled for entire Office 365 tenant, there will be no change for Office 365 groups with “connectors disabled”, but for groups with “connectors enabled” – when
Connectors ribbon clicked, it lists connectors and functions normally.
Note:
If you wish to enable connectors only for specific Office 365 groups, first you need to enable connectors for the tenant and then proceed with enabling connectors for your groups.
For example, to enable connectors only for specific Office 365 groups in a CSV file, follow the below PowerShell script:
Set-ExecutionPolicy RemoteSigned
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential
$UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Set-OrganizationConfig -ConnectorsEnabled:$true
Get-UnifiedGroup | Set-UnifiedGroup -ConnectorsEnabled:$false
$filePath = "C:\Users\XXXX\Desktop\TestGroups.csv"
$csv = Import-Csv $filePath
Foreach ($line in $csv)
{
Set-UnifiedGroup -Identity $line.Groupname -ConnectorsEnabled:$true
}
Note: Please have a look on Sample CSV file mentioned below:
| Groupname |
| ******@test.onmicrosoft.com |
| ******@test.onmicrosoft.com |
| ******@test.onmicrosoft.com |
| ******@test.onmicrosoft.com |
Disable Connectors for Bulk Office 365 Groups via CSV file:
Following PowerShell script is used to disable connectors for bulk Office 365 Groups via CSV file using
Set-UnifiedGroup cmdlet.
Set-ExecutionPolicy RemoteSigned
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential
$UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
$filePath = "C:\Users\XXXX\Desktop\TestGroups.csv"
$csv = Import-Csv $filePath
Foreach ($line in $csv)
{
Set-UnifiedGroup -Identity $line.Groupname -ConnectorsEnabled:$false
}
Note: Please have a look on Sample CSV file mentioned below:
| Groupname |
| ******@test.onmicrosoft.com |
| ******@test.onmicrosoft.com |
| ******@test.onmicrosoft.com |
| ******@test.onmicrosoft.com |
After executing the above script, Connectors ribbon for the list of Office 365 Groups specified in the CSV file will be
hidden from UI.
Disable Connectors for an Entire Office 365 Tenant:
Following PowerShell script is used to disable connectors for an entire Office 365 tenant using
Set-OrganizationConfig cmdlet.
Set-ExecutionPolicy RemoteSigned
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential
$UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Set-OrganizationConfig -ConnectorsEnabled:$false
After executing the above script, there will be no change for Office 365 groups with “connectors disabled” -
Connectors ribbon hidden from UI. For groups with “connectors enabled” -
Connectors ribbon will be still visible, but when clicked displays the error – “Connectors have been disabled for the group by the tenant…”, which is because the tenant-level setting for disabling connectors overrides the
group setting.
Enable Connectors for an Entire Office 365 Tenant:
Following PowerShell script is used to enable connectors for an entire Office 365 tenant using
Set-OrganizationConfig cmdlet.
Set-ExecutionPolicy RemoteSigned
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential
$UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Set-OrganizationConfig -ConnectorsEnabled:$true
To check whether Connectors is enable for Organization level or not?
Set-ExecutionPolicy RemoteSigned
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential
$UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Get-OrganizationConfig | FL *Connector*
Note: If it is True or
False then you can change it accordingly by changing the attribute
true or false as per requirement. Commands :
Set-OrganizationConfig -ConnectorsEnabled:$true or
Set-OrganizationConfig -ConnectorsEnabled:$false
You can refer the article to know more about "How to Enable or Disable Connectors in Microsoft Teams."
https://answers.microsoft.com/en-us/msoffice/forum/msoffice_o365admin-mso_teams-mso_o365b/how-to-enable-or-disable-connectors-in-microsoft/ae54d1ae-fceb-445c-b810-5d94b5cdfccd
Please let me know if you have any queries on this.
Thanks,
Shrikant :)