I was recently implementing labels in my test Microsoft 365 tenant and I found that I wasn’t able to using labels in SharePoint and the option for SharePoint when defining the scope of the label was greyed out.
As highlighted in the image below, you can see that the option for Groups & Sites in greyed out. Even though its looks like its enabled with the tick in the box, it is not and we are unable to uncheck it.
The grey, highlighted text that asks you to complete steps to be able to apply labels in Teams, SharePoint and Microsoft 365 Groups will take you to this Microsoft help page.
It will ask you to connect to your tenants Security & Compliance PowerShell and then ask you to run the following command:
|
|
When running this command it doesn’t give you any indication that it has changed anything. I personally waited 24 hours before checking if I was able to enable Groups & Sites in the labels scope and I still wasn’t able to.
The Fix!
So to resolve this, we are going to need to run a few PowerShell commands.
- Run the following commands to connect to Azure AD. If you havent already installed the AzureADPreview module these commands will install it for you.
|
|
-
Sign in to your tenant with your admin account.
-
Fetch the current group settings for your Azure AD organisation and display them.
|
|
If nothing is returned then then there are no group settings configured. If it has been configured previously then you will see EnableMIPLabels = True in the output.
- If nothing is returned then run the below to enable it.
|
|
You may get the following error:
|
|
If you do then jump down to the next section.
- Check that the new settings have applied.
|
|
- Now save the settings and apply to the tenant.
|
|
For more information regarding this see here.
Cannot Index into a null array error
If you get the error “Cannot index into a null array”, you will need to edit the “Group.Unified” template to be able to add EnableMIPLabels setting.
- Run the following commands to connect to Azure AD. If you havent already installed the AzureADPreview module these commands will install it for you.
|
|
-
Sign in to your tenant with your admin account.
-
List all the settings template and check that you have a template called “Group.Unified”.
|
|
You should see the following output.
|
|
As you can see there is one there already called “Group.Unified”.
- Now you need to edit this template to be able to add the setting you need. You are going to get the Settings Template object.
|
|
- Next you are going to create a new settings object based on the template.
|
|
- You can now add the setting you need to be able to use labels in SharePoint.
|
|
- Now you need to apply the new setting.
|
|
You can also view the view the values.
|
|
For more information regarding this see [here](https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/groups-settings-cmdlets.
Back to the compliance portal
Now when you go to edit an existing label or create a new label in the compliance portal, the scope option for applying labels to “Groups & Sites” will be enabled and available to check or uncheck.