2 min to read
How to import Office365 User photos over 10KB & without CSV in bulk?
Updating user photos in their profile is much important as it helps users to get a good Credibility, Recognition and to brand themselves in Social media such as Yammer or within their organization.
There are cases that users will not have professional photo updated or there is a business policy which enforces users to have professional images updated. Either the case, Admin has to take care in enforcing this. Also there exists limitation for the user photo not to be more than 10 KB.
In this blog, we are going to explore how to add user photo more than 10KB size and in bulk. The steps involved are
- Remove the 10KB photo size limitation
- Prepare a folder with all users photo
- Update the profile photo
The user photos can be viewed in below locations:
- Outlook Web Access
- Contact Card
- Thumbnail in emails
- Outlook Client
- Lync Client
- SharePoint (People Search / Newsfeed)
The complexity raises here is that the photos updated through SharePoint will not be reflected immediately in SharePoint search results and in Outlook client. Vice versa, if the user updated his photo from OWA Lync it will not reflect in SharePoint immediately. This is because the images are cached in all systems and it takes time to update it.
The only way to manage this centrally is by using the PowerShell.
1. Remove the 10KB photo size limitation
Install SharePoint Online Management Shell and connect to exchange using below cmdlet
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/?proxyMethod=RPS -Credential $UserCredential -Authentication Basic -AllowRedirection
Note: To overwrite the limitation of uploading the images with size more than 10KB, you need to use different proxy method (/?proxyMethod=RPS ) to connect your Office 365 in above cmdlet.
2. Prepare a folder with all users photo Prepare a folder with all Office365 users photo with their username as the filename.
3. Update the profile photo
Now we need to encode photo data in to a variable and use it in Set-UserPhoto cmdlet.
$path= 'C:\User images\'
$Images = Get-ChildItem $path
$Identity = ($_.Name.Tostring() -split "\.")
$PictureData = $path+$_.name
Set-UserPhoto -Identity $Identity -PictureData ([System.IO.File]::ReadAllBytes($PictureData)) -Confirm:$false }
Note: To use the above cmdlet you need to create a folder with user images and rename each images with its Office 365 user name.
Below are the limitation in Office365 user photo update
- By default, images with size 10 kb alone can be uploaded. Admin has to depend on other tools to edit (Crop, Rotate or Enhance) the user images.
- GUI for centralize management is not possible. Entirely depends PowerShell script which is complex to use.
- Need to create user images with user name and execute PowerShell which is a time consuming process and more reviews needed to ensure accuracy.
- Images uploaded will not be reflected in all systems immediately.
To overcome the above obstacles and make photo collection process easier you can use ‘GingerEx for Office 365 Photo Edit’.
You can subscribe for the beta from the below form.
Subscribe for BETA
Request New Report