2

Using the script posted here:

https://docs.microsoft.com/en-us/sharepoint/dev/transform/modernize-connect-to-office365-group

I am trying to add an Office 365 group to a standard Team site collection (classic experience).

Log records just before error show:

Enabling modern page feature, disabling modern list UI blocking features
Call groupify API with following settings: 
Alias=classic3grp, IsPublic=True, Classification=Low Impact

Alias name is classic3grp, no spaces or special chars, yet continue to get an error trying to add a group with that alias.

PnP cmdlet rejects the alias string.

In Groups Admin, that group alias is not already out there.

Add-PnPOffice365GroupToSite : {"odata.error":{"code":"Request_BadRequest","message":{"lang":"en","value":"Property
classification has an invalid value."},"requestId":"dbd96438-56a5-4aa8-88d4-722a63893eca","date":"2018-06-27T18:09:50",
"values":[{"item":"PropertyName","value":"classification"},{"item":"PropertyErrorCode","value":"InvalidValue"}]}}
At C:\downloads\absolutt\sharepointmodernizationscanner\PerformConnectToGroup.ps1:251 char:9
+         Add-PnPOffice365GroupToSite -Url $siteCollectionUrl -Alias $a ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (:) [Add-PnPOffice365GroupToSite], ServerException
    + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Admin.AddOffice365GroupToSite

Does anyone know why?

  • The error tells you exactly what the problem is. Put quotes around your classification value. – Derek Gusoff Jun 27 '18 at 20:27
1

This error is occurring because you have not enabled Site classifications.

You need to enable Site Classifications in your tenant to use the classification parameter.

For that, you need to use the PnPSiteClassification command as below:

Connect-PnPOnline -Scopes "Directory.ReadWrite.All"
Enable-PnPSiteClassification -Classifications "High Impact","Low Impact" -
DefaultClassification "Low Impact"

After that, you can use the PnPOffice365GroupToSite command as below:

Add-PnPOffice365GroupToSite -Url "https://tenantname.sharepoint.com/sites/testSite" 
-Alias "classic3grp" -DisplayName 
"My team site group" -IsPublic -Classification "Low Impact"

Reference - Enable-PnPSiteClassification

Add-PnPOffice365GroupToSite

You can always remove Classification parameter as it is optional and your PowerShell script will work without errors, but if you need to classify the site collection, then that above commands are mandatory.

  • hey @ltenison - hope it helped resolve your issue. If it did, could you please mark it as answer by ticking the checkmark besides the answer, cheers ! – Gautam Sheth Jul 2 '18 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.