SOLVED

Prevent users from change privacy from "private" to "public" in Microsoft Teams

%3CLINGO-SUB%20id%3D%22lingo-sub-896344%22%20slang%3D%22en-US%22%3EPrevent%20users%20from%20change%20privacy%20from%20%22private%22%20to%20%22public%22%20in%20Microsoft%20Teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-896344%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3EAnyone%20found%20a%20way%20to%20prevent%20users%20to%20change%20from%20private%20to%20public.%26nbsp%3B%3CBR%20%2F%3EThere%20is%20a%20teams%20parameter%20called%20visibility%20and%20I%20assume%20it's%20the%26nbsp%3BAccessType%20of%20the%20underlaying%20O365%20group.%26nbsp%3B%3CBR%20%2F%3EI%20would%20want%20to%20restrict%20the%20option%20in%20the%20UI%20for%20the%20owner%20to%20change%20this.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3ENothing%20in%20the%20%22CsTeamsClientConfiguration%22%20and%20i%20can't%20find%20any%20policy%20which%20restrict%20this%20either.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20717px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F135648i98DDF15BCF568BAD%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22PrivateToPublic_ChangeVisibility.jpg%22%20title%3D%22PrivateToPublic_ChangeVisibility.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-896344%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-896470%22%20slang%3D%22en-US%22%3ERe%3A%20Prevent%20users%20from%20change%20privacy%20from%20%22private%22%20to%20%22public%22%20in%20Microsoft%20Te%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-896470%22%20slang%3D%22en-US%22%3ENo%2C%20the%20owner%20can%20always%20change%20this!%3CBR%20%2F%3E%3CBR%20%2F%3EAdam%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-896516%22%20slang%3D%22en-US%22%3ERe%3A%20Prevent%20users%20from%20change%20privacy%20from%20%22private%22%20to%20%22public%22%20in%20Microsoft%20Te%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-896516%22%20slang%3D%22en-US%22%3EHi%20Guys%2C%3CBR%20%2F%3E%3CBR%20%2F%3EThere%20are%20uservoices%20open%20related%20to%20this%3CBR%20%2F%3E%3CBR%20%2F%3ERestrict%20changing%20from%20public%20to%20private%20and%20vice%20versa%20(what%20you%20need)%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fmicrosoftteams.uservoice.com%2Fforums%2F555103-public%2Fsuggestions%2F37909912-allow-only-global-admins-to-edit-private-public-te%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmicrosoftteams.uservoice.com%2Fforums%2F555103-public%2Fsuggestions%2F37909912-allow-only-global-admins-to-edit-private-public-te%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EAbility%20to%20disable%20public%20Teams%20(a%20possible%20alternative)%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fmicrosoftteams.uservoice.com%2Fforums%2F555103-public%2Fsuggestions%2F19762252-ability-to-disable-public-teams%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmicrosoftteams.uservoice.com%2Fforums%2F555103-public%2Fsuggestions%2F19762252-ability-to-disable-public-teams%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EWould%20recommend%20you%20vote%20on%20them%20to%20push%20them%20up%20the%20agenda.%20As%20with%20all%20uservoices%20they%20may%20be%20some%20time%20to%20be%20picked%20up%2C%20if%20at%20all.%20So%20I%20would%20recommend%20attending%20the%20next%20Teams%20AMA%20on%20the%20community%20and%20raising%20the%20question%20there%20too.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20absolutely%20get%20why%20you%20would%20want%20them%20-%20particularly%20from%20preventing%20the%20exposure%20of%20sensitive%20data%20and%20conversations.%20I%20have%20voted%20on%20both%20of%20them.%3CBR%20%2F%3E%3CBR%20%2F%3EHope%20that%20answers%20your%20question%3CBR%20%2F%3E%3CBR%20%2F%3EBest%2C%20Chris%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1309176%22%20slang%3D%22en-US%22%3ERe%3A%20Prevent%20users%20from%20change%20privacy%20from%20%22private%22%20to%20%22public%22%20in%20Microsoft%20Te%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1309176%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F169605%22%20target%3D%22_blank%22%3E%40Christopher%20Hoard%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlternatively%2C%20as%20there's%20no%20current%20configurable%20option%20to%20all%20enforce%20this.%20It%20could%20also%20be%20managed%20by%20a%20script.%20The%20script%20could%20be%20scheduled%20to%20run%2C%20or%20on%20demand%20as%20needed.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20are%20using%20Teams%20for%20Education%2C%20Teams%20that%20are%20created%20using%20the%20Teams%20for%20Education%20template%20are%20created%20as%20public%20O365%20groups%20but%20of%20type%20hidden%20membership.%20If%20your%20not%20using%20Teams%20for%20Education%20the%20second%20condition%20could%20be%20removed%3A%20-and%20(%24_.HiddenGroupMembershipEnabled%20-ne%20'True')%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20script%20then%20goes%20through%20to%20identify%20the%20public%20O365%20groups%20and%20change%20them%20to%20private%20instead%20of%20public.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%23%20Find%20your%20public%20O365%20groups.%20Exclude%20O365%20groups%20which%20are%20public%20but%20of%20type%20hidden%20membership%20(used%20for%20Teams%20for%20Education).%0AGet-UnifiedGroup%20-ResultSize%20Unlimited%20%7C%20Where-Object%20%7B(%24_.AccessType%20-eq%20%22Public%22)%20-and%20(%24_.HiddenGroupMembershipEnabled%20-ne%20'True')%7D%20%7C%20Set-UnifiedGroup%20%E2%80%93AccessType%20Private%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1314111%22%20slang%3D%22en-US%22%3ERe%3A%20Prevent%20users%20from%20change%20privacy%20from%20%22private%22%20to%20%22public%22%20in%20Microsoft%20Te%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1314111%22%20slang%3D%22en-US%22%3EThat's%20a%20good%20alternative%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F278371%22%20target%3D%22_blank%22%3E%40ShaneOss%3C%2FA%3E.%20Well%20thought%20out%20I%20like%20it%3C%2FLINGO-BODY%3E
Contributor
 
 

Anyone found a way to prevent users to change from private to public. 
There is a teams parameter called visibility and I assume it's the AccessType of the underlaying O365 group. 
I would want to restrict the option in the UI for the owner to change this. 

Nothing in the "CsTeamsClientConfiguration" and i can't find any policy which restrict this either. 

PrivateToPublic_ChangeVisibility.jpg

 

 

 

 

 

4 Replies
No, the owner can always change this!

Adam
best response confirmed by Markus Johansson (Contributor)
Solution
Hi Guys,

There are uservoices open related to this

Restrict changing from public to private and vice versa (what you need)
https://microsoftteams.uservoice.com/forums/555103-public/suggestions/37909912-allow-only-global-adm...

Ability to disable public Teams (a possible alternative)
https://microsoftteams.uservoice.com/forums/555103-public/suggestions/19762252-ability-to-disable-pu...

Would recommend you vote on them to push them up the agenda. As with all uservoices they may be some time to be picked up, if at all. So I would recommend attending the next Teams AMA on the community and raising the question there too.

I absolutely get why you would want them - particularly from preventing the exposure of sensitive data and conversations. I have voted on both of them.

Hope that answers your question

Best, Chris

@Christopher Hoard 

Alternatively, as there's no current configurable option to all enforce this. It could also be managed by a script. The script could be scheduled to run, or on demand as needed.

 

If you are using Teams for Education, Teams that are created using the Teams for Education template are created as public O365 groups but of type hidden membership. If your not using Teams for Education the second condition could be removed: -and ($_.HiddenGroupMembershipEnabled -ne 'True')

 

The script then goes through to identify the public O365 groups and change them to private instead of public.

 

# Find your public O365 groups. Exclude O365 groups which are public but of type hidden membership (used for Teams for Education).
Get-UnifiedGroup -ResultSize Unlimited | Where-Object {($_.AccessType -eq "Public") -and ($_.HiddenGroupMembershipEnabled -ne 'True')} | Set-UnifiedGroup –AccessType Private

 

 

That's a good alternative @ShaneOss. Well thought out I like it