Jump to content

Recommended Posts

Posted

Does anyone know a way to block student access to other students office 365 profile pictures? Without removing access for staff. Microsoft say it's not possible.

Thanks 

Andy

Posted

It is possible, but its fiddly and annoying (and I've forgotten some of the points to set it up).

 

You need to set up an Outlook web app policy which turns the ability to set a profile picture. I think I did this with PowerShell. You then need to allocate this policy to existing accounts, the script for this is something like:

 

Connect-MsolService
Connect-AzureAD
Connect-ExchangeOnline
Connect-Graph

$usersOfGroup = Get-MsolGroupMember -GroupObjectId YOUR_GROUP_ID -All
foreach ($user in $usersOfGroup) { Get-Mailbox $user.EmailAddress | Set-CASMailbox -OWAMailboxPolicy "NoProfilePhoto" }

 

Then you can run a script to remove any already set photos in that group

 

foreach ($user in $usersOfGroup) { Remove-MgUserPhoto -UserId $user.EmailAddress -ErrorAction SilentlyContinue -ErrorVariable Err 
if($ERR -ne $null) { Write-Host Photo Not Found for the user $($user.DisplayName) }  }

 

We use Salamander to set the OWAMailboxPolicy on new student accounts. 

Posted

Create an OWA Policy, then I think you set the no photos with 

Get-OWAMailboxPolicy | Set-OWAMailboxPolicy -SetPhotoEnabled $False

 

It does take a while to sync down and show on the users.

  • 2 months later...

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...