Home

Change "Classification" of Communication Site?

%3CLINGO-SUB%20id%3D%22lingo-sub-89222%22%20slang%3D%22en-US%22%3EChange%20%22Classification%22%20of%20Communication%20Site%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-89222%22%20slang%3D%22en-US%22%3E%3CP%3EHow%2Fwhere%20can%20we%20change%20the%20%22Classification%22%20of%20a%20Communication%20Site%20after%20it%20is%20created%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-89222%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESites%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-125449%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20%22Classification%22%20of%20Communication%20Site%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-125449%22%20slang%3D%22en-US%22%3Eupdate%20issues%20being%20addressed%20in%20PnP%20Core%20see%20SIG%20Nov%202nd%20video.%3CBR%20%2F%3EComms%20site%20edits%20now%20all%20good%20from%20Site%20object.%20Have%20tried%20this%20myself%20and%20is%20fine.%3CBR%20%2F%3EModern%20team%20sites%20have%20this%20little%20problem%20that%20a%20value%20is%20attached%20to%20both%20the%20site%20and%20the%20backing%20group.%20The%20group%20value%20overrides.%20To%20change%20the%20group%20means%20some%20messing%20about%20in%20Graph.%20Core%20is%20being%20extended%20to%20encapsulate%20this.%20Hopefully%20next%20release.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-122629%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20%22Classification%22%20of%20Communication%20Site%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-122629%22%20slang%3D%22en-US%22%3E%3CP%3Ethis%20GitHub%20issue%20may%20be%20of%20interest.%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FSharePoint%2Fsp-dev-docs%2Fissues%2F859%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FSharePoint%2Fsp-dev-docs%2Fissues%2F859%3C%2FA%3E%3C%2FP%3E%3CP%3Ethey%20also%20have%20used%20the%20group%20(I%20think%20that%20is%20what%20the%20exhange%20stuff%20is)%20as%20a%20workaround%20for%20team%20sites%20but%20as%20you%20say%20its%20no%20good%20for%20comms%20sites.%20Looks%20like%20the%20edit%20problem%20is%20an%20oversight%20and%20hopefully%20Vesa%20will%20pursue%20this%20one.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eclassification%20is%20available%20on%20the%20site%20object%20in%20CSOM%20and%20also%20on%20the%20pageContext%20in%20Typescript%20for%20SPFx%26nbsp%3B%20so%20we%20can%20use%20it%20to%20drive%20extensions%20which%20is%20good.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CEM%3E%3CSTRONG%3E%3CFONT%20face%3D%22Consolas%22%3Ethis.context.pageContext.site.classification%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23008000%22%20face%3D%22Consolas%22%20size%3D%222%22%3E%2F%2Fcsom%20testing%20site%20class%20property%20is%20available%20in%20Core%20v19%3C%2FFONT%3E%3C%2FP%3E%3CP%3Ectx.Load(spsite%2C%20s%20%3D%26gt%3B%20s.Classification)%3B%3C%2FP%3E%3CP%3Ectx.ExecuteQuery()%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehopefully%20the%20update%20route%20will%20be%20tidied%20up%20so%20that%20PnP%20Core%20can%20handle%20the%20edits%20transparently%20in%20future.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-117446%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20%22Classification%22%20of%20Communication%20Site%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-117446%22%20slang%3D%22en-US%22%3E%3CP%3EThanks!%20That%20was%20very%20useful.%20So%20it%20would%20involve%20the%20following%20to%20get%20this%3A%3C%2FP%3E%3CP%3EConnect-PnPOnline%20-url%20%3CURLTO%20site%3D%22%22%3E%3CBR%20%2F%3E%24site%20%3D%20Get-PnPSite%3CBR%20%2F%3EGet-PnPProperty%20-clientobject%20%24site%20-property%20classification%3C%2FURLTO%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20use%20case%20for%20this%20is%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELet's%20say%20you%20have%20a%20policy%20to%20enforce%20objects%20with%20Classification%20%3D%3D%20HBI%20must%20not%20have%20guest%20access%20enabled%20(%20I%20know%20bad%20example%20since%20guest%20access%20is%20not%20enabled%20by%20default...%3A).%20So%20you%20would%20have%20a%20Powershell%20script%20that%20would%20run%20on%20a%20scheduled%20basis%20to%20discover%20and%20enforce%20all%20modern%20team%20sites%20and%20communication%20sites%20defined%20as%20HBI%20do%20not%20allow%20guest%20access.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%20let's%20say%20out%20of%20unplanned%20foresight...%20What%20if%20we%20need%20to%20change%20the%20classification%20taxonomy%20in%20the%20future%20(ie.%20redefined%20and%20split%20HBI%20into%20both%20HBI%20and%20Top%20Secret)%3F%20And%20then%20define%20additional%20policies%20for%20both%3F%20We%20would%20re-evaluate%20all%20existing%20sites%20that%20have%20been%20assigned%20HBI%20and%20decide%20on%20if%20it%20should%20be%20changed%20to%20%22Top%20Secret%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOnce%20each%20site%20is%20re-defined%2C%20we%20would%20need%20to%20script%20and%20re-classify%20both%20the%20O365%20Groups%20and%20communication%20sites%20at%20this%20point.%20While%20you%20can%20do%20so%20at%20the%20O365%20Group%20level%20(which%20triggers%20a%20function%20to%20re-classify%20the%20modern%20team%20site%20eventually)%2C%20there%20is%20currently%20no%20mechanism%20that%20I%20know%20of%20today%20to%20set%20the%20classification%20for%20a%20communication%20site%20once%20it%20has%20been%20set%20initially%20at%20site%20creation.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20would%20be%20nice%20to%20expose%20the%20classification%20property%20in%20the%20SPOSite%20or%20PnPTenantSite%20object.%20Doing%20a%20Connect-PnPOnline%20to%20get%20context%20for%20each%20site%20would%20be%20a%20rather%20resource-intensive%20operation.%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-117195%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20%22Classification%22%20of%20Communication%20Site%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-117195%22%20slang%3D%22en-US%22%3E%3CP%3Ehavent%20seen%20a%20set-pnpproperty%20command%20yet.%20get-pnpproperty%20will%20retreive%20the%20current%20setting.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOut%20of%20the%20b%3CSTRONG%3Eox%3C%2FSTRONG%3E%20classification%20on%20modern%20sites%20%3A%20pnp%20video%20%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DE-8Z2ggHcS0%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%20%3C%2FA%3E%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DE-8Z2ggHcS0%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DE-8Z2ggHcS0%3C%2FA%3E%3C%2FP%3E%3CP%3Ei%20have%20followed%20this%20video%20and%20now%20have%20my%20custom%20classifications%20showing%20in%20the%20dropdown%20on%20the%20site%20creation%20dialogue%20for%20both%20team%20and%20comms%20sites.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-117128%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20%22Classification%22%20of%20Communication%20Site%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-117128%22%20slang%3D%22en-US%22%3EFrom%20my%20understanding%20this%20is%20not%20currently%20a%20supported%20use%20case%20but%20one%20that%20perhaps%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F96%22%20target%3D%22_blank%22%3E%40Mark%20Kashman%3C%2FA%3E%20might%20comment%20upon.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-117127%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20%22Classification%22%20of%20Communication%20Site%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-117127%22%20slang%3D%22en-US%22%3EFrom%20my%20understanding%20this%20is%20not%20currently%20a%20supported%20use%20case%20but%20one%20that%20perhaps%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F96%22%20target%3D%22_blank%22%3E%40Mark%20Kashman%3C%2FA%3E%20or%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F69112%22%20target%3D%22_blank%22%3E%40Christopher%3C%2FA%3E%20Fiessinger%20might%20comment%20upon.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-117121%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20%22Classification%22%20of%20Communication%20Site%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-117121%22%20slang%3D%22en-US%22%3E%3CP%3EI%20would%20like%20to%20know%20as%20well.%26nbsp%3B%20%26nbsp%3BI%20just%20came%20across%20this%20scenario%20today%20and%20would%20like%20to%20know%20where%20this%20information%20is%20stored.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20to%20reproduce%3A%3C%2FP%3E%3CP%3E1.%20Configure%20classification%20taxonomy%20for%20Unified%20Groups%20(%24setting%5B%22ClassificationList%22%5D%20%3D%20%22LBI%2CMBI%2CHBI%22)%3C%2FP%3E%3CP%3E2.%20Configure%20a%20default%20classification%20(%24setting%5B%22DefaultClassification%22%5D%20%3D%20%22MBI%22)%3C%2FP%3E%3CP%3E3.%20Go%20to%20SharePoint%20launcher%20-%26gt%3B%20Create%20site%20-%26gt%3B%20Communication%20site%3C%2FP%3E%3CP%3E4.%20Specify%20site%20classification%20and%20click%20%22Finish%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECommunication%20sites%20are%20not%20a%20part%20of%20an%20O365%20Group%2F%20Unified%20Group%2C%20so%20there%20isn't%20a%20%22classification%22%20attribute%20to%20get%2Fset%20from%20a%20Unified%20Group%20object.%26nbsp%3B%20I%20do%20not%20see%20a%20classification%20attribute%20in%20the%20Get-SPOSite%20object%20or%20in%20the%20Graph%20API.%26nbsp%3B%20Help%20to%20point%20out%20where%20this%20is%20stored%20would%20be%20great.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-89787%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20%22Classification%22%20of%20Communication%20Site%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-89787%22%20slang%3D%22en-US%22%3EWhere%2FHow%20are%20you%20setting%20it%20in%20the%20first%20place%3F%3C%2FLINGO-BODY%3E
Highlighted
Valued Contributor

How/where can we change the "Classification" of a Communication Site after it is created?

8 Replies
Highlighted
Where/How are you setting it in the first place?
Highlighted

I would like to know as well.   I just came across this scenario today and would like to know where this information is stored.

 

How to reproduce:

1. Configure classification taxonomy for Unified Groups ($setting["ClassificationList"] = "LBI,MBI,HBI")

2. Configure a default classification ($setting["DefaultClassification"] = "MBI")

3. Go to SharePoint launcher -> Create site -> Communication site

4. Specify site classification and click "Finish"

 

Communication sites are not a part of an O365 Group/ Unified Group, so there isn't a "classification" attribute to get/set from a Unified Group object.  I do not see a classification attribute in the Get-SPOSite object or in the Graph API.  Help to point out where this is stored would be great.

Highlighted
From my understanding this is not currently a supported use case but one that perhaps @Mark Kashman or @Christopher Fiessinger might comment upon.
From my understanding this is not currently a supported use case but one that perhaps @Mark Kashman might comment upon.
Highlighted

havent seen a set-pnpproperty command yet. get-pnpproperty will retreive the current setting.

 

Out of the box classification on modern sites : pnp video here https://www.youtube.com/watch?v=E-8Z2ggHcS0

i have followed this video and now have my custom classifications showing in the dropdown on the site creation dialogue for both team and comms sites.

Highlighted

Thanks! That was very useful. So it would involve the following to get this:

Connect-PnPOnline -url <urlto site>
$site = Get-PnPSite
Get-PnPProperty -clientobject $site -property classification

 

The use case for this is this:

 

Let's say you have a policy to enforce objects with Classification == HBI must not have guest access enabled ( I know bad example since guest access is not enabled by default...:). So you would have a Powershell script that would run on a scheduled basis to discover and enforce all modern team sites and communication sites defined as HBI do not allow guest access.

 

Then let's say out of unplanned foresight... What if we need to change the classification taxonomy in the future (ie. redefined and split HBI into both HBI and Top Secret)? And then define additional policies for both? We would re-evaluate all existing sites that have been assigned HBI and decide on if it should be changed to "Top Secret".

 

Once each site is re-defined, we would need to script and re-classify both the O365 Groups and communication sites at this point. While you can do so at the O365 Group level (which triggers a function to re-classify the modern team site eventually), there is currently no mechanism that I know of today to set the classification for a communication site once it has been set initially at site creation.

 

Also, would be nice to expose the classification property in the SPOSite or PnPTenantSite object. Doing a Connect-PnPOnline to get context for each site would be a rather resource-intensive operation. :)

Highlighted

this GitHub issue may be of interest. https://github.com/SharePoint/sp-dev-docs/issues/859

they also have used the group (I think that is what the exhange stuff is) as a workaround for team sites but as you say its no good for comms sites. Looks like the edit problem is an oversight and hopefully Vesa will pursue this one.

 

classification is available on the site object in CSOM and also on the pageContext in Typescript for SPFx  so we can use it to drive extensions which is good.

 

this.context.pageContext.site.classification

 

//csom testing site class property is available in Core v19

ctx.Load(spsite, s => s.Classification);

ctx.ExecuteQuery();

 

hopefully the update route will be tidied up so that PnP Core can handle the edits transparently in future.

Highlighted
update issues being addressed in PnP Core see SIG Nov 2nd video.
Comms site edits now all good from Site object. Have tried this myself and is fine.
Modern team sites have this little problem that a value is attached to both the site and the backing group. The group value overrides. To change the group means some messing about in Graph. Core is being extended to encapsulate this. Hopefully next release.