Jump to content

Recommended Posts

Posted

Does anyone know a good way to apply polices in Microsoft Teams.

 

Basically I am trying to disable messaging for students and enable it for staff.

 

As far as I can see the only way to do it is to change the global settings to block messaging and then add all the teachers and staff to a custom faculty policy with messaging enabled. Using the GUI it seems I can only edit 20 users at a time which is a proper faff!

 

Has anyone done this in a better way? I was hoping the licenses for staff and students would somehow propagate to the policies but it doesn't seem to make a difference.

Posted

You can use powershell to change the teams policy that is applied to users.

 

It's not the most straightforward system.

 

The powershell commands needed are

Import-Module SkypeOnlineConnector
$Session = New-CsOnlineSession
Import-PSSession $Session 

for the initial connection to Teams. You might need to set a proxy setting in powershell for it to connect depending on what type of web filtering solution you have.

 

Then you can use

Grant-CsTeamsMessagingPolicy -PolicyName "EduStudent_Custom" -Identity 

  • Thanks 1
Posted
BoredGuy's powershell is probably the way to go but have you looked at the Teams Admin center and the policy section?

https://admin.teams.microsoft.com/

I've not properly played with it but there is definitely a way to have different policies for staff and students.

Yep sadly it is very restricted to only 20 users at a time applying policies.

Posted
BoredGuy's powershell is probably the way to go but have you looked at the Teams Admin center and the policy section?

https://admin.teams.microsoft.com/

 

I've not properly played with it but there is definitely a way to have different policies for staff and students.

 

That's why we found the powershell as you can only pick 20 people at a time via the GUI

Posted

Using powershell and a either a CSV file or a loop, you can select more

 

We used the following to get all our 1000 student accounts, and update their teams policy. We set the office value via AD when we create their network accounts to it's helpful when doing filters in 365

$users = Get-Mailbox -ResultSize Unlimited | Where-Object {$_.Office -eq "Student"}
if (($users)){
foreach ($user in $users){
Grant-CsTeamsMessagingPolicy -PolicyName "EduStudent_Custom" -Identity $user.UserPrincipalName
}
}

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...