atfnet Posted March 28, 2025 Posted March 28, 2025 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
Norphy Posted March 31, 2025 Posted March 31, 2025 If MS say it's not possible, I'm inclined to believe them.
sideone Posted March 31, 2025 Posted March 31, 2025 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.
sideone Posted March 31, 2025 Posted March 31, 2025 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.
kennysarmy Posted June 27, 2025 Posted June 27, 2025 https://learn.microsoft.com/en-us/graph/profilephoto-configure-settings I followed this and it seems to have resolved our issue of students changing their profile photos to that of staff
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now